@@ -33,10 +33,10 @@ typedef enum
3333 */
3434typedef enum
3535{
36- RF_IDLE = 0 ,
37- RF_RX_RUNNING ,
38- RF_TX_RUNNING ,
39- RF_CAD ,
36+ RF_IDLE = 0 , //!< The radio is idle
37+ RF_RX_RUNNING , //!< The radio is in reception state
38+ RF_TX_RUNNING , //!< The radio is in transmission state
39+ RF_CAD , //!< The radio is doing channel activity detection
4040}RadioState_t ;
4141
4242/*!
@@ -108,7 +108,7 @@ struct Radio_s
108108 /*!
109109 * \brief Configures the radio with the given modem
110110 *
111- * \param [IN] modem Modem to be used [0: FSK, 1: LoRa]
111+ * \param [IN] modem Modem to be used [0: FSK, 1: LoRa]
112112 */
113113 void ( * SetModem )( RadioModems_t modem );
114114 /*!
@@ -118,19 +118,20 @@ struct Radio_s
118118 */
119119 void ( * SetChannel )( uint32_t freq );
120120 /*!
121- * \brief Sets the channels configuration
121+ * \brief Checks if the channel is free for the given time
122122 *
123123 * \param [IN] modem Radio modem to be used [0: FSK, 1: LoRa]
124124 * \param [IN] freq Channel RF frequency
125125 * \param [IN] rssiThresh RSSI threshold
126+ * \param [IN] maxCarrierSenseTime Max time while the RSSI is measured
126127 *
127128 * \retval isFree [true: Channel is free, false: Channel is not free]
128129 */
129- bool ( * IsChannelFree )( RadioModems_t modem , uint32_t freq , int16_t rssiThresh );
130+ bool ( * IsChannelFree )( RadioModems_t modem , uint32_t freq , int16_t rssiThresh , uint32_t maxCarrierSenseTime );
130131 /*!
131132 * \brief Generates a 32 bits random value based on the RSSI readings
132133 *
133- * \remark This function sets the radio in LoRa modem mode and disables
134+ * \remark This function sets the radio in LoRa modem mode and disables
134135 * all interrupts.
135136 * After calling this function either Radio.SetRxConfig or
136137 * Radio.SetTxConfig functions must be called.
@@ -145,30 +146,30 @@ struct Radio_s
145146 * \param [IN] bandwidth Sets the bandwidth
146147 * FSK : >= 2600 and <= 250000 Hz
147148 * LoRa: [0: 125 kHz, 1: 250 kHz,
148- * 2: 500 kHz, 3: Reserved]
149+ * 2: 500 kHz, 3: Reserved]
149150 * \param [IN] datarate Sets the Datarate
150151 * FSK : 600..300000 bits/s
151152 * LoRa: [6: 64, 7: 128, 8: 256, 9: 512,
152153 * 10: 1024, 11: 2048, 12: 4096 chips]
153154 * \param [IN] coderate Sets the coding rate (LoRa only)
154155 * FSK : N/A ( set to 0 )
155- * LoRa: [1: 4/5, 2: 4/6, 3: 4/7, 4: 4/8]
156- * \param [IN] bandwidthAfc Sets the AFC Bandwidth (FSK only)
156+ * LoRa: [1: 4/5, 2: 4/6, 3: 4/7, 4: 4/8]
157+ * \param [IN] bandwidthAfc Sets the AFC Bandwidth (FSK only)
157158 * FSK : >= 2600 and <= 250000 Hz
158- * LoRa: N/A ( set to 0 )
159+ * LoRa: N/A ( set to 0 )
159160 * \param [IN] preambleLen Sets the Preamble length
160- * FSK : Number of bytes
161+ * FSK : Number of bytes
161162 * LoRa: Length in symbols (the hardware adds 4 more symbols)
162- * \param [IN] symbTimeout Sets the RxSingle timeout value (LoRa only)
163- * FSK : N/A ( set to 0 )
163+ * \param [IN] symbTimeout Sets the RxSingle timeout value
164+ * FSK : timeout in number of bytes
164165 * LoRa: timeout in symbols
165166 * \param [IN] fixLen Fixed length packets [0: variable, 1: fixed]
166167 * \param [IN] payloadLen Sets payload length when fixed length is used
167168 * \param [IN] crcOn Enables/Disables the CRC [0: OFF, 1: ON]
168- * \param [IN] FreqHopOn Enables disables the intra-packet frequency hopping
169+ * \param [IN] freqHopOn Enables disables the intra-packet frequency hopping
169170 * FSK : N/A ( set to 0 )
170171 * LoRa: [0: OFF, 1: ON]
171- * \param [IN] HopPeriod Number of symbols between each hop
172+ * \param [IN] hopPeriod Number of symbols between each hop
172173 * FSK : N/A ( set to 0 )
173174 * LoRa: Number of symbols
174175 * \param [IN] iqInverted Inverts IQ signals (LoRa only)
@@ -182,48 +183,48 @@ struct Radio_s
182183 uint32_t bandwidthAfc , uint16_t preambleLen ,
183184 uint16_t symbTimeout , bool fixLen ,
184185 uint8_t payloadLen ,
185- bool crcOn , bool FreqHopOn , uint8_t HopPeriod ,
186+ bool crcOn , bool freqHopOn , uint8_t hopPeriod ,
186187 bool iqInverted , bool rxContinuous );
187188 /*!
188189 * \brief Sets the transmission parameters
189190 *
190- * \param [IN] modem Radio modem to be used [0: FSK, 1: LoRa]
191+ * \param [IN] modem Radio modem to be used [0: FSK, 1: LoRa]
191192 * \param [IN] power Sets the output power [dBm]
192193 * \param [IN] fdev Sets the frequency deviation (FSK only)
193194 * FSK : [Hz]
194195 * LoRa: 0
195196 * \param [IN] bandwidth Sets the bandwidth (LoRa only)
196197 * FSK : 0
197198 * LoRa: [0: 125 kHz, 1: 250 kHz,
198- * 2: 500 kHz, 3: Reserved]
199+ * 2: 500 kHz, 3: Reserved]
199200 * \param [IN] datarate Sets the Datarate
200201 * FSK : 600..300000 bits/s
201202 * LoRa: [6: 64, 7: 128, 8: 256, 9: 512,
202203 * 10: 1024, 11: 2048, 12: 4096 chips]
203204 * \param [IN] coderate Sets the coding rate (LoRa only)
204205 * FSK : N/A ( set to 0 )
205- * LoRa: [1: 4/5, 2: 4/6, 3: 4/7, 4: 4/8]
206+ * LoRa: [1: 4/5, 2: 4/6, 3: 4/7, 4: 4/8]
206207 * \param [IN] preambleLen Sets the preamble length
207- * FSK : Number of bytes
208+ * FSK : Number of bytes
208209 * LoRa: Length in symbols (the hardware adds 4 more symbols)
209210 * \param [IN] fixLen Fixed length packets [0: variable, 1: fixed]
210211 * \param [IN] crcOn Enables disables the CRC [0: OFF, 1: ON]
211- * \param [IN] FreqHopOn Enables disables the intra-packet frequency hopping
212+ * \param [IN] freqHopOn Enables disables the intra-packet frequency hopping
212213 * FSK : N/A ( set to 0 )
213214 * LoRa: [0: OFF, 1: ON]
214- * \param [IN] HopPeriod Number of symbols between each hop
215+ * \param [IN] hopPeriod Number of symbols between each hop
215216 * FSK : N/A ( set to 0 )
216217 * LoRa: Number of symbols
217218 * \param [IN] iqInverted Inverts IQ signals (LoRa only)
218219 * FSK : N/A ( set to 0 )
219220 * LoRa: [0: not inverted, 1: inverted]
220221 * \param [IN] timeout Transmission timeout [ms]
221222 */
222- void ( * SetTxConfig )( RadioModems_t modem , int8_t power , uint32_t fdev ,
223+ void ( * SetTxConfig )( RadioModems_t modem , int8_t power , uint32_t fdev ,
223224 uint32_t bandwidth , uint32_t datarate ,
224225 uint8_t coderate , uint16_t preambleLen ,
225- bool fixLen , bool crcOn , bool FreqHopOn ,
226- uint8_t HopPeriod , bool iqInverted , uint32_t timeout );
226+ bool fixLen , bool crcOn , bool freqHopOn ,
227+ uint8_t hopPeriod , bool iqInverted , uint32_t timeout );
227228 /*!
228229 * \brief Checks if the given RF frequency is supported by the hardware
229230 *
0 commit comments