Improvements to the nrf_to_nrf Library for Direct Radio Comms with nRF24, nRF52x & nRF54x Radios
Making use of the Radio Interrupt Handling
With version 1.7.0 of the nrf_to_nrf library, radio interrupt handling is enabled by default. This means that the software will no longer lose packets if the main loop is busy doing other things, the radio will interrupt the main loop, handle the packets, then return.
All available functionality should remain the same, so if users encounter any problems, please log an issue at https://github.com/TMRh20/nrf_to_nrf
I've also added two new functions, to handle the functionality:
bool enableRxInterrupt(uint8_t depth = 3);
void disableRxInterrupt();
The above enableRxInterrupt() call would enable the interrupts, with a buffer of 3, so 3 separate radio payloads would be buffered if the main loop is busy, the remaining packet in the radio buffer would be left as-is, until buffer space is available.
This can be set to any value from 2 to 254, but must be disabled by calling disableRxInterrupt, before making changes. Since it is enabled by default, setting it at startup would also require a call to disableRxInterrupt
The new software v1.7.0 has been released on Arduino & PlatformIO

No comments:
Post a Comment