X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=hardware%2Fdemo%2Fdemo.c;h=89ea6df3e5c083dac9d8924d34eecc3fae3bb94c;hb=87ca93c5043899e3c30edb7e09fadef3ee67d810;hp=2f845108a934ab7fdf6652a1b78c84cbe84b7b53;hpb=b35c829306b86dbeeeecf14de7fe30a05a88c914;p=libsigrok.git diff --git a/hardware/demo/demo.c b/hardware/demo/demo.c index 2f845108..89ea6df3 100644 --- a/hardware/demo/demo.c +++ b/hardware/demo/demo.c @@ -152,7 +152,9 @@ static int hw_init(void) static GSList *hw_scan(GSList *options) { struct sr_dev_inst *sdi; + struct sr_probe *probe; GSList *devices; + int i; (void)options; devices = NULL; @@ -164,6 +166,13 @@ static GSList *hw_scan(GSList *options) } sdi->driver = ddi; + for (i = 0; probe_names[i]; i++) { + if (!(probe = sr_probe_new(i, SR_PROBE_ANALOG, TRUE, + probe_names[i]))) + return NULL; + sdi->probes = g_slist_append(sdi->probes, probe); + } + devices = g_slist_append(devices, sdi); ddi->instances = g_slist_append(ddi->instances, sdi);