drivers/serial: unmodify head and tail pointers

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
This commit is contained in:
yinshengkai 2023-08-21 11:33:01 +08:00 committed by Xiang Xiao
parent 31da767cfc
commit 1d9097f1df

View File

@ -188,14 +188,6 @@ void uart_recvchars_dma(FAR uart_dev_t *dev)
bool is_full; bool is_full;
int nexthead; int nexthead;
/* If RX buffer is empty move tail and head to zero position */
if (rxbuf->head == rxbuf->tail)
{
rxbuf->head = 0;
rxbuf->tail = 0;
}
/* Get the next head index and check if there is room to adding another /* Get the next head index and check if there is room to adding another
* byte to the buffer. * byte to the buffer.
*/ */