Based on SX1276Lib. Simplified and targeted for Modtronix inAir modules. All pins can now be specified to use interrupts or general purpose I/O pins.
radio.cpp@10:0bf8f2dbefb7, 2016-08-19 (annotated)
- Committer:
- modtronix-com
- Date:
- Fri Aug 19 15:50:18 2016 +1000
- Revision:
- 10:0bf8f2dbefb7
- Parent:
- 9:9a77e2c7c5e8
Added tag v1.1 for changeset 9a77e2c7c5e8
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
modtronix | 1:64a9c4a03244 | 1 | /* |
modtronix | 1:64a9c4a03244 | 2 | / _____) _ | | |
modtronix | 1:64a9c4a03244 | 3 | ( (____ _____ ____ _| |_ _____ ____| |__ |
modtronix | 1:64a9c4a03244 | 4 | \____ \| ___ | (_ _) ___ |/ ___) _ \ |
modtronix | 1:64a9c4a03244 | 5 | _____) ) ____| | | || |_| ____( (___| | | | |
modtronix | 1:64a9c4a03244 | 6 | (______/|_____)_|_|_| \__)_____)\____)_| |_| |
modtronix | 1:64a9c4a03244 | 7 | ( C )2014 Semtech |
modtronix | 1:64a9c4a03244 | 8 | |
modtronix | 1:64a9c4a03244 | 9 | Description: Interface for the radios, contains the main functions that a radio needs, and 5 callback functions |
modtronix | 1:64a9c4a03244 | 10 | |
modtronix | 1:64a9c4a03244 | 11 | License: Revised BSD License, see LICENSE.TXT file include in the project |
modtronix | 1:64a9c4a03244 | 12 | |
modtronix | 1:64a9c4a03244 | 13 | Maintainers: Miguel Luis, Gregory Cristian and Nicolas Huguenin |
modtronix | 1:64a9c4a03244 | 14 | */ |
modtronix-com |
9:9a77e2c7c5e8 | 15 | #include "mbed.h" |
modtronix | 1:64a9c4a03244 | 16 | #include "radio.h" |
modtronix | 1:64a9c4a03244 | 17 | |
modtronix | 1:64a9c4a03244 | 18 | Radio::Radio( void ( *txDone )( ), void ( *txTimeout ) ( ), void ( *rxDone ) ( uint8_t *payload, uint16_t size, int16_t rssi, int8_t snr ), |
modtronix | 1:64a9c4a03244 | 19 | void ( *rxTimeout ) ( ), void ( *rxError ) ( ), void ( *fhssChangeChannel ) ( uint8_t channelIndex ), void ( *cadDone ) ( bool channelActivityDetected ) ) |
modtronix | 1:64a9c4a03244 | 20 | { |
modtronix | 1:64a9c4a03244 | 21 | this->txDone = txDone; |
modtronix | 1:64a9c4a03244 | 22 | this->txTimeout = txTimeout; |
modtronix | 1:64a9c4a03244 | 23 | this->rxDone = rxDone; |
modtronix | 1:64a9c4a03244 | 24 | this->rxTimeout = rxTimeout; |
modtronix | 1:64a9c4a03244 | 25 | this->rxError = rxError; |
modtronix | 1:64a9c4a03244 | 26 | this->fhssChangeChannel = fhssChangeChannel; |
modtronix | 1:64a9c4a03244 | 27 | this->cadDone = cadDone; |
modtronix | 1:64a9c4a03244 | 28 | } |
modtronix | 1:64a9c4a03244 | 29 |