mirror of
https://github.com/apache/nuttx.git
synced 2026-06-01 16:59:28 +08:00
drivers/serial/serial_dma.c: Still need reset xmit buffer when meet TCOFLUSH. This is an amendment to 8fb19a4359.
This commit is contained in:
@@ -206,9 +206,12 @@ void uart_xmitchars_done(FAR uart_dev_t *dev)
|
|||||||
/* Move tail for nbytes. */
|
/* Move tail for nbytes. */
|
||||||
|
|
||||||
txbuf->tail = (txbuf->tail + nbytes) % txbuf->size;
|
txbuf->tail = (txbuf->tail + nbytes) % txbuf->size;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Reset xmit buffer. */
|
||||||
|
|
||||||
xfer->nbytes = 0;
|
xfer->nbytes = 0;
|
||||||
xfer->length = xfer->nlength = 0;
|
xfer->length = xfer->nlength = 0;
|
||||||
}
|
|
||||||
|
|
||||||
/* If any bytes were removed from the buffer, inform any waiters there
|
/* If any bytes were removed from the buffer, inform any waiters there
|
||||||
* there is space available.
|
* there is space available.
|
||||||
|
|||||||
Reference in New Issue
Block a user