This driver is a stripped down version of the Radiohead 1.45 driver, and covers fewer radios. Threading and an event queue have been added to make the ISR's more stable across architectures. Specifically The STM32L4 parts
Dependents: Threaded_LoRa_Modem
Diff: RHGenericDriver.cpp
- Revision:
- 1:dfeb5e8b199a
- Parent:
- 0:ab4e012489ef
--- a/RHGenericDriver.cpp Thu Oct 15 01:27:00 2015 +0000 +++ b/RHGenericDriver.cpp Fri Apr 30 15:16:24 2021 +0000 @@ -44,8 +44,10 @@ unsigned long starttime = millis(); while ((millis() - starttime) < timeout) { - if (available()) + if (available()){ return true; + } +// ThisThread::sleep_for(1); YIELD; } return false; @@ -53,8 +55,9 @@ bool RHGenericDriver::waitPacketSent() { - while (_mode == RHModeTx) + while (_mode == RHModeTx){ YIELD; // Wait for any previous transmit to finish + } return true; }