Use new sp_port_config fields.

This commit is contained in:
Martin Ling 2013-11-15 00:26:45 +00:00 committed by Uwe Hermann
parent e385e2ed90
commit a82635f252
1 changed files with 4 additions and 2 deletions

View 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);