From: Martin Ling Date: Fri, 15 Nov 2013 00:26:45 +0000 (+0000) Subject: Use new sp_port_config fields. X-Git-Tag: libsigrok-0.3.0~551 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=a82635f252167ccfb3c5e3e698439af62adca29c;p=libsigrok.git Use new sp_port_config fields. --- diff --git a/hardware/common/serial.c b/hardware/common/serial.c index 75c4a47d..d9f08990 100644 --- a/hardware/common/serial.c +++ b/hardware/common/serial.c @@ -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);