[Si443x] Added missing standby overload

This commit is contained in:
jgromes 2023-03-12 15:02:23 +01:00
parent 874886b4cd
commit a4df77b76e
2 changed files with 15 additions and 3 deletions

View file

@ -134,10 +134,13 @@ int16_t Si443x::sleep() {
} }
int16_t Si443x::standby() { int16_t Si443x::standby() {
return(standby(RADIOLIB_SI443X_XTAL_ON));
}
int16_t Si443x::standby(uint8_t mode) {
// set RF switch (if present) // set RF switch (if present)
_mod->setRfSwitchState(Module::MODE_IDLE); _mod->setRfSwitchState(Module::MODE_IDLE);
return(_mod->SPIsetRegValue(RADIOLIB_SI443X_REG_OP_FUNC_CONTROL_1, mode, 7, 0, 10));
return(_mod->SPIsetRegValue(RADIOLIB_SI443X_REG_OP_FUNC_CONTROL_1, RADIOLIB_SI443X_XTAL_ON, 7, 0, 10));
} }
int16_t Si443x::transmitDirect(uint32_t frf) { int16_t Si443x::transmitDirect(uint32_t frf) {

View file

@ -627,12 +627,21 @@ class Si443x: public PhysicalLayer {
int16_t sleep(); int16_t sleep();
/*! /*!
\brief Sets the module to standby. \brief Sets the module to standby (with XTAL on).
\returns \ref status_codes \returns \ref status_codes
*/ */
int16_t standby() override; int16_t standby() override;
/*!
\brief Sets the module to standby.
\param mode Standby mode to be used.
\returns \ref status_codes
*/
int16_t standby(uint8_t mode) override;
/*! /*!
\brief Enables direct transmission mode. While in direct mode, the module will not be able to transmit or receive packets. \brief Enables direct transmission mode. While in direct mode, the module will not be able to transmit or receive packets.