Correction in RX config error. If REG_LR_PAYLOADLENGTH and REG_LR_PAYLOADMAXLENGTH is not set, the RX is limited to 64 bytes.
Fork of SX1276Lib by
Diff: radio/radio.h
- Revision:
- 22:7f3aab69cca9
- Parent:
- 21:2e496deb7858
diff -r 2e496deb7858 -r 7f3aab69cca9 radio/radio.h --- a/radio/radio.h Thu Nov 26 10:39:03 2015 +0000 +++ b/radio/radio.h Thu Nov 26 16:55:15 2015 +0000 @@ -4,7 +4,7 @@ \____ \| ___ | (_ _) ___ |/ ___) _ \ _____) ) ____| | | || |_| ____( (___| | | | (______/|_____)_|_|_| \__)_____)\____)_| |_| - ( C )2014 Semtech + (C) 2014 Semtech Description: Interface for the radios, contains the main functions that a radio needs, and 5 callback functions @@ -109,7 +109,7 @@ * * @param [IN] modem Modem to be used [0: FSK, 1: LoRa] */ - virtual void SetModem( ModemType modem ) = 0; + virtual void SetModem( RadioModems_t modem ) = 0; /*! * @brief Sets the channel frequency @@ -127,7 +127,7 @@ * * @retval isFree [true: Channel is free, false: Channel is not free] */ - virtual bool IsChannelFree( ModemType modem, uint32_t freq, int8_t rssiThresh ) = 0; + virtual bool IsChannelFree( RadioModems_t modem, uint32_t freq, int16_t rssiThresh ) = 0; /*! * @brief Generates a 32 bits random value based on the RSSI readings @@ -176,7 +176,7 @@ * @param [IN] rxContinuous Sets the reception in continuous mode * [false: single mode, true: continuous mode] */ - virtual void SetRxConfig ( ModemType modem, uint32_t bandwidth, + virtual void SetRxConfig ( RadioModems_t modem, uint32_t bandwidth, uint32_t datarate, uint8_t coderate, uint32_t bandwidthAfc, uint16_t preambleLen, uint16_t symbTimeout, bool fixLen, @@ -213,7 +213,7 @@ * LoRa: [0: not inverted, 1: inverted] * @param [IN] timeout Transmission timeout [us] */ - virtual void SetTxConfig( ModemType modem, int8_t power, uint32_t fdev, + virtual void SetTxConfig( RadioModems_t modem, int8_t power, uint32_t fdev, uint32_t bandwidth, uint32_t datarate, uint8_t coderate, uint16_t preambleLen, bool fixLen, bool crcOn, bool freqHopOn, @@ -237,7 +237,7 @@ * * @retval airTime Computed airTime for the given packet payload length */ - virtual double TimeOnAir ( ModemType modem, uint8_t pktLen ) = 0; + virtual double TimeOnAir ( RadioModems_t modem, uint8_t pktLen ) = 0; /*! * @brief Sends the buffer of size. Prepares the packet to be sent and sets @@ -282,7 +282,7 @@ * * @retval rssiValue Current RSSI value in [dBm] */ - virtual int16_t GetRssi ( ModemType modem ) = 0; + virtual int16_t GetRssi ( RadioModems_t modem ) = 0; /*! * @brief Writes the radio register at the specified address @@ -340,7 +340,7 @@ * @param [IN] modem Radio modem to be used [0: FSK, 1: LoRa] * @param [IN] max Maximum payload length in bytes */ - virtual void SetMaxPayloadLength( ModemType modem, uint8_t max ) = 0; + virtual void SetMaxPayloadLength( RadioModems_t modem, uint8_t max ) = 0; }; #endif // __RADIO_H__