22 #if !defined(BOARD_ATTINYX5) 26 #include <util/delay.h> 32 SPI::Driver(csn,
SPI::ACTIVE_LOW,
SPI::DIV4_CLOCK, 0,
SPI::MSB_ORDER, &m_irq),
37 m_state(POWER_DOWN_STATE),
261 if (data_sent)
return (len);
276 return (
send(dest, port, vec));
293 void* buf,
size_t size,
addr_t m_addr
Current network and device address.
uint8_t tx_full
TX FIFO full.
uint8_t transfer(uint8_t data)
State m_state
Transceiver state.
Setup of auto retransmission.
Data send TX FIFO interrupt.
NRF24L01P(uint16_t net, uint8_t dev, Board::DigitalPin csn=Board::D10, Board::DigitalPin ce=Board::D9, Board::ExternalInterruptPin irq=Board::EXT0)
uint8_t plos_cnt
Count lost packets.
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.
void acquire(Driver *dev)
IRQPin m_irq
Chip interrupt pin and handler.
static const uint16_t Tpd2stby_ms
virtual bool begin(const void *config=NULL)
uint8_t max_rt
Max number of TX retransmit interrupt.
uint16_t m_trans
Send count.
void read(void *buf, size_t count)
uint8_t m_channel
Current channel (device dependent.
static const size_t PAYLOAD_MAX
uint8_t m_dest
Latest message destination device address.
friend IOStream & operator<<(IOStream &outs, status_t status)
Maximum number of TX retransmits interrupt.
observe_tx_t read_observe_tx()
Disable AUTOACK on this specific packet.
static const size_t DEVICE_PAYLOAD_MAX
uint8_t rx_empty
RX FIFO empty flag.
uint8_t device
Device address (LSB).
static uint32_t since(uint32_t start)
uint8_t rx_full
RX FIFO full flag.
uint8_t tx_ds
Data send TX FIFO interrupt.
void(* delay)(uint32_t ms)
int16_t network
Network address.
Enable dynamic payload length.
void write(const void *buf, size_t count)
static const uint16_t Tstby2a_us
uint8_t arc_cnt
Count retransmitted packets.
fifo_status_t read_fifo_status()
uint8_t rx_p_no
Data pipe number for available payload.
status_t m_status
Latest status.
uint8_t tx_full
TX FIFO full flag.
virtual int send(uint8_t dest, uint8_t port, const iovec_t *vec)
Enable dynamic payload length.
static const uint8_t BROADCAST
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)
OutputPin m_ce
Chip enable activity RX/TX select pin.
Enable the W_TX_PAYLOAD_NOACK command.
Default auto retransmit count (15)
virtual void output_power_level(int8_t dBm)
Enable dynamic payload length on all pipes.
uint8_t tx_reuse
Reuse last transmitted data packat.
void transmit_mode(uint8_t dest)
No operation, return status.
uint8_t tx_empty
TX FIFO empty flag.
Data ready RX FIFO interrupt.
void iovec_arg(iovec_t *&vp, const void *buf, size_t size)
void iovec_end(iovec_t *&vp)
uint8_t rx_dr
Data ready RX FIFO interrupt.
size_t iovec_size(const iovec_t *vec)