aboutsummaryrefslogtreecommitdiff
path: root/flow-native
diff options
context:
space:
mode:
authorJakob Odersky <jodersky@gmail.com>2013-07-11 16:44:18 +0200
committerJakob Odersky <jodersky@gmail.com>2013-07-11 16:44:18 +0200
commit29dc8ef1746a35ad386f3e7681dcbf1bf36087e8 (patch)
tree75d4af3f1be6a2a01d85f9a8b6d41a950489faad /flow-native
parent1b6b235e6fc31481b6f672e423e6779b0db14329 (diff)
downloadakka-serial-29dc8ef1746a35ad386f3e7681dcbf1bf36087e8.tar.gz
akka-serial-29dc8ef1746a35ad386f3e7681dcbf1bf36087e8.tar.bz2
akka-serial-29dc8ef1746a35ad386f3e7681dcbf1bf36087e8.zip
change termio initialization to makeraw()-like settings
Diffstat (limited to 'flow-native')
-rw-r--r--flow-native/unix/src/flow.c9
1 files changed, 5 insertions, 4 deletions
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;