pub struct EnAa(/* private fields */);Expand description
§EN_AA register
Enable ‘Auto Acknowledgement’ on data pipes 0-5.
Address = 0x01
§Fields
All fields default to 1.
§enaa_pN | bit N
Enable ‘Auto Acknowledgement’ on data pipes N = 0-5.
§Example
use nrf24l01_commands::registers;
// Default value
let reg = registers::EnAa::new();
assert_eq!(reg.into_bits(), 0b0011_1111);
// Write fields
let reg = registers::EnAa::new()
.with_enaa_p5(true)
.with_enaa_p4(true)
.with_enaa_p3(false)
.with_enaa_p2(false)
.with_enaa_p1(false)
.with_enaa_p0(false);
assert_eq!(reg.into_bits(), 0b0011_0000);Implementations§
Source§impl EnAa
impl EnAa
Sourcepub const fn with_enaa_p5_checked(self, value: bool) -> Result<Self, ()>
pub const fn with_enaa_p5_checked(self, value: bool) -> Result<Self, ()>
Enable ‘Auto Acknowledgement’ on data pipe 5.
Bits: 5..6
Sourcepub const fn with_enaa_p5(self, value: bool) -> Self
pub const fn with_enaa_p5(self, value: bool) -> Self
Enable ‘Auto Acknowledgement’ on data pipe 5.
Bits: 5..6
Sourcepub const fn set_enaa_p5(&mut self, value: bool)
pub const fn set_enaa_p5(&mut self, value: bool)
Enable ‘Auto Acknowledgement’ on data pipe 5.
Bits: 5..6
Sourcepub const fn set_enaa_p5_checked(&mut self, value: bool) -> Result<(), ()>
pub const fn set_enaa_p5_checked(&mut self, value: bool) -> Result<(), ()>
Enable ‘Auto Acknowledgement’ on data pipe 5.
Bits: 5..6
Sourcepub const fn with_enaa_p4_checked(self, value: bool) -> Result<Self, ()>
pub const fn with_enaa_p4_checked(self, value: bool) -> Result<Self, ()>
Enable ‘Auto Acknowledgement’ on data pipe 4.
Bits: 4..5
Sourcepub const fn with_enaa_p4(self, value: bool) -> Self
pub const fn with_enaa_p4(self, value: bool) -> Self
Enable ‘Auto Acknowledgement’ on data pipe 4.
Bits: 4..5
Sourcepub const fn set_enaa_p4(&mut self, value: bool)
pub const fn set_enaa_p4(&mut self, value: bool)
Enable ‘Auto Acknowledgement’ on data pipe 4.
Bits: 4..5
Sourcepub const fn set_enaa_p4_checked(&mut self, value: bool) -> Result<(), ()>
pub const fn set_enaa_p4_checked(&mut self, value: bool) -> Result<(), ()>
Enable ‘Auto Acknowledgement’ on data pipe 4.
Bits: 4..5
Sourcepub const fn with_enaa_p3_checked(self, value: bool) -> Result<Self, ()>
pub const fn with_enaa_p3_checked(self, value: bool) -> Result<Self, ()>
Enable ‘Auto Acknowledgement’ on data pipe 3.
Bits: 3..4
Sourcepub const fn with_enaa_p3(self, value: bool) -> Self
pub const fn with_enaa_p3(self, value: bool) -> Self
Enable ‘Auto Acknowledgement’ on data pipe 3.
Bits: 3..4
Sourcepub const fn set_enaa_p3(&mut self, value: bool)
pub const fn set_enaa_p3(&mut self, value: bool)
Enable ‘Auto Acknowledgement’ on data pipe 3.
Bits: 3..4
Sourcepub const fn set_enaa_p3_checked(&mut self, value: bool) -> Result<(), ()>
pub const fn set_enaa_p3_checked(&mut self, value: bool) -> Result<(), ()>
Enable ‘Auto Acknowledgement’ on data pipe 3.
Bits: 3..4
Sourcepub const fn with_enaa_p2_checked(self, value: bool) -> Result<Self, ()>
pub const fn with_enaa_p2_checked(self, value: bool) -> Result<Self, ()>
Enable ‘Auto Acknowledgement’ on data pipe 2.
Bits: 2..3
Sourcepub const fn with_enaa_p2(self, value: bool) -> Self
pub const fn with_enaa_p2(self, value: bool) -> Self
Enable ‘Auto Acknowledgement’ on data pipe 2.
Bits: 2..3
Sourcepub const fn set_enaa_p2(&mut self, value: bool)
pub const fn set_enaa_p2(&mut self, value: bool)
Enable ‘Auto Acknowledgement’ on data pipe 2.
Bits: 2..3
Sourcepub const fn set_enaa_p2_checked(&mut self, value: bool) -> Result<(), ()>
pub const fn set_enaa_p2_checked(&mut self, value: bool) -> Result<(), ()>
Enable ‘Auto Acknowledgement’ on data pipe 2.
Bits: 2..3
Sourcepub const fn with_enaa_p1_checked(self, value: bool) -> Result<Self, ()>
pub const fn with_enaa_p1_checked(self, value: bool) -> Result<Self, ()>
Enable ‘Auto Acknowledgement’ on data pipe 1.
Bits: 1..2
Sourcepub const fn with_enaa_p1(self, value: bool) -> Self
pub const fn with_enaa_p1(self, value: bool) -> Self
Enable ‘Auto Acknowledgement’ on data pipe 1.
Bits: 1..2
Sourcepub const fn set_enaa_p1(&mut self, value: bool)
pub const fn set_enaa_p1(&mut self, value: bool)
Enable ‘Auto Acknowledgement’ on data pipe 1.
Bits: 1..2
Sourcepub const fn set_enaa_p1_checked(&mut self, value: bool) -> Result<(), ()>
pub const fn set_enaa_p1_checked(&mut self, value: bool) -> Result<(), ()>
Enable ‘Auto Acknowledgement’ on data pipe 1.
Bits: 1..2
Sourcepub const fn with_enaa_p0_checked(self, value: bool) -> Result<Self, ()>
pub const fn with_enaa_p0_checked(self, value: bool) -> Result<Self, ()>
Enable ‘Auto Acknowledgement’ on data pipe 0.
Bits: 0..1
Sourcepub const fn with_enaa_p0(self, value: bool) -> Self
pub const fn with_enaa_p0(self, value: bool) -> Self
Enable ‘Auto Acknowledgement’ on data pipe 0.
Bits: 0..1
Sourcepub const fn set_enaa_p0(&mut self, value: bool)
pub const fn set_enaa_p0(&mut self, value: bool)
Enable ‘Auto Acknowledgement’ on data pipe 0.
Bits: 0..1