static GSList *scan(GSList *options)
{
struct sr_dev_inst *sdi;
- struct sr_probe *probe;
+ struct sr_channel *probe;
struct drv_context *drvc;
struct dev_context *devc;
GSList *devices;
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_channel_group *cg)
{
struct dev_context *devc;
+ (void)cg;
+
switch (id) {
case SR_CONF_SAMPLERATE:
if (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_channel_group *cg)
{
struct dev_context *devc;
+ (void)cg;
+
if (sdi->status != SR_ST_ACTIVE)
return SR_ERR_DEV_CLOSED;
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_channel_group *cg)
{
- GVariant *gvar;
+ GVariant *gvar, *grange[2];
GVariantBuilder gvb;
(void)sdi;
+ (void)cg;
switch (key) {
case SR_CONF_DEVICE_OPTIONS:
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;