X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;f=hardware%2Funi-t-ut32x%2Fapi.c;h=b38d2fb0d52a42c77f4bc486730c366750787d60;hb=fd830beb6751a966a0f12a9ca48a8550bbe5bbba;hp=caea61f7b71218be8bfa099333cf8543d297507a;hpb=660e398fe9f5fc608787f8fd75a9df8aac61026f;p=libsigrok.git diff --git a/hardware/uni-t-ut32x/api.c b/hardware/uni-t-ut32x/api.c index caea61f7..b38d2fb0 100644 --- a/hardware/uni-t-ut32x/api.c +++ b/hardware/uni-t-ut32x/api.c @@ -28,7 +28,7 @@ static const int32_t hwcaps[] = { SR_CONF_DATA_SOURCE, }; -static char *probes[] = { +static char *channels[] = { "T1", "T2", "T1-T2", @@ -53,7 +53,7 @@ static GSList *scan(GSList *options) struct drv_context *drvc; struct dev_context *devc; struct sr_dev_inst *sdi; - struct sr_probe *probe; + struct sr_channel *ch; struct sr_config *src; GSList *usb_devices, *devices, *l; int i; @@ -86,12 +86,12 @@ static GSList *scan(GSList *options) sdi->inst_type = SR_INST_USB; sdi->conn = l->data; for (i = 0; i < 3; i++) { - if (!(probe = sr_probe_new(i, SR_PROBE_ANALOG, TRUE, - probes[i]))) { - sr_dbg("Probe malloc failed."); + if (!(ch = sr_channel_new(i, SR_CHANNEL_ANALOG, TRUE, + channels[i]))) { + sr_dbg("Channel malloc failed."); return NULL; } - sdi->probes = g_slist_append(sdi->probes, probe); + sdi->channels = g_slist_append(sdi->channels, ch); } if (!(devc = g_try_malloc(sizeof(struct dev_context)))) { @@ -200,11 +200,11 @@ static int cleanup(void) } static int config_get(int key, GVariant **data, const struct sr_dev_inst *sdi, - const struct sr_channel_group *channel_group) + const struct sr_channel_group *cg) { struct dev_context *devc; - (void)channel_group; + (void)cg; devc = sdi->priv; switch (key) { @@ -225,13 +225,13 @@ static int config_get(int key, GVariant **data, const struct sr_dev_inst *sdi, } static int config_set(int key, GVariant *data, const struct sr_dev_inst *sdi, - const struct sr_channel_group *channel_group) + const struct sr_channel_group *cg) { struct dev_context *devc; int ret; const char *tmp_str; - (void)channel_group; + (void)cg; if (sdi->status != SR_ST_ACTIVE) return SR_ERR_DEV_CLOSED; @@ -266,11 +266,11 @@ static int config_set(int key, GVariant *data, const struct sr_dev_inst *sdi, } static int config_list(int key, GVariant **data, const struct sr_dev_inst *sdi, - const struct sr_channel_group *channel_group) + const struct sr_channel_group *cg) { (void)sdi; - (void)channel_group; + (void)cg; switch (key) { case SR_CONF_DEVICE_OPTIONS: