drivers/serial/serial_dma.c: Still need reset xmit buffer when meet TCOFLUSH. This is an amendment to 8fb19a4359.

This commit is contained in:
ligd 2019-11-07 06:39:41 -06:00 committed by Gregory Nutt
parent 33898ef551
commit 6710ba47d8

View File

@ -206,10 +206,13 @@ void uart_xmitchars_done(FAR uart_dev_t *dev)
/* Move tail for nbytes. */
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
* there is space available.
*/