SX1272Lib updated in order to be RTOS aware

Fork of SX1272Lib by Semtech

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

Committer:
Lorenzo Maiorfi
Date:
Sat Mar 03 18:07:30 2018 +0100
Revision:
11:866b939cf709
Parent:
0:45c4f0364ca4
Fix debug

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mluis 0:45c4f0364ca4 1 /*
mluis 0:45c4f0364ca4 2 / _____) _ | |
mluis 0:45c4f0364ca4 3 ( (____ _____ ____ _| |_ _____ ____| |__
mluis 0:45c4f0364ca4 4 \____ \| ___ | (_ _) ___ |/ ___) _ \
mluis 0:45c4f0364ca4 5 _____) ) ____| | | || |_| ____( (___| | | |
mluis 0:45c4f0364ca4 6 (______/|_____)_|_|_| \__)_____)\____)_| |_|
mluis 0:45c4f0364ca4 7 (C) 2015 Semtech
mluis 0:45c4f0364ca4 8
mluis 0:45c4f0364ca4 9 Description: Interface for the radios, contains the main functions that a radio needs, and 5 callback functions
mluis 0:45c4f0364ca4 10
mluis 0:45c4f0364ca4 11 License: Revised BSD License, see LICENSE.TXT file include in the project
mluis 0:45c4f0364ca4 12
mluis 0:45c4f0364ca4 13 Maintainers: Miguel Luis, Gregory Cristian and Nicolas Huguenin
mluis 0:45c4f0364ca4 14 */
mluis 0:45c4f0364ca4 15 #include "radio.h"
mluis 0:45c4f0364ca4 16
mluis 0:45c4f0364ca4 17 Radio::Radio( RadioEvents_t *events )
mluis 0:45c4f0364ca4 18 {
mluis 0:45c4f0364ca4 19 this->RadioEvents = events;
mluis 0:45c4f0364ca4 20 }