Skip to content

Commit 5f41d15

Browse files
ABOSTMfpistm
authored andcommitted
fix: STM32G070 compilation issue
Not all STM32G0 support HAL_PWREx_EnterSHUTDOWNMode() fixes #83 Signed-off-by: Alexandre Bourdiol <[email protected]>
1 parent 755552b commit 5f41d15

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/low_power.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -548,7 +548,7 @@ void LowPower_shutdown()
548548
__HAL_PWR_CLEAR_FLAG(PWR_MPUCR_CSSF);
549549
#endif
550550

551-
#if defined(PWR_CR1_LPMS)
551+
#if defined(PWR_LOWPOWERMODE_SHUTDOWN) || defined(PWR_CR1_LPMS_SHUTDOWN) || defined(LL_PWR_SHUTDOWN_MODE)
552552
/* LSE must be on to use shutdown mode */
553553
if (__HAL_RCC_GET_FLAG(RCC_FLAG_LSERDY) == SET) {
554554
HAL_PWREx_EnterSHUTDOWNMode();

0 commit comments

Comments
 (0)