aboutsummaryrefslogtreecommitdiff
path: root/flow-native
diff options
context:
space:
mode:
authorChris Sachs <csachs@sensity.com>2015-01-10 19:30:49 -0800
committerChris Sachs <csachs@sensity.com>2015-01-10 19:30:49 -0800
commit218e52d97218ac18cf5b0a74ee262ee490cdc7c9 (patch)
treedf9551a115484ccc9a15571f1ab161c6b972a5b1 /flow-native
parent73b02481d2df2db5b6c2c6e56706fd93bdf806d3 (diff)
downloadakka-serial-218e52d97218ac18cf5b0a74ee262ee490cdc7c9.tar.gz
akka-serial-218e52d97218ac18cf5b0a74ee262ee490cdc7c9.tar.bz2
akka-serial-218e52d97218ac18cf5b0a74ee262ee490cdc7c9.zip
fully initialize termios struct
Diffstat (limited to 'flow-native')
-rw-r--r--flow-native/src/platform/posix/flow.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/flow-native/src/platform/posix/flow.c b/flow-native/src/platform/posix/flow.c
index 1adb10c..a2a239c 100644
--- a/flow-native/src/platform/posix/flow.c
+++ b/flow-native/src/platform/posix/flow.c
@@ -54,12 +54,11 @@ int serial_open(
/* configure new port settings */
struct termios newtio;
- /* 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);
- newtio.c_cflag |= CREAD;
+ /* initialize serial interface */
+ newtio.c_iflag = 0;
+ newtio.c_oflag = 0;
+ newtio.c_lflag = 0;
+ newtio.c_cflag = CREAD;
/* set speed */
speed_t bd;