pub struct RfCh(/* private fields */);Expand description
§RF_CH register
Set RF channel.
Address = 0x05
§Fields
§rf_ch | bits 6:0
Sets the frequency channel to operate on 0 - 125. Default value: 2.
§Example
use nrf24l01_commands::registers;
// Default value
let reg = registers::RfCh::new();
assert_eq!(reg.into_bits(), 0b0000_0010);
// Write fields
let reg = registers::RfCh::new().with_rf_ch(89);
assert_eq!(reg.into_bits(), 89);Implementations§
Source§impl RfCh
impl RfCh
Sourcepub const fn rf_ch(&self) -> u8
pub const fn rf_ch(&self) -> u8
Sets the frequency channel to operate on 0 - 125. Default value: 2.
Bits: 0..7
Sourcepub const fn with_rf_ch_checked(self, value: u8) -> Result<Self, ()>
pub const fn with_rf_ch_checked(self, value: u8) -> Result<Self, ()>
Sets the frequency channel to operate on 0 - 125. Default value: 2.
Bits: 0..7
Sourcepub const fn with_rf_ch(self, value: u8) -> Self
pub const fn with_rf_ch(self, value: u8) -> Self
Sets the frequency channel to operate on 0 - 125. Default value: 2.
Bits: 0..7
Trait Implementations§
impl Copy for RfCh
Auto Trait Implementations§
impl Freeze for RfCh
impl RefUnwindSafe for RfCh
impl Send for RfCh
impl Sync for RfCh
impl Unpin for RfCh
impl UnwindSafe for RfCh
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more