]> sigrok.org Git - libsigrok.git/blobdiff - hardware/ikalogic-scanalogic2/api.c
Replace 'probe group' with 'channel group' everywhere.
[libsigrok.git] / hardware / ikalogic-scanalogic2 / api.c
index 2329486e50e2abe533f4188c0ffd8705342462ce..052369a720bd4b712aa343b890ebed28534b8eb1 100644 (file)
@@ -308,12 +308,12 @@ static int cleanup(void)
 }
 
 static int config_get(int key, GVariant **data, const struct sr_dev_inst *sdi,
-               const struct sr_probe_group *probe_group)
+               const struct sr_channel_group *channel_group)
 {
        struct dev_context *devc;
        int ret;
 
-       (void)probe_group;
+       (void)channel_group;
 
        ret = SR_OK;
        devc = sdi->priv;
@@ -325,9 +325,6 @@ static int config_get(int key, GVariant **data, const struct sr_dev_inst *sdi,
        case SR_CONF_CAPTURE_RATIO:
                *data = g_variant_new_uint64(devc->capture_ratio);
                break;
-       case SR_CONF_MAX_UNCOMPRESSED_SAMPLES:
-               *data = g_variant_new_uint64(MAX_SAMPLES);
-               break;
        default:
                return SR_ERR_NA;
        }
@@ -336,12 +333,12 @@ static int config_get(int key, GVariant **data, const struct sr_dev_inst *sdi,
 }
 
 static int config_set(int key, GVariant *data, const struct sr_dev_inst *sdi,
-               const struct sr_probe_group *probe_group)
+               const struct sr_channel_group *channel_group)
 {
        uint64_t samplerate, limit_samples, capture_ratio;
        int ret;
 
-       (void)probe_group;
+       (void)channel_group;
 
        if (sdi->status != SR_ST_ACTIVE)
                return SR_ERR_DEV_CLOSED;
@@ -369,14 +366,14 @@ static int config_set(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)
+               const struct sr_channel_group *channel_group)
 {
-       GVariant *gvar;
+       GVariant *gvar, *grange[2];
        GVariantBuilder gvb;
        int ret;
 
        (void)sdi;
-       (void)probe_group;
+       (void)channel_group;
 
        ret = SR_OK;
 
@@ -396,6 +393,11 @@ static int config_list(int key, GVariant **data, const struct sr_dev_inst *sdi,
        case SR_CONF_TRIGGER_TYPE:
                *data = g_variant_new_string(TRIGGER_TYPES);
                break;
+       case SR_CONF_LIMIT_SAMPLES:
+               grange[0] = g_variant_new_uint64(0);
+               grange[1] = g_variant_new_uint64(MAX_SAMPLES);
+               *data = g_variant_new_tuple(grange, 2);
+               break;
        default:
                return SR_ERR_NA;
        }