Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CC1101]Add sleep function #1389

Merged
merged 1 commit into from
Jan 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading