drivers: clock_control: clock_stm32g4: Fix ifdef STM32_LSE_CLOCK

the macro STM32_LSE_CLOCK is always defined and therefore systems
without lse crystals hang on startup.
Used #if instead of #ifdef.

Signed-off-by: Alexander Wachter <alexander.wachter@leica-geosystems.com>
This commit is contained in:
Alexander Wachter 2021-07-20 17:21:36 +02:00 committed by Christopher Friedt
parent d6e1ddcc25
commit f87135bbee

View file

@ -49,7 +49,7 @@ void config_enable_default_clocks(void)
/* Enable the power interface clock */
LL_APB1_GRP1_EnableClock(LL_APB1_GRP1_PERIPH_PWR);
#ifdef STM32_LSE_CLOCK
#if STM32_LSE_CLOCK
/* LSE belongs to the back-up domain, enable access.*/
/* Set the DBP bit in the Power control register 1 (PWR_CR1) */