serial: Added flag IXANY (any char will restart) to XON/XOFF handshaking.

This commit is contained in:
Matthias Heidbrink 2013-10-17 10:57:12 +02:00 committed by Uwe Hermann
parent 0c30b35fce
commit 1b943b6d8b
1 changed files with 2 additions and 2 deletions

View File

@ -548,7 +548,7 @@ SR_PRIV int serial_set_params(struct sr_serial_dev_inst *serial, int baudrate,
return SR_ERR; return SR_ERR;
} }
term.c_iflag &= ~(IXON | IXOFF); term.c_iflag &= ~(IXON | IXOFF | IXANY);
term.c_cflag &= ~CRTSCTS; term.c_cflag &= ~CRTSCTS;
switch (flowcontrol) { switch (flowcontrol) {
case 0: case 0:
@ -561,7 +561,7 @@ SR_PRIV int serial_set_params(struct sr_serial_dev_inst *serial, int baudrate,
break; break;
case 2: case 2:
sr_spew("Configuring XON/XOFF flow control."); sr_spew("Configuring XON/XOFF flow control.");
term.c_iflag |= IXON | IXOFF; term.c_iflag |= (IXON | IXOFF | IXANY);
break; break;
default: default:
sr_err("Unsupported flow control setting %d.", flowcontrol); sr_err("Unsupported flow control setting %d.", flowcontrol);