X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Fmic-985xx%2Fapi.c;h=cec9a73fd278a7e128175cf888cadae3141616c0;hb=0f8bee7162f41095ca1975fec9a87975ce5a554a;hp=3af30a2add2c45945719ba34837de3f476e0fead;hpb=e66d1892d0dd16ed166fc8f13493f95de0607362;p=libsigrok.git diff --git a/src/hardware/mic-985xx/api.c b/src/hardware/mic-985xx/api.c index 3af30a2a..cec9a73f 100644 --- a/src/hardware/mic-985xx/api.c +++ b/src/hardware/mic-985xx/api.c @@ -116,13 +116,10 @@ static GSList *scan(GSList *options, int idx) if (!conn) return NULL; - if (serialcomm) { - /* Use the provided comm specs. */ + if (serialcomm) devices = mic_scan(conn, serialcomm, idx); - } else { - /* Try the default. */ + else devices = mic_scan(conn, mic_devs[idx].conn, idx); - } return devices; } @@ -166,7 +163,6 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi, int idx) sr_sw_limits_acquisition_start(&devc->limits); std_session_send_df_header(sdi); - /* Poll every 100ms, or whenever some data comes in. */ serial = sdi->conn; serial_source_add(sdi->session, serial, G_IO_IN, 100, mic_devs[idx].receive_data, (void *)sdi);