1
0
mirror of git://sigrok.org/libserialport synced 2023-08-10 21:13:24 +03:00

Set VMIN = 1, not zero which forces non-blocking reads.

This commit is contained in:
Martin Ling 2013-11-27 01:16:51 +00:00
parent afb518f04a
commit 8fbf876dfd

View File

@ -34,6 +34,7 @@
#include <tchar.h>
#include <stdio.h>
#else
#include <limits.h>
#include <termios.h>
#include <sys/ioctl.h>
#endif
@ -700,7 +701,7 @@ enum sp_return sp_open(struct sp_port *port, enum sp_mode flags)
data.term.c_oflag &= ~OFILL;
#endif
data.term.c_lflag &= ~(ISIG | ICANON | ECHO | IEXTEN);
data.term.c_cc[VMIN] = 0;
data.term.c_cc[VMIN] = 1;
data.term.c_cc[VTIME] = 0;
/* Ignore modem status lines; enable receiver; leave control lines alone on close. */