pub struct Dynpd(/* private fields */);Expand description
§DYNPD register
Enable dynamic payload length for data pipes 0-5.
Address = 0x1C
§Fields
§dpl_pN | bit N
Enable dynamic payload length on data pipes N = 0-5.
§Example
use nrf24l01_commands::registers;
// Default value
let reg = registers::Dynpd::new();
assert_eq!(reg.into_bits(), 0);
// Write fields
let reg = registers::Dynpd::new()
.with_dpl_p5(true)
.with_dpl_p4(false)
.with_dpl_p3(false)
.with_dpl_p2(false)
.with_dpl_p1(true)
.with_dpl_p0(false);
assert_eq!(reg.into_bits(), 0b0010_0010);Implementations§
Source§impl Dynpd
impl Dynpd
Sourcepub const fn with_dpl_p5_checked(self, value: bool) -> Result<Self, ()>
pub const fn with_dpl_p5_checked(self, value: bool) -> Result<Self, ()>
Sourcepub const fn with_dpl_p5(self, value: bool) -> Self
pub const fn with_dpl_p5(self, value: bool) -> Self
Sourcepub const fn set_dpl_p5(&mut self, value: bool)
pub const fn set_dpl_p5(&mut self, value: bool)
Sourcepub const fn with_dpl_p4_checked(self, value: bool) -> Result<Self, ()>
pub const fn with_dpl_p4_checked(self, value: bool) -> Result<Self, ()>
Sourcepub const fn with_dpl_p4(self, value: bool) -> Self
pub const fn with_dpl_p4(self, value: bool) -> Self
Sourcepub const fn set_dpl_p4(&mut self, value: bool)
pub const fn set_dpl_p4(&mut self, value: bool)
Sourcepub const fn with_dpl_p3_checked(self, value: bool) -> Result<Self, ()>
pub const fn with_dpl_p3_checked(self, value: bool) -> Result<Self, ()>
Sourcepub const fn with_dpl_p3(self, value: bool) -> Self
pub const fn with_dpl_p3(self, value: bool) -> Self
Sourcepub const fn set_dpl_p3(&mut self, value: bool)
pub const fn set_dpl_p3(&mut self, value: bool)
Sourcepub const fn with_dpl_p2_checked(self, value: bool) -> Result<Self, ()>
pub const fn with_dpl_p2_checked(self, value: bool) -> Result<Self, ()>
Sourcepub const fn with_dpl_p2(self, value: bool) -> Self
pub const fn with_dpl_p2(self, value: bool) -> Self
Sourcepub const fn set_dpl_p2(&mut self, value: bool)
pub const fn set_dpl_p2(&mut self, value: bool)
Sourcepub const fn with_dpl_p1_checked(self, value: bool) -> Result<Self, ()>
pub const fn with_dpl_p1_checked(self, value: bool) -> Result<Self, ()>
Sourcepub const fn with_dpl_p1(self, value: bool) -> Self
pub const fn with_dpl_p1(self, value: bool) -> Self
Sourcepub const fn set_dpl_p1(&mut self, value: bool)
pub const fn set_dpl_p1(&mut self, value: bool)
Sourcepub const fn with_dpl_p0_checked(self, value: bool) -> Result<Self, ()>
pub const fn with_dpl_p0_checked(self, value: bool) -> Result<Self, ()>
Sourcepub const fn with_dpl_p0(self, value: bool) -> Self
pub const fn with_dpl_p0(self, value: bool) -> Self
Sourcepub const fn set_dpl_p0(&mut self, value: bool)
pub const fn set_dpl_p0(&mut self, value: bool)
Trait Implementations§
impl Copy for Dynpd
Auto Trait Implementations§
impl Freeze for Dynpd
impl RefUnwindSafe for Dynpd
impl Send for Dynpd
impl Sync for Dynpd
impl Unpin for Dynpd
impl UnwindSafe for Dynpd
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