pub struct EnRxaddr(/* private fields */);Expand description
§EN_RXADDR register
Enable RX address on data pipes 0-5.
Address = 0x02
§Fields
erx_p0 and erx_p1 default to 1.
§erx_pN | bit N
Enable RX adddress on data pipes N = 0-5.
§Example
use nrf24l01_commands::registers;
// Default value
let reg = registers::EnRxaddr::new();
assert_eq!(reg.into_bits(), 0b0000_0011);
// Write fields
let reg = registers::EnRxaddr::new()
.with_erx_p5(true)
.with_erx_p4(false)
.with_erx_p3(false)
.with_erx_p2(false)
.with_erx_p1(true)
.with_erx_p0(false);
assert_eq!(reg.into_bits(), 0b0010_0010);Implementations§
Source§impl EnRxaddr
impl EnRxaddr
Sourcepub const fn with_erx_p5_checked(self, value: bool) -> Result<Self, ()>
pub const fn with_erx_p5_checked(self, value: bool) -> Result<Self, ()>
Enable RX address for data pipe 5.
Bits: 5..6
Sourcepub const fn with_erx_p5(self, value: bool) -> Self
pub const fn with_erx_p5(self, value: bool) -> Self
Enable RX address for data pipe 5.
Bits: 5..6
Sourcepub const fn set_erx_p5(&mut self, value: bool)
pub const fn set_erx_p5(&mut self, value: bool)
Enable RX address for data pipe 5.
Bits: 5..6
Sourcepub const fn set_erx_p5_checked(&mut self, value: bool) -> Result<(), ()>
pub const fn set_erx_p5_checked(&mut self, value: bool) -> Result<(), ()>
Enable RX address for data pipe 5.
Bits: 5..6
Sourcepub const fn with_erx_p4_checked(self, value: bool) -> Result<Self, ()>
pub const fn with_erx_p4_checked(self, value: bool) -> Result<Self, ()>
Enable RX address for data pipe 4.
Bits: 4..5
Sourcepub const fn with_erx_p4(self, value: bool) -> Self
pub const fn with_erx_p4(self, value: bool) -> Self
Enable RX address for data pipe 4.
Bits: 4..5
Sourcepub const fn set_erx_p4(&mut self, value: bool)
pub const fn set_erx_p4(&mut self, value: bool)
Enable RX address for data pipe 4.
Bits: 4..5
Sourcepub const fn set_erx_p4_checked(&mut self, value: bool) -> Result<(), ()>
pub const fn set_erx_p4_checked(&mut self, value: bool) -> Result<(), ()>
Enable RX address for data pipe 4.
Bits: 4..5
Sourcepub const fn with_erx_p3_checked(self, value: bool) -> Result<Self, ()>
pub const fn with_erx_p3_checked(self, value: bool) -> Result<Self, ()>
Enable RX address for data pipe 3.
Bits: 3..4
Sourcepub const fn with_erx_p3(self, value: bool) -> Self
pub const fn with_erx_p3(self, value: bool) -> Self
Enable RX address for data pipe 3.
Bits: 3..4
Sourcepub const fn set_erx_p3(&mut self, value: bool)
pub const fn set_erx_p3(&mut self, value: bool)
Enable RX address for data pipe 3.
Bits: 3..4
Sourcepub const fn set_erx_p3_checked(&mut self, value: bool) -> Result<(), ()>
pub const fn set_erx_p3_checked(&mut self, value: bool) -> Result<(), ()>
Enable RX address for data pipe 3.
Bits: 3..4
Sourcepub const fn with_erx_p2_checked(self, value: bool) -> Result<Self, ()>
pub const fn with_erx_p2_checked(self, value: bool) -> Result<Self, ()>
Enable RX address for data pipe 2.
Bits: 2..3
Sourcepub const fn with_erx_p2(self, value: bool) -> Self
pub const fn with_erx_p2(self, value: bool) -> Self
Enable RX address for data pipe 2.
Bits: 2..3
Sourcepub const fn set_erx_p2(&mut self, value: bool)
pub const fn set_erx_p2(&mut self, value: bool)
Enable RX address for data pipe 2.
Bits: 2..3
Sourcepub const fn set_erx_p2_checked(&mut self, value: bool) -> Result<(), ()>
pub const fn set_erx_p2_checked(&mut self, value: bool) -> Result<(), ()>
Enable RX address for data pipe 2.
Bits: 2..3
Sourcepub const fn with_erx_p1_checked(self, value: bool) -> Result<Self, ()>
pub const fn with_erx_p1_checked(self, value: bool) -> Result<Self, ()>
Enable RX address for data pipe 1.
Bits: 1..2
Sourcepub const fn with_erx_p1(self, value: bool) -> Self
pub const fn with_erx_p1(self, value: bool) -> Self
Enable RX address for data pipe 1.
Bits: 1..2
Sourcepub const fn set_erx_p1(&mut self, value: bool)
pub const fn set_erx_p1(&mut self, value: bool)
Enable RX address for data pipe 1.
Bits: 1..2
Sourcepub const fn set_erx_p1_checked(&mut self, value: bool) -> Result<(), ()>
pub const fn set_erx_p1_checked(&mut self, value: bool) -> Result<(), ()>
Enable RX address for data pipe 1.
Bits: 1..2
Sourcepub const fn with_erx_p0_checked(self, value: bool) -> Result<Self, ()>
pub const fn with_erx_p0_checked(self, value: bool) -> Result<Self, ()>
Enable RX address for data pipe 0.
Bits: 0..1
Sourcepub const fn with_erx_p0(self, value: bool) -> Self
pub const fn with_erx_p0(self, value: bool) -> Self
Enable RX address for data pipe 0.
Bits: 0..1
Sourcepub const fn set_erx_p0(&mut self, value: bool)
pub const fn set_erx_p0(&mut self, value: bool)
Enable RX address for data pipe 0.
Bits: 0..1