aboutsummaryrefslogtreecommitdiff
path: root/flow-native/unix/src/flow.c
diff options
context:
space:
mode:
Diffstat (limited to 'flow-native/unix/src/flow.c')
-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;