X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=hardware%2Funi-t-ut32x%2Fapi.c;h=81024dc7cc0548afb6d2515d636bc96519c9f4db;hb=64668fae1936bf57ff0da768c58646283773f549;hp=352853d8d34cf6efc71c69a70149b1b0eb68bff2;hpb=ba7dd8bbb8168cba432a844259a3e239aa5f36d7;p=libsigrok.git diff --git a/hardware/uni-t-ut32x/api.c b/hardware/uni-t-ut32x/api.c index 352853d8..81024dc7 100644 --- a/hardware/uni-t-ut32x/api.c +++ b/hardware/uni-t-ut32x/api.c @@ -86,7 +86,7 @@ static GSList *scan(GSList *options) sdi->inst_type = SR_INST_USB; sdi->conn = l->data; for (i = 0; i < 3; i++) { - if (!(ch = sr_probe_new(i, SR_PROBE_ANALOG, TRUE, + if (!(ch = sr_channel_new(i, SR_CHANNEL_ANALOG, TRUE, channels[i]))) { sr_dbg("Channel malloc failed."); return NULL; @@ -345,7 +345,8 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi, return SR_ERR; } - usb_source_add(drvc->sr_ctx, 10, uni_t_ut32x_handle_events, (void *)sdi); + usb_source_add(sdi->session, drvc->sr_ctx, 10, + uni_t_ut32x_handle_events, (void *)sdi); return SR_OK; }