Add nRF24 receive message buffering (#538)
* Add critical section support Allows defining a code block which is executed as a critical section. Supports AVR, ESP8266 & SAMD. * Add receive message buffering When MY_RF24_IRQ_PIN is defined (and connected), a buffer will be used to retrieve & store messages received by nRF24 as fast as possible. This reduces the chance of losing messages due to a busy microcontroller. nRF24 SPI rx message transfer is running from interrupt context when MY_RF24_IRQ_PIN is defined. If this transfer takes too long, serial characters received will get lost. Therefore serial rx is enabled during SPI transfer of nRF messages. Limitations: Only AVR/SAMD & nRF24L01+ combinations can buffer rx messages. nRF24L01+ IRQ pin should be connected to AVR. Tested on W5100- & Serial-gateway. SAMD has not been tested yet! * Fix Doxygen warnings * Fix more Doxygen warnings
This commit is contained in:
committed by
Olivier
parent
4695cc71dd
commit
99973a346e
+18
@@ -429,6 +429,22 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def MY_RF24_IRQ_PIN
|
||||
* @brief Disable RF24 interrupt pin usage by default. Override in sketch if needed.
|
||||
*/
|
||||
//#define MY_RF24_IRQ_PIN
|
||||
|
||||
/**
|
||||
* @def MY_RX_MESSAGE_BUFFER_SIZE
|
||||
* @brief Declare the amount of incoming messages that can be buffered. Requires MY_RADIO_NRF24 and MY_RF24_IRQ_PIN. Override in sketch if needed.
|
||||
*/
|
||||
#ifdef MY_RF24_IRQ_PIN
|
||||
#ifndef MY_RX_MESSAGE_BUFFER_SIZE
|
||||
#define MY_RX_MESSAGE_BUFFER_SIZE (20)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def MY_RF24_PA_LEVEL
|
||||
* @brief Default RF24 PA level. Override in sketch if needed.
|
||||
@@ -694,5 +710,7 @@
|
||||
#define MY_REGISTRATION_CONTROLLER
|
||||
#define MY_DEBUG_VERBOSE_RF24
|
||||
#define MY_TRANSPORT_SANITY_CHECK
|
||||
#define MY_RF24_IRQ_PIN
|
||||
#define MY_RX_MESSAGE_BUFFER_SIZE
|
||||
#define MY_NODE_LOCK_FEATURE
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user