pub struct RxAddrP2(/* private fields */);Expand description
§RX_ADDR_P2 register
RX address data pipe 2. Only LSByte is stored.
MSBytes are equal to RxAddrP1 bits 39:8.
Address = 0x0C
§Fields
§rx_addr_p2 | bits 7:0
RX address data pipe 2. Default value: 0xC3.
§Example
use nrf24l01_commands::registers;
// Default value
let reg = registers::RxAddrP2::new();
assert_eq!(reg.into_bits(), 0xC3);
// Write fields
let reg = registers::RxAddrP2::new().with_rx_addr_p2(172);
assert_eq!(reg.into_bits(), 172);Implementations§
Source§impl RxAddrP2
impl RxAddrP2
Sourcepub const fn rx_addr_p2(&self) -> u8
pub const fn rx_addr_p2(&self) -> u8
RX address data pipe 2. Default value: 0xC3.
Bits: 0..8
Sourcepub const fn with_rx_addr_p2_checked(self, value: u8) -> Result<Self, ()>
pub const fn with_rx_addr_p2_checked(self, value: u8) -> Result<Self, ()>
RX address data pipe 2. Default value: 0xC3.
Bits: 0..8
Sourcepub const fn with_rx_addr_p2(self, value: u8) -> Self
pub const fn with_rx_addr_p2(self, value: u8) -> Self
RX address data pipe 2. Default value: 0xC3.
Bits: 0..8
Sourcepub const fn set_rx_addr_p2(&mut self, value: u8)
pub const fn set_rx_addr_p2(&mut self, value: u8)
RX address data pipe 2. Default value: 0xC3.
Bits: 0..8
Trait Implementations§
impl Copy for RxAddrP2
Auto Trait Implementations§
impl Freeze for RxAddrP2
impl RefUnwindSafe for RxAddrP2
impl Send for RxAddrP2
impl Sync for RxAddrP2
impl Unpin for RxAddrP2
impl UnwindSafe for RxAddrP2
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