set min read length in uart_ioctl
set min read length in uart_ioctl Signed-off-by: zhanghu5 <zhanghu5@xiaomi.com>
This commit is contained in:
parent
7a495fabb6
commit
10e7d8fe44
|
@ -1060,6 +1060,10 @@ static ssize_t uart_read(FAR struct file *filep,
|
|||
{
|
||||
ret = nxsem_wait(&dev->recvsem);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SERIAL_TERMIOS
|
||||
dev->minrecv = dev->minread;
|
||||
#endif
|
||||
}
|
||||
|
||||
leave_critical_section(flags);
|
||||
|
@ -1579,6 +1583,7 @@ static int uart_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
|
|||
#ifdef CONFIG_SERIAL_TERMIOS
|
||||
dev->timeout = termiosp->c_cc[VTIME];
|
||||
dev->minread = termiosp->c_cc[VMIN];
|
||||
dev->minrecv = dev->minread;
|
||||
#endif
|
||||
ret = 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue