Optimized high speed nRF24L01+ driver class documentation v1.5.0
TMRh20 2020 - Optimized fork of the nRF24L01+ driver
|
Enumerations | |
enum | rf24_irq_flags_e { RF24_IRQ_NONE = 0 , RF24_TX_DF = 1 << MASK_MAX_RT , RF24_TX_DS = 1 << TX_DS , RF24_RX_DR = 1 << RX_DR , RF24_IRQ_ALL = (1 << MASK_MAX_RT) | (1 << TX_DS) | (1 << RX_DR) } |
An enumeration of constants used to configure Status flags. More... | |
Advanced Operation | |
Methods you can use to drive the chip in more advanced ways | |
uint8_t | RF24::clearStatusFlags (uint8_t flags=RF24_IRQ_ALL) |
void | RF24::setStatusFlags (uint8_t flags=RF24_IRQ_NONE) |
uint8_t | RF24::getStatusFlags () |
uint8_t | RF24::update () |
enum rf24_irq_flags_e |
An enumeration of constants used to configure Status flags.
Enumerator | |
---|---|
RF24_IRQ_NONE | An alias of |
RF24_TX_DF | Represents an event where TX Data Failed to send. |
RF24_TX_DS | Represents an event where TX Data Sent successfully. |
RF24_RX_DR | Represents an event where RX Data is Ready to |
RF24_IRQ_ALL | Equivalent to |
uint8_t RF24::clearStatusFlags | ( | uint8_t | flags = RF24_IRQ_ALL | ) |
Clear the Status flags that caused an interrupt event.
whatHappened()
because it also returns the Status flags that caused the interrupt event. However, this function returns a STATUS byte instead of bit-banging into 3 1-byte booleans passed by reference.flags | The IRQ flags to clear. Default value is all of them (RF24_IRQ_ALL ). Multiple flags can be cleared by OR-ing rf24_irq_flags_e values together. |
void RF24::setStatusFlags | ( | uint8_t | flags = RF24_IRQ_NONE | ) |
Set which flags shall be reflected on the radio's IRQ pin.
flags | A value of rf24_irq_flags_e to influence the radio's IRQ pin. The default value (RF24_IRQ_NONE ) will disable the radio's IRQ pin. Multiple events can be enabled by OR-ing rf24_irq_flags_e values together. radio.setStatusFlags(RF24_IRQ_ALL);
// is equivalent to
|
uint8_t RF24::getStatusFlags | ( | ) |
Get the latest STATUS byte returned from the last SPI transaction.
RF24::update()
instead to get a fresh copy of the Status flags at the slight cost of performance.uint8_t RF24::update | ( | ) |
Get an updated STATUS byte from the radio.