SCEX test code #135

Merged
meierj merged 13 commits from mueller/scex-test-code into develop 2022-02-09 14:24:51 +01:00
Showing only changes of commit 0108a913e6 - Show all commits

View File

@ -150,9 +150,10 @@ void UartTestClass::scexInit() {
// Use non-canonical mode and clear echo flag
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[VMIN] = 1;
tty.c_cc[VMIN] = 255; // Read up to 255 bytes
if (tcsetattr(serialPort, TCSANOW, &tty) != 0) {
sif::warning << "tcsetattr call failed with error [" << errno << ", " << strerror(errno)