21 #ifndef COSA_NRF24L01P_HH 22 #define COSA_NRF24L01P_HH 28 #if !defined(BOARD_ATTINYX5) 79 #if defined(BOARD_ATTINYX4) 84 #elif defined(BOARD_ATMEGA2560) 120 virtual bool begin(
const void* config =
NULL);
153 virtual int send(uint8_t dest, uint8_t port,
const iovec_t* vec);
168 virtual int send(uint8_t dest, uint8_t port,
const void* buf,
size_t len);
185 virtual int recv(uint8_t& src, uint8_t& port,
void* buf,
size_t count,
231 } __attribute__((packed));
250 } __attribute__((packed));
318 } __attribute__((packed));
331 } __attribute__((packed));
336 } __attribute__((packed));
349 } __attribute__((packed));
362 } __attribute__((packed));
372 } __attribute__((packed));
384 } __attribute__((packed));
395 } __attribute__((packed));
404 } __attribute__((packed));
414 } __attribute__((packed));
427 } __attribute__((packed));
459 } __attribute__((packed));
491 } __attribute__((packed));
529 } __attribute__((packed));
538 } __attribute__((packed));
602 } __attribute__((packed));
void write(Register reg, uint8_t data)
uint8_t tx_full
TX FIFO full.
State m_state
Transceiver state.
Setup of auto retransmission.
Data send TX FIFO interrupt.
Set RF data rate to 250 kbps.
NRF24L01P(uint16_t net, uint8_t dev, Board::DigitalPin csn=Board::D10, Board::DigitalPin ce=Board::D9, Board::ExternalInterruptPin irq=Board::EXT0)
Enable auto acknowledgement.
static const uint16_t Thce_us
uint16_t m_drops
Dropped messages.
CRC encoding scheme (2/1 bytes CRC).
Default auto retransmit delay (500 us)
Receive address data pipe 0.
IRQPin(Board::ExternalInterruptPin pin, InterruptMode mode, NRF24L01P *nrf)
IRQPin m_irq
Chip interrupt pin and handler.
static const uint16_t Tpd2stby_ms
uint8_t as_byte
Byte representation of fifo status.
Mask interrupt caused byt MAX_RT.
virtual bool begin(const void *config=NULL)
uint8_t max_rt
Max number of TX retransmit interrupt.
Read command and status register.
uint16_t m_trans
Send count.
static const size_t PAYLOAD_MAX
friend IOStream & operator<<(IOStream &outs, status_t status)
Maximum number of TX retransmits interrupt.
void read(Register reg, void *buf, size_t size)
observe_tx_t read_observe_tx()
Disable AUTOACK on this specific packet.
static const size_t DEVICE_PAYLOAD_MAX
Max address width in bytes.
uint8_t tx_ds
Data send TX FIFO interrupt.
Enable dynamic payload length.
Data pipe number for available payload (3b).
Enable auto acknowledgement data pipe 5.
Enable dynamic payload length data pipe 5.
uint8_t as_byte
Byte representation of performance statistics.
static const uint16_t Tstby2a_us
Reuse last transmitted payload.
Reuse last transmitted data packat.
Mask register address (5b).
fifo_status_t read_fifo_status()
uint8_t rx_p_no
Data pipe number for available payload.
status_t m_status
Latest status.
Set RF output power in TX mode (bits 2).
Transmit observe register.
fifo_status_t(uint8_t value)
Mask interrupt caused by TX_DS.
virtual int send(uint8_t dest, uint8_t port, const iovec_t *vec)
Write command and status register.
Write TX payload with ACK (3 bit addr).
Enable dynamic payload length.
uint16_t m_retrans
Retransmittion count.
virtual int recv(uint8_t &src, uint8_t &port, void *buf, size_t count, uint32_t ms=0L)
uint8_t read(Command cmd)
Count retransmitted packets (bits 4).
observe_tx_t(uint8_t value)
OutputPin m_ce
Chip enable activity RX/TX select pin.
Enable all auto ack on all data pipes.
Mask interrupt caused by RX_DR.
Enable the W_TX_PAYLOAD_NOACK command.
uint8_t read(Register reg)
Count lost packets (bits 4).
Default auto retransmit count (15)
virtual void output_power_level(int8_t dBm)
Enable dynamic payload length on all pipes.
Air data bitrate (2 Mbps).
Continuous carrier transmit.
void write(Register reg, const void *buf, size_t size)
Number of bytes in RX payload in data pipe 0.
RX/TX address field width (bits 2).
void transmit_mode(uint8_t dest)
No operation, return status.
uint8_t as_byte
Byte representation of status.
Data ready RX FIFO interrupt.
uint8_t rx_dr
Data ready RX FIFO interrupt.