24#error "LowPower library is NOT supported by SubCore."
42#include <arch/chip/pm.h>
92 LowPowerClass() : isInitialized(
false), isEnabledDVFS(
false) {
94 hvlock.info = PM_CPUFREQLOCK_TAG(
'L',
'P', 0);
95 hvlock.flag = PM_CPUFREQLOCK_FLAG_HV;
98 lvlock.info = PM_CPUFREQLOCK_TAG(
'L',
'P', 1);
99 lvlock.flag = PM_CPUFREQLOCK_FLAG_LV;
229 struct pm_cpu_freqlock_s hvlock;
230 struct pm_cpu_freqlock_s lvlock;
This provides the features fo the power saving.
Definition: LowPower.h:89
void disableBootCause(uint8_t pin)
Disable the cause by the specified pin as the boot cause.
bool isEnabledBootCause(bootcause_e bc)
Check if the specified cause is permitted or not.
void reboot()
Reboot the system.
void end()
Finalize the Low Power library.
void clockMode(clockmode_e mode)
Set clock mode and change system clock dynamically.
void enableBootCause(uint8_t pin)
Enable the cause by the specified pin as the boot cause.
void deepSleep()
Enter the deep sleep state.
bool isEnabledBootCause(uint8_t pin)
Check if the cause by the specified pin is permitted or not.
void begin()
Initialize the Low Power library.
uint8_t getWakeupPin(bootcause_e bc)
Get a wakeup pin number from the boot cause.
void coldSleep(uint32_t seconds)
Enter the cold sleep state during the specified seconds.
int getCurrent(void)
Get the sensed battery current on CXD5247.
void disableBootCause(bootcause_e bc)
Disable the specified cause as the boot cause.
void sleep(uint32_t seconds)
Sleep (yield) this thread.
void coldSleep()
Enter the cold sleep state.
void enableBootCause(bootcause_e bc)
Enable the specified cause as the boot cause.
clockmode_e getClockMode()
Get clock mode.
void deepSleep(uint32_t seconds)
Enter the deep sleep state during the specified seconds.
bootcause_e bootCause()
Get the boot cause.
int getVoltage(void)
Get the sensed battery voltage on CXD5247.
bootcause_e
Definition: LowPower.h:44
clockmode_e
Definition: LowPower.h:77
@ COLD_GPIO_IRQ41
Definition: LowPower.h:63
@ WDT_REBOOT
Definition: LowPower.h:46
@ POR_NORMAL
Definition: LowPower.h:74
@ COLD_GPIO_IRQ43
Definition: LowPower.h:65
@ COLD_GPIO_IRQ39
Definition: LowPower.h:61
@ DEEP_WKUPS
Definition: LowPower.h:49
@ COLD_USB_ATTACH
Definition: LowPower.h:73
@ WDT_RESET
Definition: LowPower.h:47
@ COLD_RTC_ALM0
Definition: LowPower.h:54
@ DEEP_OTHERS
Definition: LowPower.h:52
@ COLD_SCU_INT
Definition: LowPower.h:53
@ COLD_RTC_ALMERR
Definition: LowPower.h:57
@ COLD_USB_DETACH
Definition: LowPower.h:72
@ COLD_GPIO_IRQ47
Definition: LowPower.h:69
@ COLD_PMIC_INT
Definition: LowPower.h:71
@ COLD_RTC_ALM2
Definition: LowPower.h:56
@ COLD_GPIO_IRQ36
Definition: LowPower.h:58
@ DEEP_WKUPL
Definition: LowPower.h:48
@ COLD_GPIO_IRQ46
Definition: LowPower.h:68
@ COLD_GPIO_IRQ40
Definition: LowPower.h:62
@ DEEP_RTC
Definition: LowPower.h:50
@ COLD_GPIO_IRQ44
Definition: LowPower.h:66
@ COLD_GPIO_IRQ37
Definition: LowPower.h:59
@ COLD_GPIO_IRQ42
Definition: LowPower.h:64
@ COLD_RTC_ALM1
Definition: LowPower.h:55
@ COLD_SEN_INT
Definition: LowPower.h:70
@ COLD_GPIO_IRQ45
Definition: LowPower.h:67
@ POR_SUPPLY
Definition: LowPower.h:45
@ COLD_GPIO_IRQ38
Definition: LowPower.h:60
@ DEEP_USB_ATTACH
Definition: LowPower.h:51
@ CLOCK_MODE_156MHz
Definition: LowPower.h:78
@ CLOCK_MODE_8MHz
Definition: LowPower.h:80
@ CLOCK_MODE_32MHz
Definition: LowPower.h:79