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:
parent
b8d2e1986d
commit
2a1c94cbc3
1 changed files with 2 additions and 2 deletions
|
@ -538,8 +538,8 @@ static int uart_stm32_irq_is_pending(struct device *dev)
|
|||
|
||||
return ((LL_USART_IsActiveFlag_RXNE(UartInstance) &&
|
||||
LL_USART_IsEnabledIT_RXNE(UartInstance)) ||
|
||||
(LL_USART_IsActiveFlag_TXE(UartInstance) &&
|
||||
LL_USART_IsEnabledIT_TXE(UartInstance)));
|
||||
(LL_USART_IsActiveFlag_TC(UartInstance) &&
|
||||
LL_USART_IsEnabledIT_TC(UartInstance)));
|
||||
}
|
||||
|
||||
static int uart_stm32_irq_update(struct device *dev)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue