From 29dc8ef1746a35ad386f3e7681dcbf1bf36087e8 Mon Sep 17 00:00:00 2001 From: Jakob Odersky Date: Thu, 11 Jul 2013 16:44:18 +0200 Subject: change termio initialization to makeraw()-like settings --- flow-native/unix/src/flow.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'flow-native') diff --git a/flow-native/unix/src/flow.c b/flow-native/unix/src/flow.c index 07e1c9f..1c127b2 100644 --- a/flow-native/unix/src/flow.c +++ b/flow-native/unix/src/flow.c @@ -84,10 +84,11 @@ int serial_open( /* configure new port settings */ struct termios newtio; - newtio.c_cflag = 0; - newtio.c_oflag = 0; - newtio.c_iflag = 0; - newtio.c_lflag = 0; + /* following calls correspond to makeraw() */ + newtio.c_iflag &= ~(IGNBRK | BRKINT | PARMRK | ISTRIP | INLCR | IGNCR | ICRNL | IXON); + newtio.c_oflag &= ~OPOST; + newtio.c_lflag &= ~(ECHO | ECHONL | ICANON | ISIG | IEXTEN); + newtio.c_cflag &= ~(CSIZE | PARENB); /* set speed */ speed_t bd; -- cgit v1.2.3