LoRa gateway to link to Raspberry - Working ok
Fork of SX1276GenericLib by
Diff: sx1276/sx1276.h
- Revision:
- 21:2e496deb7858
- Parent:
- 20:e05596ba4166
- Child:
- 22:7f3aab69cca9
diff -r e05596ba4166 -r 2e496deb7858 sx1276/sx1276.h --- a/sx1276/sx1276.h Tue Oct 20 12:58:58 2015 +0000 +++ b/sx1276/sx1276.h Thu Nov 26 10:39:03 2015 +0000 @@ -110,21 +110,25 @@ void RxChainCalibration( void ); public: - SX1276( void ( *txDone )( ), void ( *txTimeout ) ( ), void ( *rxDone ) ( uint8_t *payload, uint16_t size, int16_t rssi, int8_t snr ), - void ( *rxTimeout ) ( ), void ( *rxError ) ( ), void ( *fhssChangeChannel ) ( uint8_t channelIndex ), void ( *cadDone ) ( bool channelActivityDetected ), + SX1276( RadioEvents_t *events, PinName mosi, PinName miso, PinName sclk, PinName nss, PinName reset, PinName dio0, PinName dio1, PinName dio2, PinName dio3, PinName dio4, PinName dio5 ); - SX1276( void ( *txDone )( ), void ( *txTimeout ) ( ), void ( *rxDone ) ( uint8_t *payload, uint16_t size, int16_t rssi, int8_t snr ), - void ( *rxTimeout ) ( ), void ( *rxError ) ( ), void ( *fhssChangeChannel ) ( uint8_t channelIndex ), void ( *cadDone ) ( bool channelActivityDetected ) ); + SX1276( RadioEvents_t *events ); virtual ~SX1276( ); //------------------------------------------------------------------------- // Redefined Radio functions //------------------------------------------------------------------------- /*! + * @brief Initializes the radio + * + * @param [IN] events Structure containing the driver callback functions + */ + virtual void Init( RadioEvents_t *events ); + /*! * Return current radio status * - * @param status Radio status. [IDLE, RX_RUNNING, TX_RUNNING] + * @param status Radio status. [RF_IDLE, RX_RUNNING, TX_RUNNING] */ virtual RadioState GetStatus( void ); @@ -497,4 +501,3 @@ }; #endif //__SX1276_H__ -