]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/chronovu-la/api.c
Removal of sdi->index, step 4: fix trivial sr_dev_inst_new() calls
[libsigrok.git] / src / hardware / chronovu-la / api.c
index ae977a4b96ec39e59722bee9d3f00683b44e8c52..594a064919634cca8b524ec618b2f5a8e4944815 100644 (file)
@@ -25,10 +25,10 @@ static struct sr_dev_driver *di = &chronovu_la_driver_info;
 
 static const uint32_t devopts[] = {
        SR_CONF_LOGIC_ANALYZER,
-       SR_CONF_SAMPLERATE,
-       SR_CONF_TRIGGER_MATCH,
-       SR_CONF_LIMIT_MSEC, /* TODO: Not yet implemented. */
-       SR_CONF_LIMIT_SAMPLES, /* TODO: Not yet implemented. */
+       SR_CONF_LIMIT_MSEC | SR_CONF_SET,
+       SR_CONF_LIMIT_SAMPLES | SR_CONF_SET | SR_CONF_LIST,
+       SR_CONF_SAMPLERATE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
+       SR_CONF_TRIGGER_MATCH | SR_CONF_LIST,
 };
 
 static const int32_t trigger_matches[] = {
@@ -120,7 +120,7 @@ static int add_device(int idx, int model, GSList **devices)
        devc->cur_samplerate = devc->prof->max_samplerate;
 
        /* Register the device with libsigrok. */
-       sdi = sr_dev_inst_new(0, SR_ST_INITIALIZING,
+       sdi = sr_dev_inst_new(SR_ST_INITIALIZING,
                              "ChronoVu", devc->prof->modelname, NULL);
        if (!sdi) {
                sr_err("Failed to create device instance.");
@@ -379,7 +379,7 @@ static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *
        case SR_CONF_TRIGGER_MATCH:
                if (!sdi || !sdi->priv || !(devc = sdi->priv) || !devc->prof)
                        return SR_ERR_BUG;
-               *data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32,
+               *data = g_variant_new_fixed_array(G_VARIANT_TYPE_INT32,
                                trigger_matches, devc->prof->num_trigger_matches,
                                sizeof(int32_t));
                break;