@@ -15,6 +15,10 @@ Maintainer: Miguel Luis and Gregory Cristian
1515#ifndef __RADIO_H__
1616#define __RADIO_H__
1717
18+ #define RADIO_IRQ_FLAG_RX_TIMEOUT ( 0x01 )
19+ #define RADIO_IRQ_FLAG_RX_DONE ( 0x02 )
20+ #define RADIO_IRQ_FLAG_RX_ERROR ( 0x04 )
21+
1822/*!
1923 * Radio driver supported modems
2024 */
@@ -159,12 +163,12 @@ struct Radio_s
159163 * FSK : N/A ( set to 0 )
160164 * LoRa: timeout in symbols
161165 * \param [IN] fixLen Fixed length packets [0: variable, 1: fixed]
162- * \param [IN] payloadLen Sets payload length when fixed lenght is used
166+ * \param [IN] payloadLen Sets payload length when fixed length is used
163167 * \param [IN] crcOn Enables/Disables the CRC [0: OFF, 1: ON]
164168 * \param [IN] FreqHopOn Enables disables the intra-packet frequency hopping
165169 * FSK : N/A ( set to 0 )
166170 * LoRa: [0: OFF, 1: ON]
167- * \param [IN] HopPeriod Number of symbols bewteen each hop
171+ * \param [IN] HopPeriod Number of symbols between each hop
168172 * FSK : N/A ( set to 0 )
169173 * LoRa: Number of symbols
170174 * \param [IN] iqInverted Inverts IQ signals (LoRa only)
@@ -207,7 +211,7 @@ struct Radio_s
207211 * \param [IN] FreqHopOn Enables disables the intra-packet frequency hopping
208212 * FSK : N/A ( set to 0 )
209213 * LoRa: [0: OFF, 1: ON]
210- * \param [IN] HopPeriod Number of symbols bewteen each hop
214+ * \param [IN] HopPeriod Number of symbols between each hop
211215 * FSK : N/A ( set to 0 )
212216 * LoRa: Number of symbols
213217 * \param [IN] iqInverted Inverts IQ signals (LoRa only)
@@ -228,14 +232,14 @@ struct Radio_s
228232 */
229233 bool ( * CheckRfFrequency )( uint32_t frequency );
230234 /*!
231- * \brief Computes the packet time on air in us for the given payload
235+ * \brief Computes the packet time on air in ms for the given payload
232236 *
233237 * \Remark Can only be called once SetRxConfig or SetTxConfig have been called
234238 *
235239 * \param [IN] modem Radio modem to be used [0: FSK, 1: LoRa]
236240 * \param [IN] pktLen Packet payload length
237241 *
238- * \retval airTime Computed airTime (us ) for the given packet payload length
242+ * \retval airTime Computed airTime (ms ) for the given packet payload length
239243 */
240244 uint32_t ( * TimeOnAir )( RadioModems_t modem , uint8_t pktLen );
241245 /*!
@@ -264,6 +268,14 @@ struct Radio_s
264268 * \brief Start a Channel Activity Detection
265269 */
266270 void ( * StartCad )( void );
271+ /*!
272+ * \brief Sets the radio in continuous wave transmission mode
273+ *
274+ * \param [IN]: freq Channel RF frequency
275+ * \param [IN]: power Sets the output power [dBm]
276+ * \param [IN]: time Transmission mode timeout [s]
277+ */
278+ void ( * SetTxContinuousWave )( uint32_t freq , int8_t power , uint16_t time );
267279 /*!
268280 * \brief Reads the current RSSI value
269281 *
@@ -306,8 +318,15 @@ struct Radio_s
306318 * \param [IN] modem Radio modem to be used [0: FSK, 1: LoRa]
307319 * \param [IN] max Maximum payload length in bytes
308320 */
309- void ( * SetMaxPayloadLength )( RadioModems_t modem , uint8_t max );
310-
321+ void ( * SetMaxPayloadLength )( RadioModems_t modem , uint8_t max );
322+ /*!
323+ * \brief Sets the network to public or private. Updates the sync byte.
324+ *
325+ * \remark Applies to LoRa modem only
326+ *
327+ * \param [IN] enable if true, it enables a public network
328+ */
329+ void ( * SetPublicNetwork )( bool enable );
311330};
312331
313332/*!
0 commit comments