Skip to content

Commit 03066e4

Browse files
romansavrulinme-no-dev
authored andcommittedAug 20, 2019
Flush UART RX queue too (#3009)
1 parent cd5257a commit 03066e4

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed
 

‎cores/esp32/esp32-hal-uart.c

+2
Original file line numberDiff line numberDiff line change
@@ -343,6 +343,8 @@ void uartFlush(uart_t* uart)
343343
READ_PERI_REG(UART_FIFO_REG(uart->num));
344344
}
345345

346+
xQueueReset(uart->queue);
347+
346348
UART_MUTEX_UNLOCK();
347349
}
348350

1 commit comments

Comments
 (1)

kbickham commented on Aug 22, 2019

@kbickham

Curious, someone already mentioned in #3095 , while(uart->dev->status.rxfifo_cnt != 0 || (uart->dev->mem_rx_status.wr_addr != uart->dev->mem_rx_status.rd_addr)) { READ_PERI_REG(UART_FIFO_REG(uart->num)); is this clearing the input buffer as well? I believe this may be effecting something I'm working on. May the force be with you.

Please sign in to comment.