sr: turn off canonical mode and echo ion serial ports by default

This commit is contained in:
Bert Vermeulen 2012-09-16 14:07:21 +02:00
parent e7edd64f45
commit 5c51e09868
1 changed files with 3 additions and 0 deletions

View File

@ -316,6 +316,9 @@ SR_PRIV int serial_set_params(int fd, int baudrate, int bits, int parity,
return SR_ERR;
}
/* Some default parameters */
term.c_lflag &= ~(ICANON | ECHO);
if (tcsetattr(fd, TCSADRAIN, &term) < 0)
return SR_ERR;
#endif