]> sigrok.org Git - libsigrok.git/commitdiff
Use new sp_port_config fields.
authorMartin Ling <redacted>
Fri, 15 Nov 2013 00:26:45 +0000 (00:26 +0000)
committerUwe Hermann <redacted>
Tue, 19 Nov 2013 13:26:18 +0000 (14:26 +0100)
hardware/common/serial.c

index 75c4a47d6e69f89b197892d9504d3c9eb2471b55..d9f089900b9649523d1cace4576f7ae4b2aa2f73 100644 (file)
@@ -297,9 +297,11 @@ SR_PRIV int serial_set_params(struct sr_serial_dev_inst *serial, int baudrate,
        config.bits = bits;
        config.parity = parity;
        config.stopbits = stopbits;
-       config.flowcontrol = flowcontrol;
-       config.rts = rts;
+       config.rts = flowcontrol == 1 ? SP_RTS_FLOW_CONTROL : rts;
+       config.cts = flowcontrol == 1 ? SP_CTS_FLOW_CONTROL : SP_CTS_IGNORE;
        config.dtr = dtr;
+       config.dsr = SP_DSR_IGNORE;
+       config.xon_xoff = flowcontrol == 2 ? SP_XONXOFF_INOUT : SP_XONXOFF_DISABLED;
 
        ret = sp_set_config(serial->data, &config);