SCEX test code #135
@ -150,9 +150,10 @@ void UartTestClass::scexInit() {
|
|||||||
// Use non-canonical mode and clear echo flag
|
// Use non-canonical mode and clear echo flag
|
||||||
tty.c_lflag &= ~(ICANON | ECHO);
|
tty.c_lflag &= ~(ICANON | ECHO);
|
||||||
|
|
||||||
// Non-blocking mode
|
// Non-blocking mode, read until either line is 0.1 second idle or maximum of 255 bytes are
|
||||||
|
// received in one go
|
||||||
tty.c_cc[VTIME] = 1; // In units of 0.1 seconds
|
tty.c_cc[VTIME] = 1; // In units of 0.1 seconds
|
||||||
tty.c_cc[VMIN] = 1;
|
tty.c_cc[VMIN] = 255; // Read up to 255 bytes
|
||||||
|
|
||||||
if (tcsetattr(serialPort, TCSANOW, &tty) != 0) {
|
if (tcsetattr(serialPort, TCSANOW, &tty) != 0) {
|
||||||
sif::warning << "tcsetattr call failed with error [" << errno << ", " << strerror(errno)
|
sif::warning << "tcsetattr call failed with error [" << errno << ", " << strerror(errno)
|
||||||
|
Loading…
Reference in New Issue
Block a user