SX1272Lib updated in order to be RTOS aware
Fork of SX1272Lib by
Since Semtech original SX1272 library used InterruptIn and Timout mbed-os classes, whose ISRs are not allowed to lock RTOS mutexes, any SPI-related operation was doomed to fail. Indeed, SPI transactions functions are always nested inside a spi-level mutex lock/unlock pair in order to provide for thread access safety. A typical case occurs for example when radio is set to sleep state after a RX timeout.
This fork solves such problems by mean of a EventQueue/Thread pair, where any InterruptIn and Timeout ISRs actually enqueue callback calls.
Take a look at usage example at https://github.com/maiorfi/mbedos_lablet_lora_1
Diff: sx1272/sx1272.h
- Revision:
- 3:5baff45eb3c5
- Parent:
- 0:45c4f0364ca4
- Child:
- 4:90bd79f1b458
--- a/sx1272/sx1272.h Wed Feb 17 09:17:18 2016 +0000 +++ b/sx1272/sx1272.h Thu Mar 10 10:20:44 2016 +0000 @@ -69,7 +69,7 @@ uint8_t boardConnected; //1 = SX1272MB1DCS; 0 = SX1272MB1DAS - uint8_t *rxBuffer; + uint8_t *rxtxBuffer; uint8_t currentOpMode;