[PHY] Added standby types abstraction
This commit is contained in:
parent
7267e5ffc9
commit
5ca2c8533c
3 changed files with 36 additions and 0 deletions
|
@ -63,6 +63,31 @@
|
|||
\}
|
||||
*/
|
||||
|
||||
/*!
|
||||
\defgroup config_standby Standby mode type aliases.
|
||||
|
||||
\{
|
||||
*/
|
||||
|
||||
/*!
|
||||
\brief Default standby used by the module
|
||||
*/
|
||||
#define RADIOLIB_STANDBY_DEFAULT (0x00)
|
||||
|
||||
/*!
|
||||
\brief Warm standby (e.g. crystal left running).
|
||||
*/
|
||||
#define RADIOLIB_STANDBY_WARM (0x01)
|
||||
|
||||
/*!
|
||||
\brief Cold standby (e.g. only internal RC oscillator running).
|
||||
*/
|
||||
#define RADIOLIB_STANDBY_COLD (0x02)
|
||||
|
||||
/*!
|
||||
\}
|
||||
*/
|
||||
|
||||
/*!
|
||||
\defgroup status_codes Status Codes
|
||||
|
||||
|
|
|
@ -111,6 +111,10 @@ int16_t PhysicalLayer::receive(uint8_t* data, size_t len) {
|
|||
}
|
||||
|
||||
int16_t PhysicalLayer::standby() {
|
||||
return(standby(RADIOLIB_STANDBY_DEFAULT));
|
||||
}
|
||||
|
||||
int16_t PhysicalLayer::standby(uint8_t mode) {
|
||||
return(RADIOLIB_ERR_UNSUPPORTED);
|
||||
}
|
||||
|
||||
|
|
|
@ -91,6 +91,13 @@ class PhysicalLayer {
|
|||
*/
|
||||
virtual int16_t standby();
|
||||
|
||||
/*!
|
||||
\brief Sets module to a specific standby mode.
|
||||
|
||||
\returns \ref status_codes
|
||||
*/
|
||||
virtual int16_t standby(uint8_t mode);
|
||||
|
||||
/*!
|
||||
\brief Binary receive method. Must be implemented in module class.
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue