diff options
-rw-r--r-- | chip/stm32/clock-stm32f.c | 2 | ||||
-rw-r--r-- | chip/stm32/clock-stm32f0.c | 2 | ||||
-rw-r--r-- | chip/stm32/system.c | 2 |
3 files changed, 6 insertions, 0 deletions
diff --git a/chip/stm32/clock-stm32f.c b/chip/stm32/clock-stm32f.c index 301b4c09ef..76278c9c01 100644 --- a/chip/stm32/clock-stm32f.c +++ b/chip/stm32/clock-stm32f.c @@ -161,6 +161,7 @@ static void config_hispeed_clock(void) ; } +#ifdef CONFIG_HIBERNATE void __enter_hibernate(uint32_t seconds, uint32_t microseconds) { if (seconds || microseconds) @@ -180,6 +181,7 @@ void __enter_hibernate(uint32_t seconds, uint32_t microseconds) while (1) ; } +#endif #ifdef CONFIG_LOW_POWER_IDLE diff --git a/chip/stm32/clock-stm32f0.c b/chip/stm32/clock-stm32f0.c index 76583eaab0..c3e5fe4f68 100644 --- a/chip/stm32/clock-stm32f0.c +++ b/chip/stm32/clock-stm32f0.c @@ -258,6 +258,7 @@ static void config_hispeed_clock(void) #endif } +#ifdef CONFIG_HIBERNATE void __enter_hibernate(uint32_t seconds, uint32_t microseconds) { uint32_t rtc, rtcss; @@ -281,6 +282,7 @@ void __enter_hibernate(uint32_t seconds, uint32_t microseconds) while (1) ; } +#endif #ifdef CONFIG_LOW_POWER_IDLE diff --git a/chip/stm32/system.c b/chip/stm32/system.c index 1fce1ab35f..fa7b199325 100644 --- a/chip/stm32/system.c +++ b/chip/stm32/system.c @@ -80,6 +80,7 @@ static int bkpdata_write(enum bkpdata_index index, uint16_t value) void __no_hibernate(uint32_t seconds, uint32_t microseconds) { +#ifdef CONFIG_COMMON_RUNTIME /* * Hibernate not implemented on this platform. * @@ -88,6 +89,7 @@ void __no_hibernate(uint32_t seconds, uint32_t microseconds) cprints(CC_SYSTEM, "hibernate not supported, so rebooting"); cflush(); system_reset(SYSTEM_RESET_HARD); +#endif } void __enter_hibernate(uint32_t seconds, uint32_t microseconds) |