This provides the features fo the power saving.
More...
#include <LowPower.h>
|
| void | begin () |
| | Initialize the Low Power library.
|
| |
|
void | end () |
| | Finalize the Low Power library.
|
| |
| void | sleep (uint32_t seconds) |
| | Sleep (yield) this thread.
|
| |
|
void | coldSleep () |
| | Enter the cold sleep state.
|
| |
| void | coldSleep (uint32_t seconds) |
| | Enter the cold sleep state during the specified seconds.
|
| |
|
void | deepSleep () |
| | Enter the deep sleep state.
|
| |
| void | deepSleep (uint32_t seconds) |
| | Enter the deep sleep state during the specified seconds.
|
| |
|
void | reboot () |
| | Reboot the system.
|
| |
| bootcause_e | bootCause () |
| | Get the boot cause.
|
| |
| bool | isEnabledBootCause (bootcause_e bc) |
| | Check if the specified cause is permitted or not.
|
| |
| bool | isEnabledBootCause (uint8_t pin) |
| | Check if the cause by the specified pin is permitted or not.
|
| |
| void | enableBootCause (bootcause_e bc) |
| | Enable the specified cause as the boot cause.
|
| |
| void | enableBootCause (uint8_t pin) |
| | Enable the cause by the specified pin as the boot cause.
|
| |
| void | disableBootCause (bootcause_e bc) |
| | Disable the specified cause as the boot cause.
|
| |
| void | disableBootCause (uint8_t pin) |
| | Disable the cause by the specified pin as the boot cause.
|
| |
| uint8_t | getWakeupPin (bootcause_e bc) |
| | Get a wakeup pin number from the boot cause.
|
| |
| void | clockMode (clockmode_e mode) |
| | Set clock mode and change system clock dynamically.
|
| |
| clockmode_e | getClockMode () |
| | Get clock mode.
|
| |
| int | getVoltage (void) |
| | Get the sensed battery voltage on CXD5247.
|
| |
| int | getCurrent (void) |
| | Get the sensed battery current on CXD5247.
|
| |
This provides the features fo the power saving.
◆ begin()
| void LowPowerClass::begin |
( |
| ) |
|
Initialize the Low Power library.
This initializes RTC library, because this library uses the RTC library.
◆ sleep()
| void LowPowerClass::sleep |
( |
uint32_t | seconds | ) |
|
Sleep (yield) this thread.
- Parameters
-
| [in] | seconds | - the sleep period |
Just call the system call of sleep()
◆ coldSleep()
| void LowPowerClass::coldSleep |
( |
uint32_t | seconds | ) |
|
Enter the cold sleep state during the specified seconds.
- Parameters
-
| [in] | seconds | - the period in cold sleep |
◆ deepSleep()
| void LowPowerClass::deepSleep |
( |
uint32_t | seconds | ) |
|
Enter the deep sleep state during the specified seconds.
- Parameters
-
| [in] | seconds | - the period in deep sleep |
◆ bootCause()
Get the boot cause.
- Returns
- a boot cause
◆ isEnabledBootCause() [1/2]
| bool LowPowerClass::isEnabledBootCause |
( |
bootcause_e | bc | ) |
|
Check if the specified cause is permitted or not.
- Parameters
-
- Returns
- true if permitted, otherwise return false
◆ isEnabledBootCause() [2/2]
| bool LowPowerClass::isEnabledBootCause |
( |
uint8_t | pin | ) |
|
Check if the cause by the specified pin is permitted or not.
- Parameters
-
- Returns
- true if permitted, otherwise return false
◆ enableBootCause() [1/2]
Enable the specified cause as the boot cause.
- Parameters
-
◆ enableBootCause() [2/2]
| void LowPowerClass::enableBootCause |
( |
uint8_t | pin | ) |
|
Enable the cause by the specified pin as the boot cause.
- Parameters
-
◆ disableBootCause() [1/2]
Disable the specified cause as the boot cause.
- Parameters
-
◆ disableBootCause() [2/2]
| void LowPowerClass::disableBootCause |
( |
uint8_t | pin | ) |
|
Disable the cause by the specified pin as the boot cause.
- Parameters
-
◆ getWakeupPin()
Get a wakeup pin number from the boot cause.
- Parameters
-
- Returns
- a pin number.
◆ clockMode()
Set clock mode and change system clock dynamically.
- Parameters
-
◆ getClockMode()
Get clock mode.
- Returns
- the clock mode
◆ getVoltage()
| int LowPowerClass::getVoltage |
( |
void | | ) |
|
Get the sensed battery voltage on CXD5247.
- Returns
- sensed voltage [mV]
◆ getCurrent()
| int LowPowerClass::getCurrent |
( |
void | | ) |
|
Get the sensed battery current on CXD5247.
- Returns
- sensed current [mA]. Negative value means discharge.
- Attention
- The returned value isn't time-averaged and just instantaneous value. Therefore, you can not get the strict current consumption. Please use this value as a guide.
The documentation for this class was generated from the following file: