Hexmodal SX1276lib
Dependents: LoRaWAN-hello-world_Class_C_Anish
Diff: radio/radio.h
- Revision:
- 7:2b555111463f
- Parent:
- 6:e7f02929cd3d
- Child:
- 11:ce0cdab5137a
--- a/radio/radio.h Thu Sep 04 14:03:20 2014 +0000 +++ b/radio/radio.h Fri Sep 19 14:16:35 2014 +0000 @@ -50,7 +50,7 @@ * FSK : N/A ( set to 0 ) * LoRa: SNR value in dB */ - void ( *rxDone ) ( uint8_t *payload, uint16_t size, int8_t rssi, int8_t snr ); + void ( *rxDone ) ( uint8_t *payload, uint16_t size, int16_t rssi, int8_t snr ); /*! * @brief Rx Timeout callback prototype. @@ -68,6 +68,11 @@ * \param [IN] CurrentChannel Index number of the current channel */ void ( *fhssChangeChannel )( uint8_t CurrentChannel ); + + /*! + * @brief CAD Done callback prototype. + */ + void ( *cadDone ) ( ); public: //------------------------------------------------------------------------- @@ -81,8 +86,8 @@ * @param [IN] rxTimeout * @param [IN] rxError */ - Radio( void ( *txDone )( ), void ( *txTimeout ) ( ), void ( *rxDone ) ( uint8_t *payload, uint16_t size, int8_t rssi, int8_t snr ), - void ( *rxTimeout ) ( ), void ( *rxError ) ( ), void ( *fhssChangeChannel ) ( uint8_t channelIndex ) ); + Radio( 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 ) ( ) ); virtual ~Radio( ) {}; //------------------------------------------------------------------------- @@ -239,7 +244,12 @@ /*! * @brief Sets the radio in standby mode */ - virtual void Standby( void )= 0; + virtual void Standby( void ) = 0; + + /*! + * @brief Sets the radio in CAD mode + */ + virtual void StartCad( void ) = 0; /*! * @brief Sets the radio in reception mode for the given time @@ -260,7 +270,7 @@ * * @retval rssiValue Current RSSI value in [dBm] */ - virtual int8_t GetRssi ( ModemType modem ) = 0; + virtual int16_t GetRssi ( ModemType modem ) = 0; /*! * @brief Writes the radio register at the specified address