X-Git-Url: https://sigrok.org/gitweb/?p=libsigrok.git;a=blobdiff_plain;f=hardware%2Fhantek-dso%2Fapi.c;h=c948e4216a8260ea591f207a5ebaf9d62feeb375;hp=924516056ea865c561e1e550891c8d23ecbd08ed;hb=43cd4637285833706f8a404ca027bcf0ee75b9ae;hpb=56d0d24535700fb53e47a25ad5c73d34697695fa diff --git a/hardware/hantek-dso/api.c b/hardware/hantek-dso/api.c index 92451605..c948e421 100644 --- a/hardware/hantek-dso/api.c +++ b/hardware/hantek-dso/api.c @@ -176,7 +176,7 @@ static struct sr_dev_inst *dso_dev_new(int index, const struct dso_profile *prof * a trigger source internal to the device. */ for (i = 0; channel_names[i]; i++) { - if (!(ch = sr_channel_new(i, SR_PROBE_ANALOG, TRUE, + if (!(ch = sr_channel_new(i, SR_CHANNEL_ANALOG, TRUE, channel_names[i]))) return NULL; sdi->channels = g_slist_append(sdi->channels, ch); @@ -822,7 +822,7 @@ static int handle_event(int fd, int revents, void *cb_data) * TODO: Doesn't really cancel pending transfers so they might * come in after SR_DF_END is sent. */ - usb_source_remove(drvc->sr_ctx); + usb_source_remove(sdi->session, drvc->sr_ctx); packet.type = SR_DF_END; sr_session_send(sdi, &packet); @@ -933,7 +933,7 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi, void *cb_data) return SR_ERR; devc->dev_state = CAPTURE; - usb_source_add(drvc->sr_ctx, TICK, handle_event, (void *)sdi); + usb_source_add(sdi->session, drvc->sr_ctx, TICK, handle_event, (void *)sdi); /* Send header packet to the session bus. */ std_session_send_df_header(cb_data, LOG_PREFIX);