]> sigrok.org Git - libsigrok.git/blobdiff - hardware/chronovu-la8/api.c
Remove SR_CONF_MAX_UNCOMPRESSED_SAMPLES again.
[libsigrok.git] / hardware / chronovu-la8 / api.c
index ec4bf35f03ebc29d44fea57fbb78960bdfdaf97f..0fc90353016c1ad54db726acd0d461bd40eaaf78 100644 (file)
@@ -262,10 +262,13 @@ static int cleanup(void)
        return dev_clear();
 }
 
-static int config_get(int id, GVariant **data, const struct sr_dev_inst *sdi)
+static int config_get(int id, GVariant **data, const struct sr_dev_inst *sdi,
+               const struct sr_probe_group *probe_group)
 {
        struct dev_context *devc;
 
+       (void)probe_group;
+
        switch (id) {
        case SR_CONF_SAMPLERATE:
                if (sdi) {
@@ -283,10 +286,13 @@ static int config_get(int id, GVariant **data, const struct sr_dev_inst *sdi)
        return SR_OK;
 }
 
-static int config_set(int id, GVariant *data, const struct sr_dev_inst *sdi)
+static int config_set(int id, GVariant *data, const struct sr_dev_inst *sdi,
+               const struct sr_probe_group *probe_group)
 {
        struct dev_context *devc;
 
+       (void)probe_group;
+
        if (sdi->status != SR_ST_ACTIVE)
                return SR_ERR_DEV_CLOSED;
 
@@ -326,12 +332,14 @@ static int config_set(int id, GVariant *data, const struct sr_dev_inst *sdi)
        return SR_OK;
 }
 
-static int config_list(int key, GVariant **data, const struct sr_dev_inst *sdi)
+static int config_list(int key, GVariant **data, const struct sr_dev_inst *sdi,
+               const struct sr_probe_group *probe_group)
 {
-       GVariant *gvar;
+       GVariant *gvar, *grange[2];
        GVariantBuilder gvb;
 
        (void)sdi;
+       (void)probe_group;
 
        switch (key) {
        case SR_CONF_DEVICE_OPTIONS:
@@ -350,6 +358,11 @@ static int config_list(int key, GVariant **data, const struct sr_dev_inst *sdi)
                g_variant_builder_add(&gvb, "{sv}", "samplerates", gvar);
                *data = g_variant_builder_end(&gvb);
                break;
+       case SR_CONF_LIMIT_SAMPLES:
+               grange[0] = g_variant_new_uint64(0);
+               grange[1] = g_variant_new_uint64(MAX_NUM_SAMPLES);
+               *data = g_variant_new_tuple(grange, 2);
+               break;
        case SR_CONF_TRIGGER_TYPE:
                *data = g_variant_new_string(TRIGGER_TYPE);
                break;