diff --git a/src/modules/SX127x/SX127x.cpp b/src/modules/SX127x/SX127x.cpp index ccae2f27..9b8202be 100644 --- a/src/modules/SX127x/SX127x.cpp +++ b/src/modules/SX127x/SX127x.cpp @@ -366,6 +366,10 @@ int16_t SX127x::packetMode() { return(this->mod->SPIsetRegValue(RADIOLIB_SX127X_REG_PACKET_CONFIG_2, RADIOLIB_SX127X_DATA_MODE_PACKET, 6, 6)); } +int16_t SX127x::startReceive() { + return(this->startReceive(0, RADIOLIB_SX127X_RXCONTINUOUS)); +} + int16_t SX127x::startReceive(uint8_t len, uint8_t mode) { // set mode to standby int16_t state = setMode(RADIOLIB_SX127X_STANDBY); diff --git a/src/modules/SX127x/SX127x.h b/src/modules/SX127x/SX127x.h index ebc0fb19..f15338e3 100644 --- a/src/modules/SX127x/SX127x.h +++ b/src/modules/SX127x/SX127x.h @@ -770,14 +770,22 @@ class SX127x: public PhysicalLayer { \returns \ref status_codes */ int16_t finishTransmit() override; + + /*! + \brief Interrupt-driven receive method with default parameters. + Implemented for compatibility with PhysicalLayer. + \returns \ref status_codes + */ + int16_t startReceive(); /*! \brief Interrupt-driven receive method. DIO0 will be activated when full valid packet is received. - \param len Expected length of packet to be received. Required for LoRa spreading factor 6. - \param mode Receive mode to be used. Defaults to RxContinuous. + \param len Expected length of packet to be received, or 0 when unused. + Defaults to 0, non-zero required for LoRa spreading factor 6. + \param mode Receive mode to be used. \returns \ref status_codes */ - int16_t startReceive(uint8_t len = 0, uint8_t mode = RADIOLIB_SX127X_RXCONTINUOUS); + int16_t startReceive(uint8_t len, uint8_t mode); /*! \brief Interrupt-driven receive method, implemented for compatibility with PhysicalLayer.