Skip to content

Commit 03a3013

Browse files
author
Hasnain Virk
committed
Deprecating receive(uint32_t) API
We are deprecating receive(uint32_t) API in favour of receive(void) API because we are ditching software timeout timers in the driver for RX chain.
1 parent 7325b3e commit 03a3013

File tree

4 files changed

+36
-4
lines changed

4 files changed

+36
-4
lines changed

SX1272/SX1272_LoRaRadio.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -865,7 +865,7 @@ void SX1272_LoRaRadio::transmit(uint32_t timeout)
865865
* and finally a DIO0 interrupt let's the state machine know that a packet is
866866
* ready to be read from the FIFO
867867
*/
868-
void SX1272_LoRaRadio::receive(uint32_t)
868+
void SX1272_LoRaRadio::receive(void)
869869
{
870870
switch (_rf_settings.modem) {
871871
case MODEM_FSK:

SX1272/SX1272_LoRaRadio.h

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,10 +200,26 @@ class SX1272_LoRaRadio: public LoRaRadio {
200200
* setting the receiver in continuous mode is by using set_rx_config()
201201
* API.
202202
*
203+
* NOTE: This API will be deprecated
204+
*
203205
* @param timeout Reception timeout [ms]
204206
*
205207
*/
206-
virtual void receive(uint32_t /**timeout**/);
208+
MBED_DEPRECATED_SINCE("mbed-os-5.10", "receive(uint32_t) will be deprecated. "
209+
"Use receive(void) instead")
210+
virtual void receive(uint32_t timeout)
211+
{
212+
(void) timeout;
213+
receive();
214+
}
215+
216+
/**
217+
* Sets the radio to receive
218+
*
219+
* All necessary configuration options for receptions are set in
220+
* 'set_rx_config(parameters)' API.
221+
*/
222+
virtual void receive(void);
207223

208224
/**
209225
* Sets the carrier frequency

SX1276/SX1276_LoRaRadio.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -844,7 +844,7 @@ void SX1276_LoRaRadio::standby( void )
844844
* and finally a DIO0 interrupt let's the state machine know that a packet is
845845
* ready to be read from the FIFO
846846
*/
847-
void SX1276_LoRaRadio::receive(uint32_t)
847+
void SX1276_LoRaRadio::receive(void)
848848
{
849849
switch (_rf_settings.modem) {
850850
case MODEM_FSK:

SX1276/SX1276_LoRaRadio.h

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,10 +215,26 @@ class SX1276_LoRaRadio: public LoRaRadio {
215215
* setting the receiver in continuous mode is by using set_rx_config()
216216
* API.
217217
*
218+
* NOTE: This API will be deprecated
219+
*
218220
* @param timeout Reception timeout [ms]
219221
*
220222
*/
221-
virtual void receive(uint32_t /**timeout**/);
223+
MBED_DEPRECATED_SINCE("mbed-os-5.10", "receive(uint32_t) will be deprecated. "
224+
"Use receive(void) instead")
225+
virtual void receive(uint32_t timeout)
226+
{
227+
(void) timeout;
228+
receive();
229+
}
230+
231+
/**
232+
* Sets the radio to receive
233+
*
234+
* All necessary configuration options for receptions are set in
235+
* 'set_rx_config(parameters)' API.
236+
*/
237+
virtual void receive(void);
222238

223239
/**
224240
* Sets the carrier frequency

0 commit comments

Comments
 (0)