mirror of
https://github.com/apache/nuttx.git
synced 2026-05-31 23:40:19 +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,10 +206,13 @@ 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;
|
||||||
xfer->nbytes = 0;
|
|
||||||
xfer->length = xfer->nlength = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Reset xmit buffer. */
|
||||||
|
|
||||||
|
xfer->nbytes = 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