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 command
- FLUSH_RX command
- FLUSH_TX command
- NOP command
- R_REGISTER command
- R_RX_PAYLOAD command
- R_RX_PL_WID command
- REUSE_TX_PL command
- W_ACK_PAYLOAD command
- W_REGISTER command
- W_TX_PAYLOAD command
- W_TX_PAYLOAD_NOACK command
Traits§
- A trait for nRF24L01 commands. Defines the command’s command word.