Expand description
Generate SPI byte sequences for nRF24L01 commands.
§Example with writing the CONFIG register
use nrf24l01_commands::{registers, commands};
let config = registers::Config::new()
    .with_mask_rx_dr(true)
    .with_mask_tx_ds(false)
    .with_mask_max_rt(false)
    .with_en_crc(false)
    .with_crco(true)
    .with_pwr_up(true)
    .with_prim_rx(false);
let write_command = commands::WRegister(config);
let spi_bytes = write_command.bytes();
assert_eq!(spi_bytes, [0b0010_0000, 0b0100_0110]);Structs§
- Activate
- ACTIVATE command
- FlushRx
- FLUSH_RX command
- FlushTx
- FLUSH_TX command
- Nop
- NOP command
- RRegister
- R_REGISTER command
- RRxPayload
- R_RX_PAYLOAD command
- RRxPlWid 
- R_RX_PL_WID command
- ReuseTxPl 
- REUSE_TX_PL command
- WAckPayload 
- W_ACK_PAYLOAD command
- WRegister
- W_REGISTER command
- WTxPayload
- W_TX_PAYLOAD command
- WTxPayloadNoack 
- W_TX_PAYLOAD_NOACK command
Traits§
- Command
- A trait for nRF24L01 commands. Defines the command’s command word.