From a234aa44f304a1ff1d1465d6e2121c356c834977 Mon Sep 17 00:00:00 2001 From: Damien George Date: Wed, 8 Mar 2023 23:57:53 +1100 Subject: [PATCH] stm32/powerctrl: Don't compile WB helpers on WL MCUs. Signed-off-by: Damien George --- ports/stm32/powerctrl.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ports/stm32/powerctrl.c b/ports/stm32/powerctrl.c index 373f6b1ab8..498fb79d71 100644 --- a/ports/stm32/powerctrl.c +++ b/ports/stm32/powerctrl.c @@ -677,6 +677,8 @@ int powerctrl_set_sysclk(uint32_t sysclk, uint32_t ahb, uint32_t apb1, uint32_t return 0; } +#if defined(STM32WB) + static void powerctrl_switch_on_HSI(void) { LL_RCC_HSI_Enable(); while (!LL_RCC_HSI_IsReady()) { @@ -729,9 +731,11 @@ static void powerctrl_low_power_exit_wb55() { LL_HSEM_ReleaseLock(HSEM, CFG_HW_RCC_SEMID, 0); } -#endif +#endif // defined(STM32WB) -#endif // !defined(STM32F0) && !defined(STM32L0) && !defined(STM32L4) +#endif // defined(STM32WB) || defined(STM32WL) + +#endif // !defined(STM32F0) && !defined(STM32G0) && !defined(STM32L0) && !defined(STM32L1) && !defined(STM32L4) void powerctrl_enter_stop_mode(void) { // Disable IRQs so that the IRQ that wakes the device from stop mode is not