Skip to content

Commit

Permalink
drivers/serial: unmodify head and tail pointers
Browse files Browse the repository at this point in the history
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
  • Loading branch information
Gary-Hobson authored and xiaoxiang781216 committed Sep 19, 2023
1 parent 31da767 commit 1d9097f
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions drivers/serial/serial_dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -188,14 +188,6 @@ void uart_recvchars_dma(FAR uart_dev_t *dev)
bool is_full;
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
* byte to the buffer.
*/
Expand Down

0 comments on commit 1d9097f

Please sign in to comment.