semf
stm32power.cpp
Go to the documentation of this file.
1
12
13#if defined(STM32)
14namespace semf
15{
17{
18 SEMF_INFO("reset");
19 HAL_NVIC_SystemReset();
20}
21
23{
24 SEMF_INFO("standby");
25 HAL_PWR_EnterSTANDBYMode();
26}
27
29{
30 SEMF_INFO("sleep");
31 HAL_PWR_EnterSLEEPMode(PWR_MAINREGULATOR_ON, PWR_SLEEPENTRY_WFI);
32}
33
35{
36 SEMF_INFO("stop");
37 HAL_PWR_EnterSTOPMode(PWR_MAINREGULATOR_ON, PWR_STOPENTRY_WFI);
38}
39} /* namespace semf */
40#endif
void standby() override
Switches microcontroller directly into standby mode.
Definition: stm32power.cpp:22
void stop() override
Switches microcontroller directly into stop mode.
Definition: stm32power.cpp:34
void sleep() override
Switches microcontroller directly into sleep mode.
Definition: stm32power.cpp:28
void reset() override
Definition: stm32power.cpp:16
#define SEMF_INFO(...)
Definition: debug.h:41