diff --git a/drivers/serial/uart_stm32.c b/drivers/serial/uart_stm32.c index c74239e0439..e0232c550e6 100644 --- a/drivers/serial/uart_stm32.c +++ b/drivers/serial/uart_stm32.c @@ -20,7 +20,6 @@ #include #include #include -#include #include #include #include @@ -67,6 +66,11 @@ LOG_MODULE_REGISTER(uart_stm32, CONFIG_UART_LOG_LEVEL); #define HAS_DRIVER_ENABLE 0 #endif +#ifdef CONFIG_PM +/* Placeholder value when wakeup-line DT property is not defined */ +#define STM32_WAKEUP_LINE_NONE 0xFFFFFFFF +#endif + #if HAS_LPUART #ifdef USART_PRESC_PRESCALER uint32_t lpuartdiv_calc(const uint64_t clock_rate, const uint16_t presc_idx, @@ -2064,7 +2068,7 @@ static int uart_stm32_registers_configure(const struct device *dev) #endif LL_USART_EnableInStopMode(usart); - if (config->wakeup_line != STM32_EXTI_LINE_NONE) { + if (config->wakeup_line != STM32_WAKEUP_LINE_NONE) { /* Prepare the WAKEUP with the expected EXTI line */ LL_EXTI_EnableIT_0_31(BIT(config->wakeup_line)); } @@ -2290,7 +2294,7 @@ static void uart_stm32_irq_config_func_##index(const struct device *dev) \ .wakeup_source = DT_INST_PROP(index, wakeup_source), \ .wakeup_line = COND_CODE_1(DT_INST_NODE_HAS_PROP(index, wakeup_line), \ (DT_INST_PROP(index, wakeup_line)), \ - (STM32_EXTI_LINE_NONE)), + (STM32_WAKEUP_LINE_NONE)), #else #define STM32_UART_PM_WAKEUP(index) /* Not used */ #endif diff --git a/include/zephyr/drivers/interrupt_controller/exti_stm32.h b/include/zephyr/drivers/interrupt_controller/exti_stm32.h index 0bd808f921c..cd4b31146d6 100644 --- a/include/zephyr/drivers/interrupt_controller/exti_stm32.h +++ b/include/zephyr/drivers/interrupt_controller/exti_stm32.h @@ -23,8 +23,6 @@ #include -#define STM32_EXTI_LINE_NONE 0xFFFFFFFFU - /** * @brief enable EXTI interrupt for specific line *