]> sigrok.org Git - libsigrok.git/commitdiff
serial: Added flag IXANY (any char will restart) to XON/XOFF handshaking.
authorMatthias Heidbrink <redacted>
Thu, 17 Oct 2013 08:57:12 +0000 (10:57 +0200)
committerUwe Hermann <redacted>
Fri, 25 Oct 2013 17:11:14 +0000 (19:11 +0200)
hardware/common/serial.c

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