Skip to content

Commit d135987

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 d135987

File tree

4 files changed

+28
-22
lines changed

4 files changed

+28
-22
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: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -192,18 +192,21 @@ class SX1272_LoRaRadio: public LoRaRadio {
192192
virtual void send(uint8_t *buffer, uint8_t size);
193193

194194
/**
195-
* Sets the radio in reception mode for the given time
196-
*
197-
* It should be noted that if the timeout is set to 0, it essentially
198-
* puts the receiver in continuous mode and hence from thereon it should
199-
* be treated as if in continuous mode. However, an appropriate way of
200-
* setting the receiver in continuous mode is by using set_rx_config()
201-
* API.
202-
*
203-
* @param timeout Reception timeout [ms]
195+
* For backwards compatibility
196+
*/
197+
virtual void receive(uint32_t timeout)
198+
{
199+
(void) timeout;
200+
receive();
201+
}
202+
203+
/**
204+
* Sets the radio to receive
204205
*
206+
* All necessary configuration options for receptions are set in
207+
* 'set_rx_config(parameters)' API.
205208
*/
206-
virtual void receive(uint32_t /**timeout**/);
209+
virtual void receive(void);
207210

208211
/**
209212
* 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: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -207,18 +207,21 @@ class SX1276_LoRaRadio: public LoRaRadio {
207207
virtual void send(uint8_t *buffer, uint8_t size);
208208

209209
/**
210-
* Sets the radio in reception mode for the given time
211-
*
212-
* It should be noted that if the timeout is set to 0, it essentially
213-
* puts the receiver in continuous mode and hence from thereon it should
214-
* be treated as if in continuous mode. However, an appropriate way of
215-
* setting the receiver in continuous mode is by using set_rx_config()
216-
* API.
217-
*
218-
* @param timeout Reception timeout [ms]
210+
* For backwards compatibility
211+
*/
212+
virtual void receive(uint32_t timeout)
213+
{
214+
(void) timeout;
215+
receive();
216+
}
217+
218+
/**
219+
* Sets the radio to receive
219220
*
221+
* All necessary configuration options for reception are set in
222+
* 'set_rx_config(parameters)' API.
220223
*/
221-
virtual void receive(uint32_t /**timeout**/);
224+
virtual void receive(void);
222225

223226
/**
224227
* Sets the carrier frequency

0 commit comments

Comments
 (0)