X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;f=hardware%2Fikalogic-scanalogic2%2Fapi.c;h=052369a720bd4b712aa343b890ebed28534b8eb1;hb=660e398fe9f5fc608787f8fd75a9df8aac61026f;hp=2329486e50e2abe533f4188c0ffd8705342462ce;hpb=c2b988bd4a1986c15a0ffc8a38b3aa56d1a68c89;p=libsigrok.git diff --git a/hardware/ikalogic-scanalogic2/api.c b/hardware/ikalogic-scanalogic2/api.c index 2329486e..052369a7 100644 --- a/hardware/ikalogic-scanalogic2/api.c +++ b/hardware/ikalogic-scanalogic2/api.c @@ -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; }