X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Farachnid-labs-re-load-pro%2Fapi.c;h=c14c20d400d05db58c3c55b32680f91893666b8e;hb=d41c4131a2dcdb3f1eec7bfc1065e70eb2597158;hp=cfb413d5a2581ca9a601565e12d3f10f670eb565;hpb=0aaaee2dd325c81b31ac2c285f4bbe0990b9cc8a;p=libsigrok.git diff --git a/src/hardware/arachnid-labs-re-load-pro/api.c b/src/hardware/arachnid-labs-re-load-pro/api.c index cfb413d5..c14c20d4 100644 --- a/src/hardware/arachnid-labs-re-load-pro/api.c +++ b/src/hardware/arachnid-labs-re-load-pro/api.c @@ -99,8 +99,6 @@ static GSList *scan(struct sr_dev_driver *di, GSList *options) if (serial_open(serial, SERIAL_RDWR) != SR_OK) return NULL; - serial_flush(serial); - /* * First stop potentially running monitoring and wait for 50ms before * next command can be sent. @@ -148,9 +146,7 @@ static GSList *scan(struct sr_dev_driver *di, GSList *options) sdi->inst_type = SR_INST_SERIAL; sdi->conn = serial; - cg = g_malloc0(sizeof(struct sr_channel_group)); - cg->name = g_strdup("1"); - sdi->channel_groups = g_slist_append(sdi->channel_groups, cg); + cg = sr_channel_group_new(sdi, "1", NULL); ch = sr_channel_new(sdi, 0, SR_CHANNEL_ANALOG, TRUE, "V"); cg->channels = g_slist_append(cg->channels, ch); @@ -347,7 +343,6 @@ static int dev_acquisition_stop(struct sr_dev_inst *sdi) g_mutex_clear(&devc->acquisition_mutex); return ret; - } static struct sr_dev_driver arachnid_labs_re_load_pro_driver_info = {