Skip to content

Commit 8cf7d86

Browse files
committed
core: fix UART RX FIFO status indexing.
1 parent d5a61f1 commit 8cf7d86

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

core/uart.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ static uint8_t uart_read(const uint16_t pio, bool peek) {
274274
uart.rfvi++;
275275
if (--uart.rfve) {
276276
/* Indicate error status from the next FIFO entry */
277-
index = uart.rxstat[uart.rfvi & (UART_FIFO_DEPTH - 1)];
277+
index = uart.rfvi & (UART_FIFO_DEPTH - 1);
278278
uart.lsr |= uart.rxstat[index];
279279
uart.isr |= (uart.rxstat[index] != 0) << 2;
280280
} else {

0 commit comments

Comments
 (0)