]> sigrok.org Git - libsigrok.git/blobdiff - hardware/ikalogic-scanalogic2/api.c
Consistently use 'cg' for channel group variables.
[libsigrok.git] / hardware / ikalogic-scanalogic2 / api.c
index a91afdbb40a730e94843f914169333b1b3140ed4..ac5084d3be2f76fa28544042748bd192b96297a9 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 *cg)
 {
        struct dev_context *devc;
        int ret;
 
-       (void)probe_group;
+       (void)cg;
 
        ret = SR_OK;
        devc = sdi->priv;
@@ -333,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 *cg)
 {
        uint64_t samplerate, limit_samples, capture_ratio;
        int ret;
 
-       (void)probe_group;
+       (void)cg;
 
        if (sdi->status != SR_ST_ACTIVE)
                return SR_ERR_DEV_CLOSED;
@@ -366,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 *cg)
 {
-       GVariant *gvar;
+       GVariant *gvar, *grange[2];
        GVariantBuilder gvb;
        int ret;
 
        (void)sdi;
-       (void)probe_group;
+       (void)cg;
 
        ret = SR_OK;
 
@@ -393,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;
        }