]> git.tdb.fi Git - libs/core.git/commitdiff
Tell the TTY driver to not mess with serial port data
authorMikko Rasa <tdb@tdb.fi>
Thu, 26 Jul 2012 19:15:28 +0000 (22:15 +0300)
committerMikko Rasa <tdb@tdb.fi>
Thu, 26 Jul 2012 19:30:18 +0000 (22:30 +0300)
source/io/serial.cpp

index 2ed11ae9fddd900b4ab695a2acc05770deaf5e18..26ef92ed9015ae4f04aa1f96670a38f27dfcacfc 100644 (file)
@@ -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