]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/demo/demo.c
Removal of sdi->index, step 4: fix trivial sr_dev_inst_new() calls
[libsigrok.git] / src / hardware / demo / demo.c
index 2609aa5fe283543e8614e2d9b6830cf3a1c2a959..73000bc77e96d2000ddc9a0ba64e72082604c4a5 100644 (file)
@@ -140,19 +140,17 @@ static const int devopts[] = {
        SR_CONF_SAMPLERATE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
        SR_CONF_LIMIT_SAMPLES | SR_CONF_GET | SR_CONF_SET,
        SR_CONF_LIMIT_MSEC | SR_CONF_GET | SR_CONF_SET,
-       SR_CONF_PATTERN_MODE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
        SR_CONF_NUM_LOGIC_CHANNELS | SR_CONF_GET,
        SR_CONF_NUM_ANALOG_CHANNELS | SR_CONF_GET,
-       SR_CONF_AMPLITUDE | SR_CONF_GET | SR_CONF_SET,
 };
 
 static const int devopts_cg_logic[] = {
-       SR_CONF_PATTERN_MODE,
+       SR_CONF_PATTERN_MODE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
 };
 
 static const int devopts_cg_analog[] = {
-       SR_CONF_PATTERN_MODE,
-       SR_CONF_AMPLITUDE,
+       SR_CONF_PATTERN_MODE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
+       SR_CONF_AMPLITUDE | SR_CONF_GET | SR_CONF_SET,
 };
 
 static const uint64_t samplerates[] = {
@@ -289,7 +287,7 @@ static GSList *scan(GSList *options)
        }
 
        devices = NULL;
-       sdi = sr_dev_inst_new(0, SR_ST_ACTIVE, "Demo device", NULL, NULL);
+       sdi = sr_dev_inst_new(SR_ST_ACTIVE, "Demo device", NULL, NULL);
        if (!sdi) {
                sr_err("Device instance creation failed.");
                return NULL;