[CC1101]Add sleep function (#1389)

This commit is contained in:
petrel 2025-01-14 15:03:43 +08:00 committed by GitHub
parent 9a8affde8e
commit 04b96873a3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 12 additions and 0 deletions

View file

@ -116,6 +116,12 @@ int16_t CC1101::standby(uint8_t mode) {
return(standby());
}
int16_t CC1101::sleep() {
int16_t state =standby();
SPIsendCommand(RADIOLIB_CC1101_CMD_POWER_DOWN);
return(state);
}
int16_t CC1101::transmitDirect(uint32_t frf) {
return transmitDirect(true, frf);
}

View file

@ -614,6 +614,12 @@ class CC1101: public PhysicalLayer {
*/
int16_t standby(uint8_t mode) override;
/*!
\brief Sets the module to sleep mode.
\returns \ref status_codes
*/
int16_t sleep() override;
/*!
\brief Starts synchronous direct mode transmission.
\param frf Raw RF frequency value. Defaults to 0, required for quick frequency shifts in RTTY.