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: debug/sx1272-debug.h
- Revision:
- 11:866b939cf709
- Parent:
- 8:1002d3025eaa
diff -r bd29cdff8f3e -r 866b939cf709 debug/sx1272-debug.h --- a/debug/sx1272-debug.h Sat Feb 24 08:47:30 2018 +0100 +++ b/debug/sx1272-debug.h Sat Mar 03 18:07:30 2018 +0100 @@ -21,7 +21,7 @@ /** @file debug.h */ -#ifndef NDEBUG +#ifdef SX127x_DEBUG_ENABLED #include <stdarg.h> #include <stdio.h>