hv_vuart: Avoid reporting bytes in the RX buffer when it's empty.

Signed-off-by: Pip Cet <pipcet@gmail.com>
This commit is contained in:
Pip Cet 2021-08-24 10:40:18 +00:00 committed by Hector Martin
parent 19b16f77d8
commit 9a5707889a

View file

@ -24,6 +24,7 @@ static void update_irq(void)
utrstat |= UTRSTAT_TXBE | UTRSTAT_TXE;
utrstat &= ~UTRSTAT_RXD;
ufstat = 0;
if ((rx_queued = iodev_can_read(vuart_iodev))) {
utrstat |= UTRSTAT_RXD;
if (rx_queued > 15)