Skip to content

Commit

Permalink
[CC1101]Add sleep function
Browse files Browse the repository at this point in the history
  • Loading branch information
weekroom committed Jan 14, 2025
1 parent 9a8affd commit d5a78f4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/modules/CC1101/CC1101.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
6 changes: 6 additions & 0 deletions src/modules/CC1101/CC1101.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit d5a78f4

Please sign in to comment.