char *description;
};
+#define SR_CONF_GET (1 << 31)
+#define SR_CONF_SET (1 << 30)
+#define SR_CONF_LIST (1 << 29)
+#define SR_CONF_MASK 0x1fffffff
+
/** Constants for device classes */
enum sr_configkey {
/*--- Device classes ------------------------------------------------*/
static const uint32_t devopts[] = {
SR_CONF_MULTIMETER,
- SR_CONF_LIMIT_SAMPLES,
- SR_CONF_LIMIT_MSEC,
SR_CONF_CONTINUOUS,
+ SR_CONF_LIMIT_SAMPLES | SR_CONF_SET,
+ SR_CONF_LIMIT_MSEC | SR_CONF_SET,
};
extern const struct agdmm_job agdmm_jobs_u12xx[];
static const uint32_t devopts[] = {
SR_CONF_THERMOMETER,
- SR_CONF_LIMIT_SAMPLES,
- SR_CONF_LIMIT_MSEC,
SR_CONF_CONTINUOUS,
- SR_CONF_DATA_SOURCE,
+ SR_CONF_LIMIT_SAMPLES | SR_CONF_GET | SR_CONF_SET,
+ SR_CONF_LIMIT_MSEC | SR_CONF_GET | SR_CONF_SET,
+ SR_CONF_DATA_SOURCE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
};
static const char *data_sources[] = {
static const uint32_t devopts[] = {
SR_CONF_LOGIC_ANALYZER,
- SR_CONF_SAMPLERATE,
- SR_CONF_TRIGGER_MATCH,
- SR_CONF_CAPTURE_RATIO,
- SR_CONF_LIMIT_MSEC,
+ SR_CONF_LIMIT_MSEC | SR_CONF_GET | SR_CONF_SET,
+ SR_CONF_LIMIT_SAMPLES | SR_CONF_SET,
+ SR_CONF_SAMPLERATE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
+ SR_CONF_TRIGGER_MATCH | SR_CONF_LIST,
+ SR_CONF_CAPTURE_RATIO | SR_CONF_GET | SR_CONF_SET,
};
static const int32_t trigger_matches[] = {
static const uint32_t devopts[] = {
SR_CONF_POWER_SUPPLY,
SR_CONF_CONTINUOUS,
- SR_CONF_OUTPUT_CHANNEL_CONFIG,
- SR_CONF_OVER_CURRENT_PROTECTION_ENABLED,
+ SR_CONF_OUTPUT_CHANNEL_CONFIG | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
+ SR_CONF_OVER_CURRENT_PROTECTION_ENABLED | SR_CONF_GET | SR_CONF_SET,
};
static const uint32_t devopts_cg[] = {
- SR_CONF_OUTPUT_VOLTAGE,
- SR_CONF_OUTPUT_VOLTAGE_MAX,
- SR_CONF_OUTPUT_CURRENT,
- SR_CONF_OUTPUT_CURRENT_MAX,
- SR_CONF_OUTPUT_ENABLED,
+ SR_CONF_OUTPUT_VOLTAGE | SR_CONF_GET,
+ SR_CONF_OUTPUT_VOLTAGE_MAX | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
+ SR_CONF_OUTPUT_CURRENT | SR_CONF_GET,
+ SR_CONF_OUTPUT_CURRENT_MAX | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
+ SR_CONF_OUTPUT_ENABLED | SR_CONF_GET | SR_CONF_SET,
};
static const char *channel_modes[] = {
/* Hardware capabilities */
static const uint32_t devopts[] = {
SR_CONF_LOGIC_ANALYZER,
- SR_CONF_SAMPLERATE,
- SR_CONF_TRIGGER_MATCH,
-
- SR_CONF_LIMIT_SAMPLES,
SR_CONF_CONTINUOUS,
-
- SR_CONF_NUM_LOGIC_CHANNELS,
+ SR_CONF_LIMIT_SAMPLES | SR_CONF_GET | SR_CONF_SET,
+ SR_CONF_SAMPLERATE | SR_CONF_GET | SR_CONF_SET,
+ SR_CONF_TRIGGER_MATCH | SR_CONF_LIST,
+ SR_CONF_NUM_LOGIC_CHANNELS | SR_CONF_GET,
};
/* Trigger matching capabilities */
static const uint32_t devopts[] = {
SR_CONF_MULTIMETER,
- SR_CONF_LIMIT_SAMPLES,
- SR_CONF_LIMIT_MSEC,
SR_CONF_CONTINUOUS,
+ SR_CONF_LIMIT_SAMPLES | SR_CONF_GET | SR_CONF_SET,
+ SR_CONF_LIMIT_MSEC | SR_CONF_GET | SR_CONF_SET,
};
SR_PRIV struct sr_dev_driver brymen_bm86x_driver_info;
static const uint32_t devopts[] = {
SR_CONF_MULTIMETER,
- SR_CONF_LIMIT_SAMPLES,
SR_CONF_CONTINUOUS,
- SR_CONF_LIMIT_MSEC,
+ SR_CONF_LIMIT_SAMPLES | SR_CONF_SET,
+ SR_CONF_LIMIT_MSEC | SR_CONF_SET,
};
SR_PRIV struct sr_dev_driver brymen_bm857_driver_info;
static const uint32_t devopts[] = {
SR_CONF_SOUNDLEVELMETER,
- SR_CONF_LIMIT_SAMPLES,
SR_CONF_CONTINUOUS,
- SR_CONF_SPL_WEIGHT_FREQ,
- SR_CONF_SPL_WEIGHT_TIME,
- SR_CONF_SPL_MEASUREMENT_RANGE,
- SR_CONF_DATALOG,
- SR_CONF_HOLD_MAX,
- SR_CONF_HOLD_MIN,
- SR_CONF_POWER_OFF,
- SR_CONF_DATA_SOURCE,
+ SR_CONF_LIMIT_SAMPLES | SR_CONF_GET | SR_CONF_SET,
+ SR_CONF_SPL_WEIGHT_FREQ | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
+ SR_CONF_SPL_WEIGHT_TIME | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
+ SR_CONF_SPL_MEASUREMENT_RANGE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
+ SR_CONF_DATALOG | SR_CONF_GET | SR_CONF_SET,
+ SR_CONF_HOLD_MAX | SR_CONF_GET | SR_CONF_SET,
+ SR_CONF_HOLD_MIN | SR_CONF_GET | SR_CONF_SET,
+ SR_CONF_POWER_OFF | SR_CONF_GET | SR_CONF_SET,
+ SR_CONF_DATA_SOURCE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
};
static const char *weight_freq[] = {
static const uint32_t devopts[] = {
SR_CONF_THERMOMETER,
- SR_CONF_LIMIT_SAMPLES,
- SR_CONF_LIMIT_MSEC,
SR_CONF_CONTINUOUS,
+ SR_CONF_LIMIT_SAMPLES | SR_CONF_SET,
+ SR_CONF_LIMIT_MSEC | SR_CONF_SET,
};
static const char *channel_names[] = {
static const uint32_t devopts[] = {
SR_CONF_LOGIC_ANALYZER,
- SR_CONF_SAMPLERATE,
- SR_CONF_TRIGGER_MATCH,
- SR_CONF_LIMIT_MSEC, /* TODO: Not yet implemented. */
- SR_CONF_LIMIT_SAMPLES, /* TODO: Not yet implemented. */
+ SR_CONF_LIMIT_MSEC | SR_CONF_SET,
+ SR_CONF_LIMIT_SAMPLES | SR_CONF_SET | SR_CONF_LIST,
+ SR_CONF_SAMPLERATE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
+ SR_CONF_TRIGGER_MATCH | SR_CONF_LIST,
};
static const int32_t trigger_matches[] = {
static const uint32_t devopts[] = {
SR_CONF_SOUNDLEVELMETER,
- SR_CONF_LIMIT_SAMPLES,
- SR_CONF_LIMIT_MSEC,
SR_CONF_CONTINUOUS,
+ SR_CONF_LIMIT_SAMPLES | SR_CONF_SET,
+ SR_CONF_LIMIT_MSEC | SR_CONF_SET,
};
SR_PRIV struct sr_dev_driver colead_slm_driver_info;
static const uint32_t devopts[] = {
SR_CONF_POWER_SUPPLY,
- SR_CONF_OUTPUT_VOLTAGE,
- SR_CONF_OUTPUT_CURRENT,
- /* There's no SR_CONF_OUTPUT_ENABLED; can't know/set status remotely. */
- SR_CONF_OVER_CURRENT_PROTECTION_ENABLED,
+ SR_CONF_OUTPUT_VOLTAGE | SR_CONF_SET,
+ SR_CONF_OUTPUT_CURRENT | SR_CONF_SET,
+ SR_CONF_OVER_CURRENT_PROTECTION_ENABLED | SR_CONF_SET,
};
SR_PRIV struct sr_dev_driver conrad_digi_35_cpu_driver_info;
}
ret = send_msg1(sdi, 'C', (int) (dblval * 100 + 0.5));
break;
- /* No SR_CONF_OUTPUT_ENABLED :-( . */
case SR_CONF_OVER_CURRENT_PROTECTION_ENABLED:
if (g_variant_get_boolean(data))
ret = send_msg1(sdi, 'V', 900);
static const int devopts[] = {
SR_CONF_LOGIC_ANALYZER,
- SR_CONF_DEMO_DEV,
- SR_CONF_SAMPLERATE,
SR_CONF_CONTINUOUS,
- SR_CONF_LIMIT_SAMPLES,
- SR_CONF_LIMIT_MSEC,
+ SR_CONF_DEMO_DEV,
+ SR_CONF_SAMPLERATE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
+ SR_CONF_LIMIT_SAMPLES | SR_CONF_GET | SR_CONF_SET,
+ SR_CONF_LIMIT_MSEC | SR_CONF_GET | SR_CONF_SET,
+ SR_CONF_PATTERN_MODE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
+ SR_CONF_NUM_LOGIC_CHANNELS | SR_CONF_GET,
+ SR_CONF_NUM_ANALOG_CHANNELS | SR_CONF_GET,
+ SR_CONF_AMPLITUDE | SR_CONF_GET | SR_CONF_SET,
};
static const int devopts_cg_logic[] = {
static const uint32_t devopts[] = {
SR_CONF_MULTIMETER,
- SR_CONF_LIMIT_SAMPLES,
- SR_CONF_LIMIT_MSEC,
SR_CONF_CONTINUOUS,
+ SR_CONF_LIMIT_SAMPLES | SR_CONF_SET,
+ SR_CONF_LIMIT_MSEC | SR_CONF_SET,
};
SR_PRIV struct sr_dev_driver flukedmm_driver_info;
static const uint32_t devopts[] = {
SR_CONF_LOGIC_ANALYZER,
- SR_CONF_TRIGGER_MATCH,
- SR_CONF_SAMPLERATE,
-
- /* These are really implemented in the driver, not the hardware. */
- SR_CONF_LIMIT_SAMPLES,
SR_CONF_CONTINUOUS,
+ SR_CONF_CONN | SR_CONF_GET,
+ SR_CONF_SAMPLERATE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
+ SR_CONF_LIMIT_SAMPLES | SR_CONF_GET | SR_CONF_SET,
+ SR_CONF_TRIGGER_MATCH | SR_CONF_LIST,
};
static const char *channel_names[] = {
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,
- SR_CONF_LIMIT_MSEC,
SR_CONF_CONTINUOUS,
+ SR_CONF_LIMIT_SAMPLES | SR_CONF_GET | SR_CONF_SET,
+ SR_CONF_LIMIT_MSEC | SR_CONF_GET | SR_CONF_SET,
};
/** Hardware capabilities for Metrahit 2x devices in bidirectional Mode. */
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,
- SR_CONF_LIMIT_MSEC,
SR_CONF_CONTINUOUS,
- SR_CONF_POWER_OFF,
+ SR_CONF_LIMIT_SAMPLES | SR_CONF_GET | SR_CONF_SET,
+ SR_CONF_LIMIT_MSEC | SR_CONF_GET | SR_CONF_SET,
+ SR_CONF_POWER_OFF | SR_CONF_GET | SR_CONF_SET,
};
switch (key) {
case SR_CONF_SCAN_OPTIONS:
*data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32,
- scanopts, ARRAY_SIZE(scanopts), sizeof(uint32_t));
+ scanopts, ARRAY_SIZE(scanopts), sizeof(uint32_t));
break;
default:
return SR_ERR_NA;
switch (key) {
case SR_CONF_DEVICE_OPTIONS:
*data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32,
- devopts_sm, ARRAY_SIZE(devopts_sm), sizeof(uint32_t));
+ devopts_sm, ARRAY_SIZE(devopts_sm), sizeof(uint32_t));
break;
default:
return config_list_common(key, data, sdi, cg);
switch (key) {
case SR_CONF_DEVICE_OPTIONS:
*data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32,
- devopts_bd, ARRAY_SIZE(devopts_bd), sizeof(uint32_t));
+ devopts_bd, ARRAY_SIZE(devopts_bd), sizeof(uint32_t));
break;
default:
return config_list_common(key, data, sdi, cg);
static const uint32_t hmo_devopts[] = {
SR_CONF_OSCILLOSCOPE,
- SR_CONF_TRIGGER_SOURCE,
- SR_CONF_TIMEBASE,
- SR_CONF_NUM_TIMEBASE,
- SR_CONF_TRIGGER_SLOPE,
- SR_CONF_HORIZ_TRIGGERPOS,
- SR_CONF_SAMPLERATE,
SR_CONF_LIMIT_FRAMES,
+ SR_CONF_TRIGGER_SOURCE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
+ SR_CONF_TIMEBASE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
+ SR_CONF_NUM_TIMEBASE | SR_CONF_GET,
+ SR_CONF_TRIGGER_SLOPE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
+ SR_CONF_HORIZ_TRIGGERPOS | SR_CONF_GET | SR_CONF_SET,
+ SR_CONF_SAMPLERATE | SR_CONF_GET,
};
static const uint32_t hmo_analog_devopts[] = {
- SR_CONF_NUM_VDIV,
- SR_CONF_COUPLING,
- SR_CONF_VDIV,
+ SR_CONF_NUM_VDIV | SR_CONF_GET,
+ SR_CONF_COUPLING | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
+ SR_CONF_VDIV | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
};
static const char *hmo_coupling_options[] = {
static const uint32_t devopts[] = {
SR_CONF_OSCILLOSCOPE,
- SR_CONF_LIMIT_FRAMES,
SR_CONF_CONTINUOUS,
- SR_CONF_TIMEBASE,
- SR_CONF_BUFFERSIZE,
- SR_CONF_TRIGGER_SOURCE,
- SR_CONF_TRIGGER_SLOPE,
- SR_CONF_HORIZ_TRIGGERPOS,
- SR_CONF_FILTER,
- SR_CONF_VDIV,
- SR_CONF_COUPLING,
- SR_CONF_NUM_TIMEBASE,
- SR_CONF_NUM_VDIV,
+ SR_CONF_CONN | SR_CONF_GET,
+ SR_CONF_LIMIT_FRAMES | SR_CONF_SET,
+ SR_CONF_TIMEBASE | SR_CONF_SET | SR_CONF_LIST,
+ SR_CONF_BUFFERSIZE | SR_CONF_SET | SR_CONF_LIST,
+ SR_CONF_TRIGGER_SOURCE | SR_CONF_SET | SR_CONF_LIST,
+ SR_CONF_TRIGGER_SLOPE | SR_CONF_SET,
+ SR_CONF_HORIZ_TRIGGERPOS | SR_CONF_SET,
+ SR_CONF_FILTER | SR_CONF_SET | SR_CONF_LIST,
+ SR_CONF_VDIV | SR_CONF_SET | SR_CONF_LIST,
+ SR_CONF_COUPLING | SR_CONF_SET | SR_CONF_LIST,
+ SR_CONF_NUM_TIMEBASE | SR_CONF_GET,
+ SR_CONF_NUM_VDIV | SR_CONF_GET,
};
static const char *channel_names[] = {
static const uint32_t devopts[] = {
SR_CONF_LOGIC_ANALYZER,
- SR_CONF_SAMPLERATE,
- SR_CONF_LIMIT_SAMPLES,
- SR_CONF_TRIGGER_MATCH,
- SR_CONF_CAPTURE_RATIO,
+ SR_CONF_LIMIT_SAMPLES | SR_CONF_SET | SR_CONF_LIST,
+ SR_CONF_SAMPLERATE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
+ SR_CONF_TRIGGER_MATCH | SR_CONF_LIST,
+ SR_CONF_CAPTURE_RATIO | SR_CONF_GET | SR_CONF_SET,
};
static const int32_t trigger_matches[] = {
static const uint32_t devopts[] = {
SR_CONF_LOGIC_ANALYZER,
- SR_CONF_SAMPLERATE,
- SR_CONF_LIMIT_MSEC,
- SR_CONF_LIMIT_SAMPLES,
- SR_CONF_CONTINUOUS, // TODO?
+ SR_CONF_LIMIT_SAMPLES | SR_CONF_SET,
+ SR_CONF_LIMIT_MSEC | SR_CONF_SET,
+ SR_CONF_SAMPLERATE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
};
/* Channels are numbered 1-9. */
static const uint32_t devopts[] = {
SR_CONF_SOUNDLEVELMETER,
- SR_CONF_LIMIT_SAMPLES,
SR_CONF_CONTINUOUS,
- SR_CONF_DATALOG,
- SR_CONF_SPL_WEIGHT_FREQ,
- SR_CONF_SPL_WEIGHT_TIME,
- SR_CONF_DATA_SOURCE,
+ SR_CONF_LIMIT_SAMPLES | SR_CONF_GET | SR_CONF_SET,
+ SR_CONF_SAMPLE_INTERVAL | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
+ SR_CONF_DATALOG | SR_CONF_GET,
+ SR_CONF_SPL_WEIGHT_FREQ | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
+ SR_CONF_SPL_WEIGHT_TIME | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
+ SR_CONF_DATA_SOURCE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
};
SR_PRIV const uint64_t kecheng_kc_330b_sample_intervals[][2] = {
static const uint32_t devopts[] = {
SR_CONF_THERMOMETER,
SR_CONF_HYGROMETER,
- SR_CONF_DATALOG,
- SR_CONF_LIMIT_SAMPLES,
+ SR_CONF_CONN | SR_CONF_GET,
+ SR_CONF_LIMIT_SAMPLES | SR_CONF_GET | SR_CONF_SET,
+ SR_CONF_DATALOG | SR_CONF_GET | SR_CONF_SET,
};
static int init(struct sr_context *sr_ctx)
static const uint32_t devopts[] = {
SR_CONF_OSCILLOSCOPE,
SR_CONF_LOGIC_ANALYZER,
- SR_CONF_SAMPLERATE,
- SR_CONF_TRIGGER_TYPE,
- SR_CONF_TRIGGER_SLOPE,
- SR_CONF_HORIZ_TRIGGERPOS,
-// SR_CONF_CAPTURE_RATIO,
- SR_CONF_LIMIT_SAMPLES,
-// SR_CONF_RLE,
+ SR_CONF_LIMIT_SAMPLES | SR_CONF_SET,
+ SR_CONF_SAMPLERATE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
+ SR_CONF_TRIGGER_TYPE | SR_CONF_LIST,
+ SR_CONF_TRIGGER_SLOPE | SR_CONF_SET,
+ SR_CONF_HORIZ_TRIGGERPOS | SR_CONF_SET,
+ SR_CONF_CAPTURE_RATIO | SR_CONF_SET,
+ SR_CONF_RLE | SR_CONF_SET,
};
/*
/* Device class */
SR_CONF_POWER_SUPPLY,
/* Aquisition modes. */
- SR_CONF_LIMIT_SAMPLES,
- SR_CONF_LIMIT_MSEC,
SR_CONF_CONTINUOUS,
+ SR_CONF_LIMIT_SAMPLES | SR_CONF_GET | SR_CONF_SET,
+ SR_CONF_LIMIT_MSEC | SR_CONF_GET | SR_CONF_SET,
/* Device configuration */
- SR_CONF_OUTPUT_CURRENT,
- SR_CONF_OUTPUT_CURRENT_MAX,
- SR_CONF_OUTPUT_ENABLED,
- SR_CONF_OUTPUT_VOLTAGE,
- SR_CONF_OUTPUT_VOLTAGE_MAX,
+ SR_CONF_OUTPUT_CURRENT | SR_CONF_GET,
+ SR_CONF_OUTPUT_CURRENT_MAX | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
+ SR_CONF_OUTPUT_ENABLED | SR_CONF_GET | SR_CONF_SET,
+ SR_CONF_OUTPUT_VOLTAGE | SR_CONF_GET,
+ SR_CONF_OUTPUT_VOLTAGE_MAX | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
};
/* Note: All models have one power supply output only. */
static const uint32_t devopts[] = {
SR_CONF_THERMOMETER,
SR_CONF_HYGROMETER,
- SR_CONF_LIMIT_SAMPLES,
- SR_CONF_LIMIT_MSEC,
SR_CONF_CONTINUOUS,
+ SR_CONF_LIMIT_SAMPLES | SR_CONF_SET,
+ SR_CONF_LIMIT_MSEC | SR_CONF_SET,
};
SR_PRIV struct sr_dev_driver mic_98581_driver_info;
/* Device class */
SR_CONF_POWER_SUPPLY,
/* Aquisition modes. */
- SR_CONF_LIMIT_SAMPLES,
- SR_CONF_LIMIT_MSEC,
SR_CONF_CONTINUOUS,
+ SR_CONF_LIMIT_SAMPLES | SR_CONF_GET | SR_CONF_SET,
+ SR_CONF_LIMIT_MSEC | SR_CONF_GET | SR_CONF_SET,
/* Device configuration */
- SR_CONF_OUTPUT_CHANNEL_CONFIG,
+ SR_CONF_OUTPUT_CHANNEL_CONFIG | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
};
/** Hardware capabilities channel 1, 2. */
static const uint32_t devopts_ch12[] = {
- SR_CONF_OUTPUT_VOLTAGE,
- SR_CONF_OUTPUT_VOLTAGE_MAX,
- SR_CONF_OUTPUT_CURRENT,
- SR_CONF_OUTPUT_CURRENT_MAX,
- SR_CONF_OUTPUT_ENABLED,
+ SR_CONF_OUTPUT_VOLTAGE | SR_CONF_GET,
+ SR_CONF_OUTPUT_VOLTAGE_MAX | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
+ SR_CONF_OUTPUT_CURRENT | SR_CONF_GET,
+ SR_CONF_OUTPUT_CURRENT_MAX | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
+ SR_CONF_OUTPUT_ENABLED | SR_CONF_GET | SR_CONF_SET,
};
/** Hardware capabilities channel 3. (LPS-304/305 only). */
static const uint32_t devopts_ch3[] = {
- SR_CONF_OUTPUT_VOLTAGE,
- SR_CONF_OUTPUT_ENABLED,
+ SR_CONF_OUTPUT_VOLTAGE | SR_CONF_GET,
+ SR_CONF_OUTPUT_ENABLED | SR_CONF_GET | SR_CONF_SET,
};
static const char *channel_modes[] = {
static const uint32_t devopts[] = {
SR_CONF_MULTIMETER,
- SR_CONF_LIMIT_SAMPLES,
- SR_CONF_LIMIT_MSEC,
SR_CONF_CONTINUOUS,
+ SR_CONF_LIMIT_SAMPLES | SR_CONF_SET,
+ SR_CONF_LIMIT_MSEC | SR_CONF_SET,
};
#define BUF_MAX 50
static const uint32_t devopts[] = {
SR_CONF_LOGIC_ANALYZER,
- SR_CONF_SAMPLERATE,
- SR_CONF_TRIGGER_MATCH,
- SR_CONF_CAPTURE_RATIO,
- SR_CONF_LIMIT_SAMPLES,
- SR_CONF_EXTERNAL_CLOCK,
- SR_CONF_PATTERN_MODE,
- SR_CONF_SWAP,
- SR_CONF_RLE,
+ SR_CONF_LIMIT_SAMPLES | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
+ SR_CONF_SAMPLERATE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
+ SR_CONF_TRIGGER_MATCH | SR_CONF_LIST,
+ SR_CONF_CAPTURE_RATIO | SR_CONF_GET | SR_CONF_SET,
+ SR_CONF_EXTERNAL_CLOCK | SR_CONF_SET,
+ SR_CONF_PATTERN_MODE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
+ SR_CONF_SWAP | SR_CONF_SET,
+ SR_CONF_RLE | SR_CONF_GET | SR_CONF_SET,
};
static const int32_t trigger_matches[] = {
static const uint32_t devopts[] = {
SR_CONF_LOGIC_ANALYZER,
- SR_CONF_SAMPLERATE,
- SR_CONF_TRIGGER_MATCH,
- SR_CONF_CAPTURE_RATIO,
- SR_CONF_LIMIT_SAMPLES,
- SR_CONF_PATTERN_MODE,
- SR_CONF_EXTERNAL_CLOCK,
- SR_CONF_SWAP,
- SR_CONF_RLE,
+ SR_CONF_LIMIT_SAMPLES | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
+ SR_CONF_SAMPLERATE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
+ SR_CONF_TRIGGER_MATCH | SR_CONF_LIST,
+ SR_CONF_CAPTURE_RATIO | SR_CONF_GET | SR_CONF_SET,
+ SR_CONF_PATTERN_MODE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
+ SR_CONF_EXTERNAL_CLOCK | SR_CONF_GET | SR_CONF_SET,
+ SR_CONF_SWAP | SR_CONF_SET,
+ SR_CONF_RLE | SR_CONF_GET | SR_CONF_SET,
};
static const int32_t trigger_matches[] = {
static const uint32_t devopts[] = {
SR_CONF_OSCILLOSCOPE,
- SR_CONF_TIMEBASE,
- SR_CONF_TRIGGER_SOURCE,
- SR_CONF_TRIGGER_SLOPE,
- SR_CONF_HORIZ_TRIGGERPOS,
- SR_CONF_NUM_TIMEBASE,
- SR_CONF_LIMIT_FRAMES,
- SR_CONF_SAMPLERATE,
+ SR_CONF_LIMIT_FRAMES | SR_CONF_SET,
+ SR_CONF_TIMEBASE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
+ SR_CONF_TRIGGER_SOURCE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
+ SR_CONF_TRIGGER_SLOPE | SR_CONF_GET | SR_CONF_SET,
+ SR_CONF_HORIZ_TRIGGERPOS | SR_CONF_SET,
+ SR_CONF_NUM_TIMEBASE | SR_CONF_GET,
+ SR_CONF_SAMPLERATE | SR_CONF_GET,
};
static const uint32_t analog_devopts[] = {
- SR_CONF_NUM_VDIV,
- SR_CONF_VDIV,
- SR_CONF_COUPLING,
- SR_CONF_DATA_SOURCE,
+ 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,
+ SR_CONF_DATA_SOURCE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
};
static const uint64_t timebases[][2] = {
static const uint32_t devopts[] = {
SR_CONF_LOGIC_ANALYZER,
- SR_CONF_SAMPLERATE,
- SR_CONF_VOLTAGE_THRESHOLD,
- SR_CONF_TRIGGER_MATCH,
-
- /* These are really implemented in the driver, not the hardware. */
- SR_CONF_LIMIT_SAMPLES,
SR_CONF_CONTINUOUS,
+ SR_CONF_LIMIT_SAMPLES | SR_CONF_SET,
+ SR_CONF_CONN | SR_CONF_GET,
+ SR_CONF_SAMPLERATE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
+ SR_CONF_VOLTAGE_THRESHOLD | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
+ SR_CONF_TRIGGER_MATCH | SR_CONF_LIST,
};
static const int32_t soft_trigger_matches[] = {
static const uint32_t rigol_dp800_devopts[] = {
SR_CONF_POWER_SUPPLY,
SR_CONF_CONTINUOUS,
- SR_CONF_OVER_TEMPERATURE_PROTECTION,
+ SR_CONF_OVER_TEMPERATURE_PROTECTION | SR_CONF_GET | SR_CONF_SET,
};
static const uint32_t rigol_dp800_devopts_cg[] = {
- SR_CONF_OUTPUT_REGULATION,
- SR_CONF_OVER_VOLTAGE_PROTECTION_ENABLED,
- SR_CONF_OVER_VOLTAGE_PROTECTION_ACTIVE,
- SR_CONF_OVER_VOLTAGE_PROTECTION_THRESHOLD,
- SR_CONF_OVER_CURRENT_PROTECTION_ENABLED,
- SR_CONF_OVER_CURRENT_PROTECTION_ACTIVE,
- SR_CONF_OVER_CURRENT_PROTECTION_THRESHOLD,
- SR_CONF_OUTPUT_VOLTAGE,
- SR_CONF_OUTPUT_VOLTAGE_MAX,
- SR_CONF_OUTPUT_CURRENT,
- SR_CONF_OUTPUT_CURRENT_MAX,
- SR_CONF_OUTPUT_ENABLED,
+ SR_CONF_OUTPUT_REGULATION | SR_CONF_GET,
+ SR_CONF_OVER_VOLTAGE_PROTECTION_ENABLED | SR_CONF_GET | SR_CONF_SET,
+ SR_CONF_OVER_VOLTAGE_PROTECTION_ACTIVE | SR_CONF_GET,
+ SR_CONF_OVER_VOLTAGE_PROTECTION_THRESHOLD | SR_CONF_GET | SR_CONF_SET,
+ SR_CONF_OVER_CURRENT_PROTECTION_ENABLED | SR_CONF_GET | SR_CONF_SET,
+ SR_CONF_OVER_CURRENT_PROTECTION_ACTIVE | SR_CONF_GET,
+ SR_CONF_OVER_CURRENT_PROTECTION_THRESHOLD | SR_CONF_GET | SR_CONF_SET,
+ SR_CONF_OUTPUT_VOLTAGE | SR_CONF_GET,
+ SR_CONF_OUTPUT_VOLTAGE_MAX | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
+ SR_CONF_OUTPUT_CURRENT | SR_CONF_GET,
+ SR_CONF_OUTPUT_CURRENT_MAX | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
+ SR_CONF_OUTPUT_ENABLED | SR_CONF_GET | SR_CONF_SET,
};
struct channel_spec rigol_dp831_ch[] = {
static const uint32_t hp_6632b_devopts[] = {
SR_CONF_POWER_SUPPLY,
SR_CONF_CONTINUOUS,
- SR_CONF_OUTPUT_ENABLED,
- SR_CONF_OUTPUT_VOLTAGE,
- SR_CONF_OUTPUT_CURRENT,
- SR_CONF_OUTPUT_VOLTAGE_MAX,
- SR_CONF_OUTPUT_CURRENT_MAX,
+ SR_CONF_OUTPUT_ENABLED | SR_CONF_GET | SR_CONF_SET,
+ SR_CONF_OUTPUT_VOLTAGE | SR_CONF_GET,
+ SR_CONF_OUTPUT_CURRENT | SR_CONF_GET,
+ SR_CONF_OUTPUT_VOLTAGE_MAX | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
+ SR_CONF_OUTPUT_CURRENT_MAX | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
};
struct channel_spec hp_6632b_ch[] = {
static const uint32_t devopts[] = {
SR_CONF_MULTIMETER,
- SR_CONF_LIMIT_SAMPLES,
- SR_CONF_LIMIT_MSEC,
SR_CONF_CONTINUOUS,
+ SR_CONF_LIMIT_SAMPLES | SR_CONF_SET,
+ SR_CONF_LIMIT_MSEC | SR_CONF_SET,
};
SR_PRIV struct sr_dev_driver bbcgm_m2110_driver_info;
static const uint32_t devopts[] = {
SR_CONF_LOGIC_ANALYZER,
- SR_CONF_SAMPLERATE,
- SR_CONF_EXTERNAL_CLOCK,
- SR_CONF_CLOCK_EDGE,
- SR_CONF_TRIGGER_MATCH,
- SR_CONF_TRIGGER_SOURCE,
- SR_CONF_TRIGGER_SLOPE,
- SR_CONF_LIMIT_MSEC,
- SR_CONF_LIMIT_SAMPLES,
+ SR_CONF_LIMIT_SAMPLES | SR_CONF_GET | SR_CONF_SET,
+ SR_CONF_LIMIT_MSEC | SR_CONF_GET | SR_CONF_SET,
+ SR_CONF_SAMPLERATE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
+ SR_CONF_EXTERNAL_CLOCK | SR_CONF_GET | SR_CONF_SET,
+ SR_CONF_CLOCK_EDGE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
+ SR_CONF_TRIGGER_MATCH | SR_CONF_LIST,
+ SR_CONF_TRIGGER_SOURCE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
+ SR_CONF_TRIGGER_SLOPE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
};
static const int32_t trigger_matches[] = {
static const uint32_t devopts[] = {
SR_CONF_ENERGYMETER,
- SR_CONF_LIMIT_SAMPLES,
- SR_CONF_LIMIT_MSEC,
SR_CONF_CONTINUOUS,
+ SR_CONF_LIMIT_SAMPLES | SR_CONF_SET,
+ SR_CONF_LIMIT_MSEC | SR_CONF_SET,
};
SR_PRIV struct sr_dev_driver teleinfo_driver_info;
static const uint32_t devopts[] = {
SR_CONF_MULTIMETER,
- SR_CONF_LIMIT_MSEC,
- SR_CONF_LIMIT_SAMPLES,
SR_CONF_CONTINUOUS,
+ SR_CONF_LIMIT_SAMPLES | SR_CONF_SET,
+ SR_CONF_LIMIT_MSEC | SR_CONF_SET,
};
unsigned char TESTO_x35_REQUEST[] = { 0x12, 0, 0, 0, 1, 1, 0x55, 0xd1, 0xb7 };
static const uint32_t devopts[] = {
SR_CONF_SOUNDLEVELMETER,
- SR_CONF_LIMIT_SAMPLES,
SR_CONF_CONTINUOUS,
+ SR_CONF_LIMIT_SAMPLES | SR_CONF_SET,
};
SR_PRIV struct sr_dev_driver tondaj_sl_814_driver_info;
static const uint32_t devopts[] = {
SR_CONF_MULTIMETER,
- SR_CONF_LIMIT_SAMPLES,
- SR_CONF_LIMIT_MSEC,
SR_CONF_CONTINUOUS,
+ SR_CONF_LIMIT_SAMPLES | SR_CONF_SET,
+ SR_CONF_LIMIT_MSEC | SR_CONF_SET,
};
SR_PRIV struct sr_dev_driver tecpel_dmm_8061_driver_info;
static const uint32_t devopts[] = {
SR_CONF_THERMOMETER,
- SR_CONF_LIMIT_SAMPLES,
SR_CONF_CONTINUOUS,
- SR_CONF_DATA_SOURCE,
+ SR_CONF_LIMIT_SAMPLES | SR_CONF_GET | SR_CONF_SET,
+ SR_CONF_DATA_SOURCE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
};
static char *channels[] = {
static const uint32_t devopts[] = {
SR_CONF_MULTIMETER,
- SR_CONF_LIMIT_MSEC,
- SR_CONF_LIMIT_SAMPLES,
SR_CONF_CONTINUOUS,
+ SR_CONF_CONN | SR_CONF_GET,
+ SR_CONF_LIMIT_SAMPLES | SR_CONF_SET,
+ SR_CONF_LIMIT_MSEC | SR_CONF_SET,
};
static int init(struct sr_context *sr_ctx)
static const uint32_t dlm_devopts[] = {
SR_CONF_LOGIC_ANALYZER,
SR_CONF_OSCILLOSCOPE,
- SR_CONF_TRIGGER_SLOPE,
- SR_CONF_TRIGGER_SOURCE,
- SR_CONF_TIMEBASE,
- SR_CONF_NUM_TIMEBASE,
- SR_CONF_HORIZ_TRIGGERPOS,
+ SR_CONF_LIMIT_FRAMES | SR_CONF_SET,
+ SR_CONF_SAMPLERATE | SR_CONF_GET,
+ SR_CONF_TRIGGER_SLOPE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
+ SR_CONF_TRIGGER_SOURCE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
+ SR_CONF_TIMEBASE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
+ SR_CONF_NUM_TIMEBASE | SR_CONF_GET,
+ SR_CONF_HORIZ_TRIGGERPOS | SR_CONF_GET | SR_CONF_SET,
};
static const uint32_t dlm_analog_devopts[] = {
- SR_CONF_VDIV,
- SR_CONF_COUPLING,
- SR_CONF_NUM_VDIV,
+ 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_NUM_VDIV | SR_CONF_GET,
};
static const char *dlm_coupling_options[] = {
static const uint32_t devopts[] = {
SR_CONF_LOGIC_ANALYZER,
- SR_CONF_SAMPLERATE,
- SR_CONF_TRIGGER_MATCH,
- SR_CONF_CAPTURE_RATIO,
- SR_CONF_VOLTAGE_THRESHOLD,
- SR_CONF_LIMIT_SAMPLES,
+ SR_CONF_LIMIT_SAMPLES | SR_CONF_SET | SR_CONF_LIST,
+ SR_CONF_SAMPLERATE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
+ SR_CONF_TRIGGER_MATCH | SR_CONF_LIST,
+ SR_CONF_CAPTURE_RATIO | SR_CONF_GET | SR_CONF_SET,
+ SR_CONF_VOLTAGE_THRESHOLD | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
};
static const int32_t trigger_matches[] = {