From: Mikko Rasa Date: Thu, 26 Jul 2012 19:15:28 +0000 (+0300) Subject: Tell the TTY driver to not mess with serial port data X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=2dd1d157ddccb7a48351d58db05982428b7b3a6d;p=libs%2Fcore.git Tell the TTY driver to not mess with serial port data --- 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