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