pub struct WAckPayload<const N: usize> {
pub pipe: u8,
pub payload: [u8; N],
}Expand description
§W_ACK_PAYLOAD command
Write payload to be transmitted with ACK packet on a data pipe. Used in RX mode.
Maximum three ACK packet payloads can be pending. Payloads with the same pipe
are handled first-in-first-out. Payload byte-order is kept as MSByte first contrary to documentation.
§Example
use nrf24l01_commands::commands;
let pipe = 4;
let payload = [1, 2, 3, 4, 5, 6, 7, 8, 9];
let bytes = commands::WAckPayload { pipe, payload }.bytes();
assert_eq!(bytes, [0b1010_1000 | pipe, 1, 2, 3, 4, 5, 6, 7, 8, 9]);Fields§
§pipe: u8Data pipe this ACK payload is designated to.
payload: [u8; N]Payload to send with ACK.
Payload must be 1 to 32 bytes.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<const N: usize> Freeze for WAckPayload<N>
impl<const N: usize> RefUnwindSafe for WAckPayload<N>
impl<const N: usize> Send for WAckPayload<N>
impl<const N: usize> Sync for WAckPayload<N>
impl<const N: usize> Unpin for WAckPayload<N>
impl<const N: usize> UnwindSafe for WAckPayload<N>
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