Consistently use 'devopts' variable across all drivers.

This commit is contained in:
Bert Vermeulen 2014-09-16 22:11:39 +02:00
parent 584560f142
commit f254bc4bba
42 changed files with 111 additions and 111 deletions

View File

@ -32,7 +32,7 @@ static const uint32_t hwopts[] = {
SR_CONF_SERIALCOMM,
};
static const uint32_t hwcaps[] = {
static const uint32_t devopts[] = {
SR_CONF_MULTIMETER,
SR_CONF_LIMIT_SAMPLES,
SR_CONF_LIMIT_MSEC,
@ -229,7 +229,7 @@ static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *
break;
case SR_CONF_DEVICE_OPTIONS:
*data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32,
hwcaps, ARRAY_SIZE(hwcaps), sizeof(uint32_t));
devopts, ARRAY_SIZE(devopts), sizeof(uint32_t));
break;
default:
return SR_ERR_NA;

View File

@ -25,7 +25,7 @@ static const uint32_t hwopts[] = {
SR_CONF_SERIALCOMM,
};
static const uint32_t hwcaps[] = {
static const uint32_t devopts[] = {
SR_CONF_THERMOMETER,
SR_CONF_LIMIT_SAMPLES,
SR_CONF_LIMIT_MSEC,
@ -218,7 +218,7 @@ static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *
break;
case SR_CONF_DEVICE_OPTIONS:
*data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32,
hwcaps, ARRAY_SIZE(hwcaps), sizeof(uint32_t));
devopts, ARRAY_SIZE(devopts), sizeof(uint32_t));
break;
case SR_CONF_DATA_SOURCE:
*data = g_variant_new_strv(data_sources, ARRAY_SIZE(data_sources));

View File

