serial: Added flag IXANY (any char will restart) to XON/XOFF handshaking.
This commit is contained in:
parent
0c30b35fce
commit
1b943b6d8b
|
@ -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);
|
||||||
|
|
Loading…
Reference in New Issue