]> sigrok.org Git - libsigrok.git/commitdiff
demo: use new scan API
authorBert Vermeulen <redacted>
Sat, 14 Jul 2012 13:49:30 +0000 (15:49 +0200)
committerBert Vermeulen <redacted>
Fri, 3 Aug 2012 08:27:38 +0000 (10:27 +0200)
hardware/demo/demo.c

index cdd4d1d3415045605f7adc82fd28c024c32e5295..8f7bfb2966eb418c97baf7e25f8ee999d781bf92 100644 (file)
@@ -149,9 +149,13 @@ static int hw_init(void)
        return SR_OK;
 }
 
-static int hw_scan(void)
+static GSList *hw_scan(GSList *options)
 {
        struct sr_dev_inst *sdi;
+       GSList *devices;
+
+       (void)options;
+       devices = NULL;
 
        sdi = sr_dev_inst_new(0, SR_ST_ACTIVE, DEMONAME, NULL, NULL);
        if (!sdi) {
@@ -159,9 +163,10 @@ static int hw_scan(void)
                return 0;
        }
 
+       devices = g_slist_append(devices, sdi);
        ddi->instances = g_slist_append(ddi->instances, sdi);
 
-       return 1;
+       return devices;
 }
 
 static int hw_dev_open(int dev_index)