@ -71,7 +71,7 @@ static const char *channel_names[] = {
"9", "10", "11", "12", "13", "14", "15", "16",
};
static const uint32_t hwcaps[] = {
static const uint32_t devopts[] = {
SR_CONF_LOGIC_ANALYZER,
SR_CONF_SAMPLERATE,
SR_CONF_TRIGGER_MATCH,
@ -897,7 +897,7 @@ static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *
switch (key) {
case SR_CONF_DEVICE_OPTIONS:
*data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32,
hwcaps, ARRAY_SIZE(hwcaps), sizeof(uint32_t));
devopts, ARRAY_SIZE(devopts), sizeof(uint32_t));
break;
case SR_CONF_SAMPLERATE:
g_variant_builder_init(&gvb, G_VARIANT_TYPE("a{sv}"));

View File

@ -24,7 +24,7 @@ SR_PRIV struct sr_dev_driver beaglelogic_driver_info;
static struct sr_dev_driver *di = &beaglelogic_driver_info;
/* Hardware capabiities */
static const uint32_t hwcaps[] = {
static const uint32_t devopts[] = {
SR_CONF_LOGIC_ANALYZER,
SR_CONF_SAMPLERATE,
SR_CONF_TRIGGER_MATCH,
@ -304,7 +304,7 @@ static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *
switch (key) {
case SR_CONF_DEVICE_OPTIONS:
*data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32,
hwcaps, ARRAY_SIZE(hwcaps), sizeof(uint32_t));
devopts, ARRAY_SIZE(devopts), sizeof(uint32_t));
break;
case SR_CONF_SAMPLERATE:
g_variant_builder_init(&gvb, G_VARIANT_TYPE("a{sv}"));

View File

@ -25,7 +25,7 @@ static const uint32_t hwopts[] = {
SR_CONF_CONN,
};
static const uint32_t hwcaps[] = {
static const uint32_t devopts[] = {
SR_CONF_MULTIMETER,
SR_CONF_LIMIT_SAMPLES,
SR_CONF_LIMIT_MSEC,
@ -247,7 +247,7 @@ static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *
break;
case SR_CONF_DEVICE_OPTIONS:
*data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32,
hwcaps, ARRAY_SIZE(hwcaps), sizeof(uint32_t));
devopts, ARRAY_SIZE(devopts), sizeof(uint32_t));
break;
default:
return SR_ERR_NA;

View File

@ -24,7 +24,7 @@ static const uint32_t hwopts[] = {
SR_CONF_SERIALCOMM,
};
static const uint32_t hwcaps[] = {
static const uint32_t devopts[] = {
SR_CONF_MULTIMETER,
SR_CONF_LIMIT_SAMPLES,
SR_CONF_CONTINUOUS,
@ -193,7 +193,7 @@ static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *
break;
case SR_CONF_DEVICE_OPTIONS:
*data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32,
hwcaps, ARRAY_SIZE(hwcaps), sizeof(uint32_t));
devopts, ARRAY_SIZE(devopts), sizeof(uint32_t));
break;
default:
return SR_ERR_NA;

View File

@ -28,7 +28,7 @@ static const uint32_t hwopts[] = {
SR_CONF_CONN,
};
static const uint32_t hwcaps[] = {
static const uint32_t devopts[] = {
SR_CONF_SOUNDLEVELMETER,
SR_CONF_LIMIT_SAMPLES,
SR_CONF_CONTINUOUS,
@ -346,7 +346,7 @@ static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *
break;
case SR_CONF_DEVICE_OPTIONS:
*data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32,
hwcaps, ARRAY_SIZE(hwcaps), sizeof(uint32_t));
devopts, ARRAY_SIZE(devopts), sizeof(uint32_t));
break;
case SR_CONF_SPL_WEIGHT_FREQ:
*data = g_variant_new_strv(weight_freq, ARRAY_SIZE(weight_freq));

View File

@ -25,7 +25,7 @@ static const uint32_t hwopts[] = {
SR_CONF_SERIALCOMM,
};
static const uint32_t hwcaps[] = {
static const uint32_t devopts[] = {
SR_CONF_THERMOMETER,
SR_CONF_LIMIT_SAMPLES,
SR_CONF_LIMIT_MSEC,
@ -201,7 +201,7 @@ static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *
break;
case SR_CONF_DEVICE_OPTIONS:
*data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32,
hwcaps, ARRAY_SIZE(hwcaps), sizeof(uint32_t));
devopts, ARRAY_SIZE(devopts), sizeof(uint32_t));
break;
default:
return SR_ERR_NA;

View File

@ -23,7 +23,7 @@
SR_PRIV struct sr_dev_driver chronovu_la_driver_info;
static struct sr_dev_driver *di = &chronovu_la_driver_info;
static const uint32_t hwcaps[] = {
static const uint32_t devopts[] = {
SR_CONF_LOGIC_ANALYZER,
SR_CONF_SAMPLERATE,
SR_CONF_TRIGGER_MATCH,
@ -352,7 +352,7 @@ static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *
switch (key) {
case SR_CONF_DEVICE_OPTIONS:
*data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32,
hwcaps, ARRAY_SIZE(hwcaps), sizeof(uint32_t));
devopts, ARRAY_SIZE(devopts), sizeof(uint32_t));
break;
case SR_CONF_SAMPLERATE:
if (!sdi || !sdi->priv || !(devc = sdi->priv))

View File

@ -35,7 +35,7 @@ static const uint32_t hwopts[] = {
SR_CONF_SERIALCOMM,
};
static const uint32_t hwcaps[] = {
static const uint32_t devopts[] = {
SR_CONF_SOUNDLEVELMETER,
SR_CONF_LIMIT_SAMPLES,
SR_CONF_LIMIT_MSEC,
@ -180,7 +180,7 @@ static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *
break;
case SR_CONF_DEVICE_OPTIONS:
*data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32,
hwcaps, ARRAY_SIZE(hwcaps), sizeof(uint32_t));
devopts, ARRAY_SIZE(devopts), sizeof(uint32_t));
break;
default:
return SR_ERR_NA;

View File

@ -31,7 +31,7 @@ static const uint32_t hwopts[] = {
SR_CONF_SERIALCOMM,
};
static const uint32_t hwcaps[] = {
static const uint32_t devopts[] = {
SR_CONF_POWER_SUPPLY,
SR_CONF_OUTPUT_VOLTAGE,
SR_CONF_OUTPUT_CURRENT,
@ -180,7 +180,7 @@ static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *
break;
case SR_CONF_DEVICE_OPTIONS:
*data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32,
hwcaps, ARRAY_SIZE(hwcaps), sizeof(uint32_t));
devopts, ARRAY_SIZE(devopts), sizeof(uint32_t));
break;
default:
return SR_ERR_NA;

View File

@ -32,7 +32,7 @@ static const uint32_t hwopts[] = {
SR_CONF_SERIALCOMM,
};
static const uint32_t hwcaps[] = {
static const uint32_t devopts[] = {
SR_CONF_MULTIMETER,
SR_CONF_LIMIT_SAMPLES,
SR_CONF_LIMIT_MSEC,
@ -254,7 +254,7 @@ static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *
break;
case SR_CONF_DEVICE_OPTIONS:
*data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32,
hwcaps, ARRAY_SIZE(hwcaps), sizeof(uint32_t));
devopts, ARRAY_SIZE(devopts), sizeof(uint32_t));
break;
default:
return SR_ERR_NA;

View File

@ -77,7 +77,7 @@ static const uint32_t hwopts[] = {
SR_CONF_CONN,
};
static const uint32_t hwcaps[] = {
static const uint32_t devopts[] = {
SR_CONF_LOGIC_ANALYZER,
SR_CONF_TRIGGER_MATCH,
SR_CONF_SAMPLERATE,
@ -482,7 +482,7 @@ static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *
break;
case SR_CONF_DEVICE_OPTIONS:
*data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32,
hwcaps, ARRAY_SIZE(hwcaps), sizeof(uint32_t));
devopts, ARRAY_SIZE(devopts), sizeof(uint32_t));
break;
case SR_CONF_SAMPLERATE:
g_variant_builder_init(&gvb, G_VARIANT_TYPE("a{sv}"));

View File

@ -40,7 +40,7 @@ static const uint32_t hwopts[] = {
};
/** Hardware capabilities for Metrahit 1x/2x devices in send mode. */
static const uint32_t hwcaps_sm[] = {
static const uint32_t devopts_sm[] = {
SR_CONF_MULTIMETER,
SR_CONF_THERMOMETER, /**< All GMC 1x/2x multimeters seem to support this */
SR_CONF_LIMIT_SAMPLES,
@ -49,7 +49,7 @@ static const uint32_t hwcaps_sm[] = {
};
/** Hardware capabilities for Metrahit 2x devices in bidirectional Mode. */
static const uint32_t hwcaps_bd[] = {
static const uint32_t devopts_bd[] = {
SR_CONF_MULTIMETER,
SR_CONF_THERMOMETER, /**< All GMC 1x/2x multimeters seem to support this */
SR_CONF_LIMIT_SAMPLES,
@ -479,7 +479,7 @@ static int config_list_sm(uint32_t key, GVariant **data, const struct sr_dev_ins
switch (key) {
case SR_CONF_DEVICE_OPTIONS:
*data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32,
hwcaps_sm, ARRAY_SIZE(hwcaps_sm), sizeof(uint32_t));
devopts_sm, ARRAY_SIZE(devopts_sm), sizeof(uint32_t));
break;
default:
return config_list_common(key, data, sdi, cg);
@ -495,7 +495,7 @@ static int config_list_bd(uint32_t key, GVariant **data, const struct sr_dev_ins
switch (key) {
case SR_CONF_DEVICE_OPTIONS:
*data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32,
hwcaps_bd, ARRAY_SIZE(hwcaps_bd), sizeof(uint32_t));
devopts_bd, ARRAY_SIZE(devopts_bd), sizeof(uint32_t));
break;
default:
return config_list_common(key, data, sdi, cg);

View File

@ -515,11 +515,11 @@ static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *
case SR_CONF_DEVICE_OPTIONS:
if (cg_type == CG_NONE) {
*data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32,
model->hw_caps, model->num_hwcaps,
model->devopts, model->num_devopts,
sizeof(uint32_t));
} else if (cg_type == CG_ANALOG) {
*data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32,
model->analog_hwcaps, model->num_analog_hwcaps,
model->analog_devopts, model->num_analog_devopts,
sizeof(uint32_t));
} else {
*data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32,

View File

@ -45,7 +45,7 @@ static const char *hameg_scpi_dialect[] = {
[SCPI_CMD_SET_ANALOG_CHAN_STATE] = ":CHAN%d:STAT %d",
};
static const uint32_t hmo_hwcaps[] = {
static const uint32_t hmo_devopts[] = {
SR_CONF_OSCILLOSCOPE,
SR_CONF_TRIGGER_SOURCE,
SR_CONF_TIMEBASE,
@ -56,7 +56,7 @@ static const uint32_t hmo_hwcaps[] = {
SR_CONF_LIMIT_FRAMES,
};
static const uint32_t hmo_analog_caps[] = {
static const uint32_t hmo_analog_devopts[] = {
SR_CONF_NUM_VDIV,
SR_CONF_COUPLING,
SR_CONF_VDIV,
@ -204,11 +204,11 @@ static struct scope_config scope_models[] = {
.analog_names = &scope_analog_channel_names,
.digital_names = &scope_digital_channel_names,
.hw_caps = &hmo_hwcaps,
.num_hwcaps = ARRAY_SIZE(hmo_hwcaps),
.devopts = &hmo_devopts,
.num_devopts = ARRAY_SIZE(hmo_devopts),
.analog_hwcaps = &hmo_analog_caps,
.num_analog_hwcaps = ARRAY_SIZE(hmo_analog_caps),
.analog_devopts = &hmo_analog_devopts,
.num_analog_devopts = ARRAY_SIZE(hmo_analog_devopts),
.coupling_options = &hmo_coupling_options,
.trigger_sources = &hmo_compact2_trigger_sources,
@ -234,11 +234,11 @@ static struct scope_config scope_models[] = {
.analog_names = &scope_analog_channel_names,
.digital_names = &scope_digital_channel_names,
.hw_caps = &hmo_hwcaps,
.num_hwcaps = ARRAY_SIZE(hmo_hwcaps),
.devopts = &hmo_devopts,
.num_devopts = ARRAY_SIZE(hmo_devopts),
.analog_hwcaps = &hmo_analog_caps,
.num_analog_hwcaps = ARRAY_SIZE(hmo_analog_caps),
.analog_devopts = &hmo_analog_devopts,
.num_analog_devopts = ARRAY_SIZE(hmo_analog_devopts),
.coupling_options = &hmo_coupling_options,
.trigger_sources = &hmo_compact4_trigger_sources,

View File

@ -40,11 +40,11 @@ struct scope_config {
const char *(*analog_names)[];
const char *(*digital_names)[];
const uint32_t (*hw_caps)[];
const uint8_t num_hwcaps;
const uint32_t (*devopts)[];
const uint8_t num_devopts;
const uint32_t (*analog_hwcaps)[];
const uint8_t num_analog_hwcaps;
const uint32_t (*analog_devopts)[];
const uint8_t num_analog_devopts;
const char *(*coupling_options)[];
const uint8_t num_coupling_options;

View File

@ -19,7 +19,7 @@
#include "protocol.h"
static const uint32_t hwcaps[] = {
static const uint32_t devopts[] = {
SR_CONF_LOGIC_ANALYZER,
SR_CONF_SAMPLERATE,
SR_CONF_LIMIT_SAMPLES,
@ -386,7 +386,7 @@ static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *
switch (key) {
case SR_CONF_DEVICE_OPTIONS:
*data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32,
hwcaps, ARRAY_SIZE(hwcaps), sizeof(uint32_t));
devopts, ARRAY_SIZE(devopts), sizeof(uint32_t));
break;
case SR_CONF_SAMPLERATE:
g_variant_builder_init(&gvb, G_VARIANT_TYPE("a{sv}"));

View File

@ -28,7 +28,7 @@
#define SAMPLE_BUF_SIZE (8 * 1024 * 1024)
static const uint32_t hwcaps[] = {
static const uint32_t devopts[] = {
SR_CONF_LOGIC_ANALYZER,
SR_CONF_SAMPLERATE,
SR_CONF_LIMIT_MSEC,
@ -347,7 +347,7 @@ static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *
switch (key) {
case SR_CONF_DEVICE_OPTIONS:
*data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32,
hwcaps, ARRAY_SIZE(hwcaps), sizeof(uint32_t));
devopts, ARRAY_SIZE(devopts), sizeof(uint32_t));
break;
case SR_CONF_SAMPLERATE:
g_variant_builder_init(&gvb, G_VARIANT_TYPE("a{sv}"));

View File

@ -24,7 +24,7 @@
#define VENDOR "Kecheng"
#define USB_INTERFACE 0
static const uint32_t hwcaps[] = {
static const uint32_t devopts[] = {
SR_CONF_SOUNDLEVELMETER,
SR_CONF_LIMIT_SAMPLES,
SR_CONF_CONTINUOUS,
@ -390,7 +390,7 @@ static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *
switch (key) {
case SR_CONF_DEVICE_OPTIONS:
*data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32,
hwcaps, ARRAY_SIZE(hwcaps), sizeof(uint32_t));
devopts, ARRAY_SIZE(devopts), sizeof(uint32_t));
break;
case SR_CONF_SAMPLE_INTERVAL:
g_variant_builder_init(&gvb, G_VARIANT_TYPE_ARRAY);

View File

@ -30,7 +30,7 @@ static const uint32_t hwopts[] = {
SR_CONF_CONN,
};
static const uint32_t hwcaps[] = {
static const uint32_t devopts[] = {
SR_CONF_THERMOMETER,
SR_CONF_HYGROMETER,
SR_CONF_DATALOG,
@ -247,7 +247,7 @@ static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *
break;
case SR_CONF_DEVICE_OPTIONS:
*data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32,
hwcaps, ARRAY_SIZE(hwcaps), sizeof(uint32_t));
devopts, ARRAY_SIZE(devopts), sizeof(uint32_t));
break;
default:
return SR_ERR_NA;

View File

@ -21,7 +21,7 @@
#include "protocol.h"
static const uint32_t hwcaps[] = {
static const uint32_t devopts[] = {
SR_CONF_OSCILLOSCOPE,
SR_CONF_LOGIC_ANALYZER,
SR_CONF_SAMPLERATE,
@ -381,7 +381,7 @@ static int config_list(int key, GVariant **data, const struct sr_dev_inst *sdi,
switch (key) {
case SR_CONF_DEVICE_OPTIONS:
*data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32,
hwcaps, ARRAY_SIZE(hwcaps), sizeof(uint32_t));
devopts, ARRAY_SIZE(devopts), sizeof(uint32_t));
break;
case SR_CONF_SAMPLERATE:
g_variant_builder_init(&gvb, G_VARIANT_TYPE("a{sv}"));

View File

@ -342,7 +342,7 @@ static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *
break;
case SR_CONF_DEVICE_OPTIONS:
*data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32,
devopts, ARRAY_SIZE(devopts), sizeof(uint32_t));
devopts, ARRAY_SIZE(devopts), sizeof(uint32_t));
break;
case SR_CONF_OUTPUT_CURRENT_MAX:
g_variant_builder_init(&gvb, G_VARIANT_TYPE_ARRAY);

View File

@ -25,7 +25,7 @@ static const uint32_t hwopts[] = {
SR_CONF_SERIALCOMM,
};
static const uint32_t hwcaps[] = {
static const uint32_t devopts[] = {
SR_CONF_THERMOMETER,
SR_CONF_HYGROMETER,
SR_CONF_LIMIT_SAMPLES,
@ -203,7 +203,7 @@ static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *
break;
case SR_CONF_DEVICE_OPTIONS:
*data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32,
hwcaps, ARRAY_SIZE(hwcaps), sizeof(uint32_t));
devopts, ARRAY_SIZE(devopts), sizeof(uint32_t));
break;
default:
return SR_ERR_NA;

View File

@ -50,7 +50,7 @@ static const uint32_t hwopts[] = {
};
/** Hardware capabilities generic. */
static const uint32_t hwcaps[] = {
static const uint32_t devopts[] = {
/* Device class */
SR_CONF_POWER_SUPPLY,
/* Aquisition modes. */
@ -62,7 +62,7 @@ static const uint32_t hwcaps[] = {
};
/** Hardware capabilities channel 1, 2. */
static const uint32_t hwcaps_ch12[] = {
static const uint32_t devopts_ch12[] = {
SR_CONF_OUTPUT_VOLTAGE,
SR_CONF_OUTPUT_VOLTAGE_MAX,
SR_CONF_OUTPUT_CURRENT,
@ -71,7 +71,7 @@ static const uint32_t hwcaps_ch12[] = {
};
/** Hardware capabilities channel 3. (LPS-304/305 only). */
static const uint32_t hwcaps_ch3[] = {
static const uint32_t devopts_ch3[] = {
SR_CONF_OUTPUT_VOLTAGE,
SR_CONF_OUTPUT_ENABLED,
};
@ -746,7 +746,7 @@ static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *
switch (key) {
case SR_CONF_DEVICE_OPTIONS:
*data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32,
hwcaps, ARRAY_SIZE(hwcaps), sizeof(uint32_t));
devopts, ARRAY_SIZE(devopts), sizeof(uint32_t));
return SR_OK;
case SR_CONF_OUTPUT_CHANNEL_CONFIG:
if (devc->model->modelid <= LPS_303) {
@ -770,10 +770,10 @@ static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *
case SR_CONF_DEVICE_OPTIONS:
if ((ch_idx == 0) || (ch_idx == 1)) /* CH1, CH2 */
*data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32,
hwcaps_ch12, ARRAY_SIZE(hwcaps_ch12), sizeof(uint32_t));
devopts_ch12, ARRAY_SIZE(devopts_ch12), sizeof(uint32_t));
else /* Must be CH3 */
*data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32,
hwcaps_ch3, ARRAY_SIZE(hwcaps_ch3), sizeof(uint32_t));
devopts_ch3, ARRAY_SIZE(devopts_ch3), sizeof(uint32_t));
break;
case SR_CONF_OUTPUT_VOLTAGE_MAX:
g_variant_builder_init(&gvb, G_VARIANT_TYPE_ARRAY);

View File

@ -29,7 +29,7 @@ static const uint32_t hwopts[] = {
SR_CONF_SERIALCOMM,
};
static const uint32_t hwcaps[] = {
static const uint32_t devopts[] = {
SR_CONF_MULTIMETER,
SR_CONF_LIMIT_SAMPLES,
SR_CONF_LIMIT_MSEC,
@ -285,7 +285,7 @@ static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *
break;
case SR_CONF_DEVICE_OPTIONS:
*data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32,
hwcaps, ARRAY_SIZE(hwcaps), sizeof(uint32_t));
devopts, ARRAY_SIZE(devopts), sizeof(uint32_t));
break;
default:
return SR_ERR_NA;

View File

@ -27,7 +27,7 @@ static const uint32_t hwopts[] = {
SR_CONF_SERIALCOMM,
};
static const uint32_t hwcaps[] = {
static const uint32_t devopts[] = {
SR_CONF_LOGIC_ANALYZER,
SR_CONF_SAMPLERATE,
SR_CONF_TRIGGER_MATCH,
@ -368,7 +368,7 @@ static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *
break;
case SR_CONF_DEVICE_OPTIONS:
*data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32,
hwcaps, ARRAY_SIZE(hwcaps), sizeof(uint32_t));
devopts, ARRAY_SIZE(devopts), sizeof(uint32_t));
break;
case SR_CONF_SAMPLERATE:
g_variant_builder_init(&gvb, G_VARIANT_TYPE("a{sv}"));

View File

@ -19,7 +19,7 @@
#include "protocol.h"
static const uint32_t hwcaps[] = {
static const uint32_t devopts[] = {
SR_CONF_LOGIC_ANALYZER,
SR_CONF_SAMPLERATE,
SR_CONF_TRIGGER_MATCH,
@ -388,7 +388,7 @@ static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *
switch (key) {
case SR_CONF_DEVICE_OPTIONS:
*data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32,
hwcaps, ARRAY_SIZE(hwcaps), sizeof(uint32_t));
devopts, ARRAY_SIZE(devopts), sizeof(uint32_t));
break;
case SR_CONF_SAMPLERATE:
g_variant_builder_init(&gvb, G_VARIANT_TYPE("a{sv}"));

View File

@ -34,7 +34,7 @@ static const uint32_t hwopts[] = {
SR_CONF_SERIALCOMM
};
static const uint32_t hwcaps[] = {
static const uint32_t devopts[] = {
SR_CONF_OSCILLOSCOPE,
SR_CONF_TIMEBASE,
SR_CONF_TRIGGER_SOURCE,
@ -45,7 +45,7 @@ static const uint32_t hwcaps[] = {
SR_CONF_SAMPLERATE,
};
static const uint32_t analog_hwcaps[] = {
static const uint32_t analog_devopts[] = {
SR_CONF_NUM_VDIV,
SR_CONF_VDIV,
SR_CONF_COUPLING,
@ -776,7 +776,7 @@ static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *
return SR_OK;
} else if (key == SR_CONF_DEVICE_OPTIONS && cg == NULL) {
*data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32,
hwcaps, ARRAY_SIZE(hwcaps), sizeof(uint32_t));
devopts, ARRAY_SIZE(devopts), sizeof(uint32_t));
return SR_OK;
}
@ -809,7 +809,7 @@ static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *
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_hwcaps, ARRAY_SIZE(analog_hwcaps), sizeof(uint32_t));
analog_devopts, ARRAY_SIZE(analog_devopts), sizeof(uint32_t));
return SR_OK;
}
}

View File

@ -45,7 +45,7 @@ static const uint32_t hwopts[] = {
SR_CONF_CONN,
};
static const uint32_t hwcaps[] = {
static const uint32_t devopts[] = {
SR_CONF_LOGIC_ANALYZER,
SR_CONF_SAMPLERATE,
SR_CONF_VOLTAGE_THRESHOLD,
@ -552,7 +552,7 @@ static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *
break;
case SR_CONF_DEVICE_OPTIONS:
*data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32,
hwcaps, ARRAY_SIZE(hwcaps), sizeof(uint32_t));
devopts, ARRAY_SIZE(devopts), sizeof(uint32_t));
break;
case SR_CONF_SAMPLERATE:
g_variant_builder_init(&gvb, G_VARIANT_TYPE("a{sv}"));

View File

@ -34,7 +34,7 @@ static const uint32_t hwopts[] = {
SR_CONF_SERIALCOMM,
};
static const uint32_t hwcaps[] = {
static const uint32_t devopts[] = {
SR_CONF_MULTIMETER,
SR_CONF_LIMIT_SAMPLES,
SR_CONF_LIMIT_MSEC,
@ -511,7 +511,7 @@ static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *
break;
case SR_CONF_DEVICE_OPTIONS:
*data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32,
hwcaps, ARRAY_SIZE(hwcaps), sizeof(uint32_t));
devopts, ARRAY_SIZE(devopts), sizeof(uint32_t));
break;
default:
return SR_ERR_NA;

View File

@ -29,7 +29,7 @@ static const uint32_t hwopts[] = {
SR_CONF_CONN,
};
static const uint32_t hwcaps[] = {
static const uint32_t devopts[] = {
SR_CONF_LOGIC_ANALYZER,
SR_CONF_SAMPLERATE,
SR_CONF_EXTERNAL_CLOCK,
@ -461,7 +461,7 @@ static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *
break;
case SR_CONF_DEVICE_OPTIONS:
*data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32,
hwcaps, G_N_ELEMENTS(hwcaps), sizeof(uint32_t));
devopts, G_N_ELEMENTS(devopts), sizeof(uint32_t));
break;
case SR_CONF_SAMPLERATE:
g_variant_builder_init(&gvb, G_VARIANT_TYPE("a{sv}"));

View File

@ -28,7 +28,7 @@ static const uint32_t hwopts[] = {
SR_CONF_SERIALCOMM,
};
static const uint32_t hwcaps[] = {
static const uint32_t devopts[] = {
SR_CONF_ENERGYMETER,
SR_CONF_LIMIT_SAMPLES,
SR_CONF_LIMIT_MSEC,
@ -221,7 +221,7 @@ static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *
break;
case SR_CONF_DEVICE_OPTIONS:
*data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32,
hwcaps, ARRAY_SIZE(hwcaps), sizeof(uint32_t));
devopts, ARRAY_SIZE(devopts), sizeof(uint32_t));
break;
default:
return SR_ERR_NA;

View File

@ -31,7 +31,7 @@ static const uint32_t hwopts[] = {
SR_CONF_SERIALCOMM,
};
static const uint32_t hwcaps[] = {
static const uint32_t devopts[] = {
SR_CONF_SOUNDLEVELMETER,
SR_CONF_LIMIT_SAMPLES,
SR_CONF_CONTINUOUS,
@ -166,7 +166,7 @@ static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *
break;
case SR_CONF_DEVICE_OPTIONS:
*data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32,
hwcaps, ARRAY_SIZE(hwcaps), sizeof(uint32_t));
devopts, ARRAY_SIZE(devopts), sizeof(uint32_t));
break;
default:
return SR_ERR_NA;

View File

@ -30,7 +30,7 @@ static const uint32_t hwopts[] = {
SR_CONF_CONN,
};
static const uint32_t hwcaps[] = {
static const uint32_t devopts[] = {
SR_CONF_MULTIMETER,
SR_CONF_LIMIT_SAMPLES,
SR_CONF_LIMIT_MSEC,
@ -315,7 +315,7 @@ static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *
break;
case SR_CONF_DEVICE_OPTIONS:
*data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32,
hwcaps, ARRAY_SIZE(hwcaps), sizeof(uint32_t));
devopts, ARRAY_SIZE(devopts), sizeof(uint32_t));
break;
default:
return SR_ERR_NA;

View File

@ -21,7 +21,7 @@
#include <string.h>
static const uint32_t hwcaps[] = {
static const uint32_t devopts[] = {
SR_CONF_THERMOMETER,
SR_CONF_LIMIT_SAMPLES,
SR_CONF_CONTINUOUS,
@ -275,7 +275,7 @@ static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *
switch (key) {
case SR_CONF_DEVICE_OPTIONS:
*data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32,
hwcaps, ARRAY_SIZE(hwcaps), sizeof(uint32_t));
devopts, ARRAY_SIZE(devopts), sizeof(uint32_t));
break;
case SR_CONF_DATA_SOURCE:
*data = g_variant_new_strv(data_sources, ARRAY_SIZE(data_sources));

View File

@ -39,7 +39,7 @@ static const uint32_t hwopts[] = {
SR_CONF_CONN,
};
static const uint32_t hwcaps[] = {
static const uint32_t devopts[] = {
SR_CONF_MULTIMETER,
SR_CONF_LIMIT_MSEC,
SR_CONF_LIMIT_SAMPLES,
@ -276,7 +276,7 @@ static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *
break;
case SR_CONF_DEVICE_OPTIONS:
*data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32,
hwcaps, ARRAY_SIZE(hwcaps), sizeof(uint32_t));
devopts, ARRAY_SIZE(devopts), sizeof(uint32_t));
break;
default:
return SR_ERR_NA;

View File

@ -483,10 +483,10 @@ static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *
case SR_CONF_DEVICE_OPTIONS:
if (cg_type == CG_NONE) {
*data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32,
model->hw_caps, model->num_hwcaps, sizeof(uint32_t));
model->devopts, model->num_devopts, sizeof(uint32_t));
} else if (cg_type == CG_ANALOG) {
*data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32,
model->analog_hwcaps, model->num_analog_hwcaps, sizeof(uint32_t));
model->analog_devopts, model->num_analog_devopts, sizeof(uint32_t));
} else {
*data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32,
NULL, 0, sizeof(uint32_t));

View File

@ -25,7 +25,7 @@
#include "protocol.h"
static const uint32_t dlm_hwcaps[] = {
static const uint32_t dlm_devopts[] = {
SR_CONF_LOGIC_ANALYZER,
SR_CONF_OSCILLOSCOPE,
SR_CONF_TRIGGER_SLOPE,
@ -35,7 +35,7 @@ static const uint32_t dlm_hwcaps[] = {
SR_CONF_HORIZ_TRIGGERPOS,
};
static const uint32_t dlm_analog_caps[] = {
static const uint32_t dlm_analog_devopts[] = {
SR_CONF_VDIV,
SR_CONF_COUPLING,
SR_CONF_NUM_VDIV,
@ -177,11 +177,11 @@ static struct scope_config scope_models[] = {
.analog_names = &scope_analog_channel_names,
.digital_names = &scope_digital_channel_names,
.hw_caps = &dlm_hwcaps,
.num_hwcaps = ARRAY_SIZE(dlm_hwcaps),
.devopts = &dlm_devopts,
.num_devopts = ARRAY_SIZE(dlm_devopts),
.analog_hwcaps = &dlm_analog_caps,
.num_analog_hwcaps = ARRAY_SIZE(dlm_analog_caps),
.analog_devopts = &dlm_analog_devopts,
.num_analog_devopts = ARRAY_SIZE(dlm_analog_devopts),
.coupling_options = &dlm_coupling_options,
.trigger_sources = &dlm_2ch_trigger_sources,
@ -206,11 +206,11 @@ static struct scope_config scope_models[] = {
.analog_names = &scope_analog_channel_names,
.digital_names = &scope_digital_channel_names,
.hw_caps = &dlm_hwcaps,
.num_hwcaps = ARRAY_SIZE(dlm_hwcaps),
.devopts = &dlm_devopts,
.num_devopts = ARRAY_SIZE(dlm_devopts),
.analog_hwcaps = &dlm_analog_caps,
.num_analog_hwcaps = ARRAY_SIZE(dlm_analog_caps),
.analog_devopts = &dlm_analog_devopts,
.num_analog_devopts = ARRAY_SIZE(dlm_analog_devopts),
.coupling_options = &dlm_coupling_options,
.trigger_sources = &dlm_4ch_trigger_sources,

View File

@ -57,11 +57,11 @@ struct scope_config {
const char *(*analog_names)[];
const char *(*digital_names)[];
const uint32_t (*hw_caps)[];
const uint8_t num_hwcaps;
const uint32_t (*devopts)[];
const uint8_t num_devopts;
const uint32_t (*analog_hwcaps)[];
const uint8_t num_analog_hwcaps;
const uint32_t (*analog_devopts)[];
const uint8_t num_analog_devopts;
const char *(*coupling_options)[];
const uint8_t num_coupling_options;

View File

@ -52,7 +52,7 @@ static const struct zp_model zeroplus_models[] = {
{ 0, 0, 0, 0, 0, 0 }
};
static const uint32_t hwcaps[] = {
static const uint32_t devopts[] = {
SR_CONF_LOGIC_ANALYZER,
SR_CONF_SAMPLERATE,
SR_CONF_TRIGGER_MATCH,
@ -470,7 +470,7 @@ static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *
switch (key) {
case SR_CONF_DEVICE_OPTIONS:
*data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32,
hwcaps, ARRAY_SIZE(hwcaps), sizeof(uint32_t));
devopts, ARRAY_SIZE(devopts), sizeof(uint32_t));
break;
case SR_CONF_SAMPLERATE:
devc = sdi->priv;

View File

@ -49,7 +49,7 @@ struct session_vdev {
gboolean finished;
};
static const uint32_t hwcaps[] = {
static const uint32_t devopts[] = {
SR_CONF_CAPTUREFILE,
SR_CONF_CAPTURE_UNITSIZE,
SR_CONF_SAMPLERATE,
@ -277,7 +277,7 @@ static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *
switch (key) {
case SR_CONF_DEVICE_OPTIONS:
*data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32,
hwcaps, ARRAY_SIZE(hwcaps), sizeof(uint32_t));
devopts, ARRAY_SIZE(devopts), sizeof(uint32_t));
break;
default:
return SR_ERR_NA;