disable input processing to prevent CR -> NL substitution
This commit is contained in:
parent
2a9b1729e2
commit
3aef7dadd5
1 changed files with 8 additions and 2 deletions
10
comport.c
10
comport.c
|
|
@ -948,13 +948,19 @@ static int open_serial(unsigned int com_num, t_comport *x)
|
||||||
|
|
||||||
/* enable input and ignore modem controls */
|
/* enable input and ignore modem controls */
|
||||||
new->c_cflag |= (CREAD | CLOCAL);
|
new->c_cflag |= (CREAD | CLOCAL);
|
||||||
|
#if 1
|
||||||
/* always nocanonical, this means raw i/o no terminal */
|
/* always nocanonical, this means raw i/o no terminal */
|
||||||
new->c_lflag &= ~(ICANON | ECHO | ECHOE | ISIG);
|
new->c_lflag &= ~(ICANON | ECHO | ECHOE | ISIG);
|
||||||
|
|
||||||
|
/* don't process input */
|
||||||
|
new->c_iflag &= ~(IGNBRK | BRKINT | PARMRK | ISTRIP | INLCR | IGNCR | ICRNL | IXON);
|
||||||
|
|
||||||
/* no post processing */
|
/* no post processing */
|
||||||
new->c_oflag &= ~OPOST;
|
new->c_oflag &= ~OPOST;
|
||||||
|
#else
|
||||||
|
/* set to raw mode */
|
||||||
|
cfmakeraw(new);
|
||||||
|
#endif
|
||||||
/* setup to return after 0 seconds
|
/* setup to return after 0 seconds
|
||||||
..if no characters are received
|
..if no characters are received
|
||||||
TIME units are assumed to be 0.1 secs */
|
TIME units are assumed to be 0.1 secs */
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue