]> 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 d2fddde466751c1eb17b57e5d7b06e9b26127a29..73000bc77e96d2000ddc9a0ba64e72082604c4a5 100644 (file)
@@ -135,20 +135,22 @@ static const uint32_t scanopts[] = {
 
 static const int devopts[] = {
        SR_CONF_LOGIC_ANALYZER,
-       SR_CONF_DEMO_DEV,
-       SR_CONF_SAMPLERATE,
        SR_CONF_CONTINUOUS,
-       SR_CONF_LIMIT_SAMPLES,
-       SR_CONF_LIMIT_MSEC,
+       SR_CONF_DEMO_DEV,
+       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_NUM_LOGIC_CHANNELS | SR_CONF_GET,
+       SR_CONF_NUM_ANALOG_CHANNELS | SR_CONF_GET,
 };
 
 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[] = {
@@ -285,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;