X-Git-Url: https://sigrok.org/gitweb/?p=sigrok-cli.git;a=blobdiff_plain;f=device.c;h=b8709dc2bf0a7a4cca8eb559fdb21f34cc7ecf70;hp=a7dfe62d57166a08eb40aae5fc81e8f43f6d5eba;hb=c5e1e956dd6728e6fbb8d4ed75b5475bccb26ec9;hpb=ad54a1a630e6887204bc57a95075f403fd44aa6c diff --git a/device.c b/device.c index a7dfe62..b8709dc 100644 --- a/device.c +++ b/device.c @@ -20,10 +20,11 @@ #include "sigrok-cli.h" #include "config.h" #include +#include extern struct sr_context *sr_ctx; extern gchar *opt_drv; -extern gchar *opt_probe_group; +extern gchar *opt_channel_group; /* Convert driver options hash to GSList of struct sr_config. */ static GSList *hash_to_hwopt(GHashTable *hash) @@ -115,23 +116,23 @@ GSList *device_scan(void) return devices; } -struct sr_probe_group *select_probe_group(struct sr_dev_inst *sdi) +struct sr_channel_group *select_channel_group(struct sr_dev_inst *sdi) { - struct sr_probe_group *pg; + struct sr_channel_group *cg; GSList *l; - if (!opt_probe_group) + if (!opt_channel_group) return NULL; - if (!sdi->probe_groups) { - g_critical("This device does not have any probe groups."); + if (!sdi->channel_groups) { + g_critical("This device does not have any channel groups."); return NULL; } - for (l = sdi->probe_groups; l; l = l->next) { - pg = l->data; - if (!strcasecmp(opt_probe_group, pg->name)) { - return pg; + for (l = sdi->channel_groups; l; l = l->next) { + cg = l->data; + if (!strcasecmp(opt_channel_group, cg->name)) { + return cg; } }