mirror of
https://github.com/apache/nuttx.git
synced 2026-05-31 14:27:37 +08:00
tty:support tty c_cc VMIN & VTIME
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
This commit is contained in:
@@ -336,7 +336,20 @@ void uart_recvchars_done(FAR uart_dev_t *dev)
|
||||
* incoming data available.
|
||||
*/
|
||||
|
||||
if (rxbuf->head >= rxbuf->tail)
|
||||
{
|
||||
nbytes = rxbuf->head - rxbuf->tail;
|
||||
}
|
||||
else
|
||||
{
|
||||
nbytes = rxbuf->size - rxbuf->tail + rxbuf->head;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SERIAL_TERMIOS
|
||||
if (nbytes >= dev->minrecv)
|
||||
#else
|
||||
if (nbytes)
|
||||
#endif
|
||||
{
|
||||
uart_datareceived(dev);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user