X-Git-Url: https://sigrok.org/gitweb/?p=libsigrok.git;a=blobdiff_plain;f=hardware%2Fikalogic-scanaplus%2Fapi.c;h=3f8276305bbfcaa4688a0569b25ca459307c730f;hp=369aed470b11c475a7366b4bd7347c7d631331a9;hb=43cd4637285833706f8a404ca027bcf0ee75b9ae;hpb=56d0d24535700fb53e47a25ad5c73d34697695fa diff --git a/hardware/ikalogic-scanaplus/api.c b/hardware/ikalogic-scanaplus/api.c index 369aed47..3f827630 100644 --- a/hardware/ikalogic-scanaplus/api.c +++ b/hardware/ikalogic-scanaplus/api.c @@ -133,7 +133,7 @@ static GSList *scan(GSList *options) sdi->priv = devc; for (i = 0; channel_names[i]; i++) { - if (!(ch = sr_channel_new(i, SR_PROBE_LOGIC, TRUE, + if (!(ch = sr_channel_new(i, SR_CHANNEL_LOGIC, TRUE, channel_names[i]))) return NULL; sdi->channels = g_slist_append(sdi->channels, ch); @@ -393,10 +393,10 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi, void *cb_data) return ret; /* Send header packet to the session bus. */ - std_session_send_df_header(cb_data, LOG_PREFIX); + std_session_send_df_header(sdi, LOG_PREFIX); /* Hook up a dummy handler to receive data from the device. */ - sr_source_add(-1, G_IO_IN, 0, scanaplus_receive_data, (void *)sdi); + sr_session_source_add(sdi->session, -1, G_IO_IN, 0, scanaplus_receive_data, (void *)sdi); return SR_OK; } @@ -405,15 +405,15 @@ static int dev_acquisition_stop(struct sr_dev_inst *sdi, void *cb_data) { struct sr_datafeed_packet packet; - (void)sdi; + (void)cb_data; sr_dbg("Stopping acquisition."); - sr_source_remove(-1); + sr_session_source_remove(sdi->session, -1); /* Send end packet to the session bus. */ sr_dbg("Sending SR_DF_END."); packet.type = SR_DF_END; - sr_session_send(cb_data, &packet); + sr_session_send(sdi, &packet); return SR_OK; }