From 92aa3b5e14a5015fd07f7019c99da8a535ea98df Mon Sep 17 00:00:00 2001 From: me-no-dev Date: Thu, 14 May 2020 03:04:10 +0300 Subject: [PATCH] Update esp32-hal-uart.c --- cores/esp32/esp32-hal-uart.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cores/esp32/esp32-hal-uart.c b/cores/esp32/esp32-hal-uart.c index 9201e013..76cdb5b0 100644 --- a/cores/esp32/esp32-hal-uart.c +++ b/cores/esp32/esp32-hal-uart.c @@ -344,7 +344,7 @@ void uartRxFifoToQueue(uart_t* uart) c = uart->dev->fifo.rw_byte; #else while (uart->dev->status.rxfifo_cnt) { - c = uart->dev->ahb_fifo.rw_byte; + c = READ_PERI_REG(UART_FIFO_AHB_REG(uart->num)); #endif xQueueSend(uart->queue, &c, 0); } @@ -484,7 +484,7 @@ static void uart_on_apb_change(void * arg, apb_change_ev_t ev_type, uint32_t old c = uart->dev->fifo.rw_byte; #else while(uart->dev->status.rxfifo_cnt != 0) { - c = uart->dev->ahb_fifo.rw_byte; + c = READ_PERI_REG(UART_FIFO_AHB_REG(uart->num)); #endif if(uart->queue != NULL ) { xQueueSend(uart->queue, &c, 1); //&xHigherPriorityTaskWoken);