mirror of
https://github.com/apache/nuttx.git
synced 2026-08-10 23:15:15 +00:00
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
1 changed files with 5 additions and 0 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue