drvopts, ARRAY_SIZE(drvopts), sizeof(uint32_t));
} else if (cg_type == CG_ANALOG) {
*data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32,
- model->analog_devopts, model->num_analog_devopts,
+ model->devopts_cg_analog, model->num_devopts_cg_analog,
sizeof(uint32_t));
} else {
*data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32,
SR_CONF_TRIGGER_SLOPE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
};
-static const uint32_t analog_devopts[] = {
+static const uint32_t devopts_cg_analog[] = {
SR_CONF_NUM_VDIV | SR_CONF_GET,
SR_CONF_VDIV | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
SR_CONF_COUPLING | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
.devopts = &devopts,
.num_devopts = ARRAY_SIZE(devopts),
- .analog_devopts = &analog_devopts,
- .num_analog_devopts = ARRAY_SIZE(analog_devopts),
+ .devopts_cg_analog = &devopts_cg_analog,
+ .num_devopts_cg_analog = ARRAY_SIZE(devopts_cg_analog),
.coupling_options = &coupling_options,
.trigger_sources = &compact2_trigger_sources,
.devopts = &devopts,
.num_devopts = ARRAY_SIZE(devopts),
- .analog_devopts = &analog_devopts,
- .num_analog_devopts = ARRAY_SIZE(analog_devopts),
+ .devopts_cg_analog = &devopts_cg_analog,
+ .num_devopts_cg_analog = ARRAY_SIZE(devopts_cg_analog),
.coupling_options = &coupling_options,
.trigger_sources = &compact4_trigger_sources,
.devopts = &devopts,
.num_devopts = ARRAY_SIZE(devopts),
- .analog_devopts = &analog_devopts,
- .num_analog_devopts = ARRAY_SIZE(analog_devopts),
+ .devopts_cg_analog = &devopts_cg_analog,
+ .num_devopts_cg_analog = ARRAY_SIZE(devopts_cg_analog),
.coupling_options = &coupling_options,
.trigger_sources = &compact4_dig16_trigger_sources,
const uint32_t (*devopts)[];
const uint8_t num_devopts;
- const uint32_t (*analog_devopts)[];
- const uint8_t num_analog_devopts;
+ const uint32_t (*devopts_cg_analog)[];
+ const uint8_t num_devopts_cg_analog;
const char *(*coupling_options)[];
const uint8_t num_coupling_options;
SR_CONF_BUFFERSIZE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
};
-static const uint32_t cgopts[] = {
+static const uint32_t devopts_cg[] = {
SR_CONF_VDIV | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
SR_CONF_COUPLING | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
SR_CONF_PROBE_FACTOR | SR_CONF_GET | SR_CONF_SET,
if (!cg)
return STD_CONFIG_LIST(key, data, sdi, cg, NULL, drvopts, devopts);
*data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32,
- cgopts, ARRAY_SIZE(cgopts), sizeof(uint32_t));
+ devopts_cg, ARRAY_SIZE(devopts_cg), sizeof(uint32_t));
break;
case SR_CONF_SAMPLERATE:
g_variant_builder_init(&gvb, G_VARIANT_TYPE("a{sv}"));
SR_CONF_TRIGGER_SLOPE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
};
-static const uint32_t analog_devopts[] = {
+static const uint32_t devopts_cg_analog[] = {
SR_CONF_NUM_VDIV | SR_CONF_GET,
SR_CONF_VDIV | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
SR_CONF_COUPLING | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
if (!cg)
return STD_CONFIG_LIST(key, data, sdi, cg, NULL, drvopts, devopts);
*data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32,
- analog_devopts, ARRAY_SIZE(analog_devopts),
+ devopts_cg_analog, ARRAY_SIZE(devopts_cg_analog),
sizeof(uint32_t));
break;
case SR_CONF_COUPLING:
};
/** Hardware capabilities channel 1, 2. */
-static const uint32_t devopts_ch12[] = {
+static const uint32_t devopts_cg_ch12[] = {
SR_CONF_VOLTAGE | SR_CONF_GET,
SR_CONF_VOLTAGE_TARGET | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
SR_CONF_CURRENT | SR_CONF_GET,
};
/** Hardware capabilities channel 3 (LPS-304/305 only). */
-static const uint32_t devopts_ch3[] = {
+static const uint32_t devopts_cg_ch3[] = {
SR_CONF_VOLTAGE | SR_CONF_GET,
SR_CONF_ENABLED | SR_CONF_GET | SR_CONF_SET,
};
case SR_CONF_DEVICE_OPTIONS:
if ((ch_idx == 0) || (ch_idx == 1)) /* CH1, CH2 */
*data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32,
- devopts_ch12, ARRAY_SIZE(devopts_ch12), sizeof(uint32_t));
+ devopts_cg_ch12, ARRAY_SIZE(devopts_cg_ch12), sizeof(uint32_t));
else /* Must be CH3 */
*data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32,
- devopts_ch3, ARRAY_SIZE(devopts_ch3), sizeof(uint32_t));
+ devopts_cg_ch3, ARRAY_SIZE(devopts_cg_ch3), sizeof(uint32_t));
break;
case SR_CONF_VOLTAGE_TARGET:
g_variant_builder_init(&gvb, G_VARIANT_TYPE_ARRAY);
SR_CONF_DATA_SOURCE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
};
-static const uint32_t analog_devopts[] = {
+static const uint32_t devopts_cg_analog[] = {
SR_CONF_NUM_VDIV | SR_CONF_GET,
SR_CONF_VDIV | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
SR_CONF_COUPLING | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
for (i = 0; i < devc->model->analog_channels; i++) {
if (cg == devc->analog_groups[i]) {
*data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32,
- analog_devopts, ARRAY_SIZE(analog_devopts), sizeof(uint32_t));
+ devopts_cg_analog, ARRAY_SIZE(devopts_cg_analog), sizeof(uint32_t));
return SR_OK;
}
}
SR_CONF_TRIGGER_SLOPE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
};
-static const uint32_t analog_devopts[] = {
+static const uint32_t devopts_cg_analog[] = {
SR_CONF_NUM_VDIV | SR_CONF_GET,
SR_CONF_VDIV | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
SR_CONF_COUPLING | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
};
-static const uint32_t digital_devopts[] = {
+static const uint32_t devopts_cg_digital[] = {
};
enum {
case SR_CONF_DEVICE_OPTIONS:
if (cg_type == CG_ANALOG) {
*data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32,
- analog_devopts, ARRAY_SIZE(analog_devopts), sizeof(uint32_t));
+ devopts_cg_analog, ARRAY_SIZE(devopts_cg_analog), sizeof(uint32_t));
} else if (cg_type == CG_DIGITAL) {
*data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32,
- digital_devopts, ARRAY_SIZE(digital_devopts), sizeof(uint32_t));
+ devopts_cg_digital, ARRAY_SIZE(devopts_cg_digital), sizeof(uint32_t));
} else {
*data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32,
NULL, 0, sizeof(uint32_t));