_uart_isr use wr_addr != rd_addr as test for internal queue not empty (#1849)

This commit is contained in:
Baruch Nissenbaum 2018-09-17 22:19:51 +03:00 committed by Me No Dev
parent 02ee799f35
commit a6a9a518a7

View File

@ -80,7 +80,7 @@ static void IRAM_ATTR _uart_isr(void *arg)
uart->dev->int_clr.rxfifo_full = 1;
uart->dev->int_clr.frm_err = 1;
uart->dev->int_clr.rxfifo_tout = 1;
while(uart->dev->status.rxfifo_cnt) {
while(uart->dev->status.rxfifo_cnt || (uart->dev->mem_rx_status.wr_addr != uart->dev->mem_rx_status.rd_addr)) {
c = uart->dev->fifo.rw_byte;
if(uart->queue != NULL && !xQueueIsQueueFullFromISR(uart->queue)) {
xQueueSendFromISR(uart->queue, &c, &xHigherPriorityTaskWoken);