[CC1101]Add sleep function (#1389)
This commit is contained in:
parent
9a8affde8e
commit
04b96873a3
2 changed files with 12 additions and 0 deletions
|
@ -116,6 +116,12 @@ int16_t CC1101::standby(uint8_t mode) {
|
||||||
return(standby());
|
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) {
|
int16_t CC1101::transmitDirect(uint32_t frf) {
|
||||||
return transmitDirect(true, frf);
|
return transmitDirect(true, frf);
|
||||||
}
|
}
|
||||||
|
|
|
@ -614,6 +614,12 @@ class CC1101: public PhysicalLayer {
|
||||||
*/
|
*/
|
||||||
int16_t standby(uint8_t mode) override;
|
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.
|
\brief Starts synchronous direct mode transmission.
|
||||||
\param frf Raw RF frequency value. Defaults to 0, required for quick frequency shifts in RTTY.
|
\param frf Raw RF frequency value. Defaults to 0, required for quick frequency shifts in RTTY.
|
||||||
|
|
Loading…
Add table
Reference in a new issue