This provides the features fo the power saving. More...
#include <LowPower.h>
Public Member Functions | |
void | begin () |
Initialize the Low Power library. More... | |
void | end () |
Finalize the Low Power library. | |
void | sleep (uint32_t seconds) |
Sleep (yield) this thread. More... | |
void | coldSleep () |
Enter the cold sleep state. | |
void | coldSleep (uint32_t seconds) |
Enter the cold sleep state during the specified seconds. More... | |
void | deepSleep () |
Enter the deep sleep state. | |
void | deepSleep (uint32_t seconds) |
Enter the deep sleep state during the specified seconds. More... | |
void | reboot () |
Reboot the system. | |
bootcause_e | bootCause () |
Get the boot cause. More... | |
bool | isEnabledBootCause (bootcause_e bc) |
Check if the specified cause is permitted or not. More... | |
bool | isEnabledBootCause (uint8_t pin) |
Check if the cause by the specified pin is permitted or not. More... | |
void | enableBootCause (bootcause_e bc) |
Enable the specified cause as the boot cause. More... | |
void | enableBootCause (uint8_t pin) |
Enable the cause by the specified pin as the boot cause. More... | |
void | disableBootCause (bootcause_e bc) |
Disable the specified cause as the boot cause. More... | |
void | disableBootCause (uint8_t pin) |
Disable the cause by the specified pin as the boot cause. More... | |
uint8_t | getWakeupPin (bootcause_e bc) |
Get a wakeup pin number from the boot cause. More... | |
void | clockMode (clockmode_e mode) |
Set clock mode and change system clock dynamically. More... | |
clockmode_e | getClockMode () |
Get clock mode. More... | |
int | getVoltage (void) |
Get the sensed battery voltage on CXD5247. More... | |
int | getCurrent (void) |
Get the sensed battery current on CXD5247. More... | |
This provides the features fo the power saving.
void LowPowerClass::begin | ( | ) |
Initialize the Low Power library.
This initializes RTC library, because this library uses the RTC library.
void LowPowerClass::sleep | ( | uint32_t | seconds | ) |
Sleep (yield) this thread.
[in] | seconds | - the sleep period |
Just call the system call of sleep()
void LowPowerClass::coldSleep | ( | uint32_t | seconds | ) |
Enter the cold sleep state during the specified seconds.
[in] | seconds | - the period in cold sleep |
void LowPowerClass::deepSleep | ( | uint32_t | seconds | ) |
Enter the deep sleep state during the specified seconds.
[in] | seconds | - the period in deep sleep |
bootcause_e LowPowerClass::bootCause | ( | ) |
Get the boot cause.
bool LowPowerClass::isEnabledBootCause | ( | bootcause_e | bc | ) |
Check if the specified cause is permitted or not.
[in] | bc | - a boot cause |
bool LowPowerClass::isEnabledBootCause | ( | uint8_t | pin | ) |
Check if the cause by the specified pin is permitted or not.
[in] | pin | - a pin number |
void LowPowerClass::enableBootCause | ( | bootcause_e | bc | ) |
Enable the specified cause as the boot cause.
[in] | bc | - a boot cause |
void LowPowerClass::enableBootCause | ( | uint8_t | pin | ) |
Enable the cause by the specified pin as the boot cause.
[in] | pin | - a pin number |
void LowPowerClass::disableBootCause | ( | bootcause_e | bc | ) |
Disable the specified cause as the boot cause.
[in] | bc | - a boot cause |
void LowPowerClass::disableBootCause | ( | uint8_t | pin | ) |
Disable the cause by the specified pin as the boot cause.
[in] | pin | - a pin number |
uint8_t LowPowerClass::getWakeupPin | ( | bootcause_e | bc | ) |
Get a wakeup pin number from the boot cause.
[in] | bc | - a boot cause |
void LowPowerClass::clockMode | ( | clockmode_e | mode | ) |
Set clock mode and change system clock dynamically.
[in] | mode | - the clock mode |
clockmode_e LowPowerClass::getClockMode | ( | ) |
Get clock mode.
int LowPowerClass::getVoltage | ( | void | ) |
Get the sensed battery voltage on CXD5247.
int LowPowerClass::getCurrent | ( | void | ) |
Get the sensed battery current on CXD5247.