diff --git a/src/modules/SX126x.cpp b/src/modules/SX126x.cpp index aa857e42..f3d1e744 100644 --- a/src/modules/SX126x.cpp +++ b/src/modules/SX126x.cpp @@ -322,6 +322,10 @@ int16_t SX126x::sleep() { return(state); } +int16_t SX126x::standby() { + return(SX126x::standby(SX126X_STANDBY_RC)); +} + int16_t SX126x::standby(uint8_t mode) { uint8_t data[] = {mode}; return(SPIwriteCommand(SX126X_CMD_SET_STANDBY, data, 1)); diff --git a/src/modules/SX126x.h b/src/modules/SX126x.h index c3f7170f..9bcd6187 100644 --- a/src/modules/SX126x.h +++ b/src/modules/SX126x.h @@ -410,7 +410,7 @@ class SX126x: public PhysicalLayer { int16_t transmitDirect(uint32_t frf = 0); /*! - \brief Starts direct mode reception. Only implemented for PhysicalLyer compatibility, as %SX126x series does not support direct mode reception. + \brief Starts direct mode reception. Only implemented for PhysicalLayer compatibility, as %SX126x series does not support direct mode reception. Will always return ERR_UNKNOWN. \returns \ref status_codes @@ -432,13 +432,20 @@ class SX126x: public PhysicalLayer { int16_t sleep(); /*! - \brief Sets the module to standby mode. - - \param mode Oscillator to be used in standby mode. Defaults to SX126X_STANDBY_RC (13 MHz RC oscillator), can also be set SX126X_STANDBY_XOSC (32 MHz external crystal oscillator). + \brief Sets the module to standby mode (overload for PhysicalLayer compatibility, uses 13 MHz RC oscillator). \returns \ref status_codes */ - int16_t standby(uint8_t mode = SX126X_STANDBY_RC); + int16_t standby(); + + /*! + \brief Sets the module to standby mode. + + \param mode Oscillator to be used in standby mode. Can be set to SX126X_STANDBY_RC (13 MHz RC oscillator) or SX126X_STANDBY_XOSC (32 MHz external crystal oscillator). + + \returns \ref status_codes + */ + int16_t standby(uint8_t mode); // interrupt methods