File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
targets/TARGET_STM/TARGET_STM32WB Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -55,12 +55,12 @@ static void uart_irq(UARTName uart_name)
55
55
UART_HandleTypeDef * huart = & uart_handlers [id ];
56
56
if (serial_irq_ids [id ] != 0 ) {
57
57
if (__HAL_UART_GET_FLAG (huart , UART_FLAG_TXE ) != RESET ) {
58
- if (__HAL_UART_GET_IT (huart , UART_IT_TXE ) != RESET ) {
58
+ if (__HAL_UART_GET_IT (huart , UART_IT_TXE ) != RESET && __HAL_UART_GET_IT_SOURCE ( huart , UART_IT_TXE ) ) {
59
59
irq_handler (serial_irq_ids [id ], TxIrq );
60
60
}
61
61
}
62
62
if (__HAL_UART_GET_FLAG (huart , UART_FLAG_RXNE ) != RESET ) {
63
- if (__HAL_UART_GET_IT (huart , UART_IT_RXNE ) != RESET ) {
63
+ if (__HAL_UART_GET_IT (huart , UART_IT_RXNE ) != RESET && __HAL_UART_GET_IT_SOURCE ( huart , UART_IT_RXNE ) ) {
64
64
irq_handler (serial_irq_ids [id ], RxIrq );
65
65
/* Flag has been cleared when reading the content */
66
66
}
You can’t perform that action at this time.
0 commit comments