Driver: Serial STM32: Fix use of TXE IRQ

In case of TX IRQ pending,
uart_stm32_irq_is_pending() function always return 0,
because "is TXE enabled ?" is checked instead of "is TC enabled ?".

Signed-off-by: Benoit Leforestier <benoit.leforestier@gmail.com>
This commit is contained in:
Benoit Leforestier 2018-11-13 15:26:06 +01:00 committed by Kumar Gala
commit 2a1c94cbc3

View file

@ -538,8 +538,8 @@ static int uart_stm32_irq_is_pending(struct device *dev)
return ((LL_USART_IsActiveFlag_RXNE(UartInstance) && return ((LL_USART_IsActiveFlag_RXNE(UartInstance) &&
LL_USART_IsEnabledIT_RXNE(UartInstance)) || LL_USART_IsEnabledIT_RXNE(UartInstance)) ||
(LL_USART_IsActiveFlag_TXE(UartInstance) && (LL_USART_IsActiveFlag_TC(UartInstance) &&
LL_USART_IsEnabledIT_TXE(UartInstance))); LL_USART_IsEnabledIT_TC(UartInstance)));
} }
static int uart_stm32_irq_update(struct device *dev) static int uart_stm32_irq_update(struct device *dev)