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@1:64a9c4a03244, 2015-08-30 (annotated)
- Committer:
- modtronix
- Date:
- Sun Aug 30 09:39:25 2015 +1000
- Revision:
- 1:64a9c4a03244
- Child:
- 9:9a77e2c7c5e8
Initial version
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 | 1:64a9c4a03244 | 15 | #include "radio.h" |
modtronix | 1:64a9c4a03244 | 16 | |
modtronix | 1:64a9c4a03244 | 17 | Radio::Radio( void ( *txDone )( ), void ( *txTimeout ) ( ), void ( *rxDone ) ( uint8_t *payload, uint16_t size, int16_t rssi, int8_t snr ), |
modtronix | 1:64a9c4a03244 | 18 | void ( *rxTimeout ) ( ), void ( *rxError ) ( ), void ( *fhssChangeChannel ) ( uint8_t channelIndex ), void ( *cadDone ) ( bool channelActivityDetected ) ) |
modtronix | 1:64a9c4a03244 | 19 | { |
modtronix | 1:64a9c4a03244 | 20 | this->txDone = txDone; |
modtronix | 1:64a9c4a03244 | 21 | this->txTimeout = txTimeout; |
modtronix | 1:64a9c4a03244 | 22 | this->rxDone = rxDone; |
modtronix | 1:64a9c4a03244 | 23 | this->rxTimeout = rxTimeout; |
modtronix | 1:64a9c4a03244 | 24 | this->rxError = rxError; |
modtronix | 1:64a9c4a03244 | 25 | this->fhssChangeChannel = fhssChangeChannel; |
modtronix | 1:64a9c4a03244 | 26 | this->cadDone = cadDone; |
modtronix | 1:64a9c4a03244 | 27 | } |
modtronix | 1:64a9c4a03244 | 28 |