return std_dev_clear_with_callback(di, (std_dev_clear_callback)clear_helper);
}
-static int config_get(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi,
- const struct sr_channel_group *cg)
+static int config_get(uint32_t key, GVariant **data,
+ const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
struct dev_context *devc;
const GVariantType *gvtype;
return ret;
}
-static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sdi,
- const struct sr_channel_group *cg)
+static int config_set(uint32_t key, GVariant *data,
+ const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
struct dev_context *devc;
double d;
return ret;
}
-static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi,
- const struct sr_channel_group *cg)
+static int config_list(uint32_t key, GVariant **data,
+ const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
struct dev_context *devc;
struct sr_channel *ch;
case SR_CONF_SCAN_OPTIONS:
case SR_CONF_DEVICE_OPTIONS:
return std_opts_config_list(key, data, sdi, cg,
- scanopts, ARRAY_SIZE(scanopts),
- drvopts, ARRAY_SIZE(drvopts),
+ ARRAY_AND_SIZE(scanopts),
+ ARRAY_AND_SIZE(drvopts),
(devc) ? devc->device->devopts : NULL,
(devc) ? devc->device->num_devopts : 0);
break;
switch (key) {
case SR_CONF_DEVICE_OPTIONS:
- *data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32,
- devc->device->devopts_cg, devc->device->num_devopts_cg,
- sizeof(uint32_t));
+ *data = std_gvar_array_u32(devc->device->devopts_cg, devc->device->num_devopts_cg);
break;
case SR_CONF_VOLTAGE_TARGET:
*data = std_gvar_min_max_step_array(ch_spec->voltage);