From 2dd1d157ddccb7a48351d58db05982428b7b3a6d Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Thu, 26 Jul 2012 22:15:28 +0300 Subject: [PATCH] Tell the TTY driver to not mess with serial port data --- source/io/serial.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/source/io/serial.cpp b/source/io/serial.cpp index 2ed11ae..26ef92e 100644 --- a/source/io/serial.cpp +++ b/source/io/serial.cpp @@ -181,8 +181,11 @@ Serial::Serial(const string &descr): termios t; tcgetattr(*handle, &t); - t.c_lflag &= ~(ECHO|ICANON); - t.c_oflag &= ~OPOST; + t.c_iflag &= ~(ISTRIP|INLCR|IGNCR|ICRNL|IXON); + t.c_lflag &= ~(ECHO|ICANON|ISIG|IEXTEN); + t.c_oflag &= ~(OPOST|OCRNL|ONOCR|ONLRET); + t.c_cc[VMIN] = 1; + t.c_cc[VTIME] = 0; tcsetattr(*handle, TCSADRAIN, &t); #endif -- 2.45.2