tecknophreak
09-02-2004, 03:00 PM
Why is it that when i use the following:
newtio.c_cc[VTIME] = 10; /* inter-character timer */
newtio.c_cc[VMIN] = 0; /* blocking read until 1 character arrives */
it'll timeout 10/second even with no chars when I use 0 as the fd for a read, but when I setup a serial port(NON_CANON, B38400), it starts at 100 ms timeout and then goes to 10 ms timeout?
Or
newtio.c_cc[VTIME] = 0; /* inter-character timer unused */
newtio.c_cc[VMIN] = 256; /* blocking read until 1 character arrives */
This waits until it has 256 chars, where as the serial returns immediately.
If you want the serial port setup, let me know, i'll post it up here.
newtio.c_cc[VTIME] = 10; /* inter-character timer */
newtio.c_cc[VMIN] = 0; /* blocking read until 1 character arrives */
it'll timeout 10/second even with no chars when I use 0 as the fd for a read, but when I setup a serial port(NON_CANON, B38400), it starts at 100 ms timeout and then goes to 10 ms timeout?
Or
newtio.c_cc[VTIME] = 0; /* inter-character timer unused */
newtio.c_cc[VMIN] = 256; /* blocking read until 1 character arrives */
This waits until it has 256 chars, where as the serial returns immediately.
If you want the serial port setup, let me know, i'll post it up here.