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: Erwan Gouriou <erwan.gouriou@linaro.org>
This commit is contained in:
parent
80b8c501c9
commit
13a96574cd
1 changed files with 3 additions and 3 deletions
|
@ -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 */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue