pub struct RRxPayload<const N: usize>();Expand description
§R_RX_PAYLOAD command
Read RX payload.
§Const Parameter N
Width of RX payload.
Must be 1 to 32 bytes.
§Example
#![feature(generic_const_exprs)] // TODO: https://github.com/rust-lang/rust/issues/133199#issuecomment-2630615573
use nrf24l01_commands::commands;
// Generate SPI byte sequence for R_RX_PAYLOAD with 17 byte payload.
let bytes = commands::RRxPayload::<17>::bytes();
let mut expected_bytes = [0; 18];
expected_bytes[0] = 0b0110_0001;
assert_eq!(bytes, expected_bytes);Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<const N: usize> Freeze for RRxPayload<N>
impl<const N: usize> RefUnwindSafe for RRxPayload<N>
impl<const N: usize> Send for RRxPayload<N>
impl<const N: usize> Sync for RRxPayload<N>
impl<const N: usize> Unpin for RRxPayload<N>
impl<const N: usize> UnwindSafe for RRxPayload<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