Commit 13a96574 authored by Erwan Gouriou's avatar Erwan Gouriou Committed by Anas Nashif
Browse files

drivers/serial: stm32: Put LPUART code under LPUART Kconfig symbol



In order to ease integration of new series, remove reference to
series in code activation. Use LPUART support Kconfig symbol instead.

Signed-off-by: default avatarErwan Gouriou <erwan.gouriou@linaro.org>
parent 80b8c501
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -263,7 +263,7 @@ static void uart_stm32_usart_set_baud_rate(struct device *dev,
			     baud_rate);
}

#if defined(CONFIG_SOC_SERIES_STM32L0X) || defined(CONFIG_SOC_SERIES_STM32L4X)
#ifdef CONFIG_UART_STM32_LPUART_1
static void uart_stm32_lpuart_set_baud_rate(struct device *dev,
					    u32_t clock_rate, u32_t baud_rate)
{
@@ -319,7 +319,7 @@ static int uart_stm32_init(struct device *dev)
			       (clock_control_subsys_t *)&config->pclken,
			       &clock_rate);

#if defined(CONFIG_SOC_SERIES_STM32L0X) || defined(CONFIG_SOC_SERIES_STM32L4X)
#ifdef CONFIG_UART_STM32_LPUART_1
	if (IS_LPUART_INSTANCE(UartInstance)) {
		uart_stm32_lpuart_set_baud_rate(dev, clock_rate, baud_rate);
	} else {
@@ -338,7 +338,7 @@ static int uart_stm32_init(struct device *dev)
#endif /* !USART_ISR_TEACK */

#ifdef USART_ISR_REACK
	/* Wait until TEACK flag is set */
	/* Wait until REACK flag is set */
	while (!(LL_USART_IsActiveFlag_REACK(UartInstance)))
		;
#endif /* !USART_ISR_REACK */