From 49575b000194d1c6f9aef5921ad0358baa31b1ea Mon Sep 17 00:00:00 2001 From: Roman Savrulin Date: Fri, 19 Jul 2019 15:05:57 +0300 Subject: [PATCH] Flush UART RX queue too --- cores/esp32/esp32-hal-uart.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cores/esp32/esp32-hal-uart.c b/cores/esp32/esp32-hal-uart.c index d80271a2c11..0028b1d744f 100644 --- a/cores/esp32/esp32-hal-uart.c +++ b/cores/esp32/esp32-hal-uart.c @@ -343,6 +343,8 @@ void uartFlush(uart_t* uart) READ_PERI_REG(UART_FIFO_REG(uart->num)); } + xQueueReset(uart->queue); + UART_MUTEX_UNLOCK(); }