From 03066e42efef8630778c7aeac6f28438d0ec5094 Mon Sep 17 00:00:00 2001 From: Roman Savrulin Date: Tue, 20 Aug 2019 16:48:52 +0300 Subject: [PATCH] Flush UART RX queue too (#3009) --- 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 d80271a2..0028b1d7 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(); }