Skip to content

Commit c344425

Browse files
committed
Better use else if, or else the input get's duplicated whilest it is already handled
1 parent 054c1a9 commit c344425

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

cores/esp32/esp32-hal-uart.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,7 @@ static void IRAM_ATTR _uart_isr()
104104
{
105105
// Fully optimized code would not create the queue anymore if an function has been specified as an argument.
106106
(*uart_interrupt->func)(c, uart_interrupt->user_arg);
107-
}
108-
if (uart->queue != NULL)
107+
}else if (uart->queue != NULL)
109108
{
110109
xQueueSendFromISR(uart->queue, &c, &xHigherPriorityTaskWoken);
111110
}

0 commit comments

Comments
 (0)