From: Bert Vermeulen Date: Wed, 17 Sep 2014 13:28:29 +0000 (+0200) Subject: Publish config key capabilities. X-Git-Tag: libsigrok-0.4.0~995 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=5827f61b641cfd326a9cf2ea534eb4f9481a8187;p=libsigrok.git Publish config key capabilities. Every driver now publishes its device option config keys, i.e. the list fetched with sr_config_list(SR_CONF_DEVICE_OPTIONS), with a set of flags indicating which methods are implemented by the driver for that key. The config keys are OR'ed with any combination of SR_CONF_GET, SR_CONF_SET and SR_CONF_LIST. These are defined as the high bits of the uint32_t config key. Clients can OR config keys with SR_CONF_MASK to strip out these bits. This mask will be kept up to date if other bits are added to the capabilities list; clients MUST therefore use SR_CONF_MASK for this. Some keys don't have capability bits added, such as the informative device type keys (SR_CONF_MULTIMETER, SR_CONF_OSCILLOSCOPE, ...) and SR_CONF_CONTINUOUS. Scan options do not have capabilities bits. --- diff --git a/include/libsigrok/libsigrok.h b/include/libsigrok/libsigrok.h index c029f117..4f3510d8 100644 --- a/include/libsigrok/libsigrok.h +++ b/include/libsigrok/libsigrok.h @@ -505,6 +505,11 @@ struct sr_config_info { 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 ------------------------------------------------*/ diff --git a/src/hardware/agilent-dmm/api.c b/src/hardware/agilent-dmm/api.c index e6652a6d..1c18c99c 100644 --- a/src/hardware/agilent-dmm/api.c +++ b/src/hardware/agilent-dmm/api.c @@ -34,9 +34,9 @@ static const uint32_t scanopts[] = { 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[]; diff --git a/src/hardware/appa-55ii/api.c b/src/hardware/appa-55ii/api.c index 5bc16310..c9169f33 100644 --- a/src/hardware/appa-55ii/api.c +++ b/src/hardware/appa-55ii/api.c @@ -27,10 +27,10 @@ static const uint32_t scanopts[] = { 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[] = { diff --git a/src/hardware/asix-sigma/asix-sigma.c b/src/hardware/asix-sigma/asix-sigma.c index 37620c72..d0f06603 100644 --- a/src/hardware/asix-sigma/asix-sigma.c +++ b/src/hardware/asix-sigma/asix-sigma.c @@ -73,10 +73,11 @@ static const char *channel_names[] = { 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[] = { diff --git a/src/hardware/atten-pps3xxx/api.c b/src/hardware/atten-pps3xxx/api.c index 0df8bcf0..d901649a 100644 --- a/src/hardware/atten-pps3xxx/api.c +++ b/src/hardware/atten-pps3xxx/api.c @@ -39,16 +39,16 @@ static const uint32_t scanopts[] = { 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[] = { diff --git a/src/hardware/beaglelogic/api.c b/src/hardware/beaglelogic/api.c index 3f83a916..9732311d 100644 --- a/src/hardware/beaglelogic/api.c +++ b/src/hardware/beaglelogic/api.c @@ -31,13 +31,11 @@ static const uint32_t scanopts[] = { /* 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 */ diff --git a/src/hardware/brymen-bm86x/api.c b/src/hardware/brymen-bm86x/api.c index dee492af..d56b76ae 100644 --- a/src/hardware/brymen-bm86x/api.c +++ b/src/hardware/brymen-bm86x/api.c @@ -27,9 +27,9 @@ static const uint32_t scanopts[] = { 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; diff --git a/src/hardware/brymen-dmm/api.c b/src/hardware/brymen-dmm/api.c index 44c9286d..51334217 100644 --- a/src/hardware/brymen-dmm/api.c +++ b/src/hardware/brymen-dmm/api.c @@ -26,9 +26,9 @@ static const uint32_t scanopts[] = { 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; diff --git a/src/hardware/cem-dt-885x/api.c b/src/hardware/cem-dt-885x/api.c index b4bfe861..b77f471f 100644 --- a/src/hardware/cem-dt-885x/api.c +++ b/src/hardware/cem-dt-885x/api.c @@ -30,16 +30,16 @@ static const uint32_t scanopts[] = { 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[] = { diff --git a/src/hardware/center-3xx/api.c b/src/hardware/center-3xx/api.c index 1594724a..9a43323d 100644 --- a/src/hardware/center-3xx/api.c +++ b/src/hardware/center-3xx/api.c @@ -27,9 +27,9 @@ static const uint32_t scanopts[] = { 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[] = { diff --git a/src/hardware/chronovu-la/api.c b/src/hardware/chronovu-la/api.c index ae977a4b..4edeedfc 100644 --- a/src/hardware/chronovu-la/api.c +++ b/src/hardware/chronovu-la/api.c @@ -25,10 +25,10 @@ static struct sr_dev_driver *di = &chronovu_la_driver_info; 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[] = { diff --git a/src/hardware/colead-slm/api.c b/src/hardware/colead-slm/api.c index d299693f..0f4225e5 100644 --- a/src/hardware/colead-slm/api.c +++ b/src/hardware/colead-slm/api.c @@ -37,9 +37,9 @@ static const uint32_t scanopts[] = { 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; diff --git a/src/hardware/conrad-digi-35-cpu/api.c b/src/hardware/conrad-digi-35-cpu/api.c index 36a9c3fd..f0bb2366 100644 --- a/src/hardware/conrad-digi-35-cpu/api.c +++ b/src/hardware/conrad-digi-35-cpu/api.c @@ -33,10 +33,9 @@ static const uint32_t scanopts[] = { 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; @@ -150,7 +149,6 @@ static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sd } 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); diff --git a/src/hardware/demo/demo.c b/src/hardware/demo/demo.c index d2fddde4..2609aa5f 100644 --- a/src/hardware/demo/demo.c +++ b/src/hardware/demo/demo.c @@ -135,11 +135,15 @@ static const uint32_t scanopts[] = { 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[] = { diff --git a/src/hardware/fluke-dmm/api.c b/src/hardware/fluke-dmm/api.c index 91c6bd7b..9c5d4b55 100644 --- a/src/hardware/fluke-dmm/api.c +++ b/src/hardware/fluke-dmm/api.c @@ -34,9 +34,9 @@ static const uint32_t scanopts[] = { 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; diff --git a/src/hardware/fx2lafw/api.c b/src/hardware/fx2lafw/api.c index b73f871f..18a34df6 100644 --- a/src/hardware/fx2lafw/api.c +++ b/src/hardware/fx2lafw/api.c @@ -79,12 +79,11 @@ static const uint32_t scanopts[] = { 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[] = { diff --git a/src/hardware/gmc-mh-1x-2x/api.c b/src/hardware/gmc-mh-1x-2x/api.c index e8914244..4574dfea 100644 --- a/src/hardware/gmc-mh-1x-2x/api.c +++ b/src/hardware/gmc-mh-1x-2x/api.c @@ -43,19 +43,19 @@ static const uint32_t scanopts[] = { 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, }; @@ -463,7 +463,7 @@ static int config_list_common(uint32_t key, GVariant **data, const struct sr_dev 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; @@ -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, - 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); @@ -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, - 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); diff --git a/src/hardware/hameg-hmo/protocol.c b/src/hardware/hameg-hmo/protocol.c index 8c80204f..c97658ea 100644 --- a/src/hardware/hameg-hmo/protocol.c +++ b/src/hardware/hameg-hmo/protocol.c @@ -47,19 +47,19 @@ static const char *hameg_scpi_dialect[] = { 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[] = { diff --git a/src/hardware/hantek-dso/api.c b/src/hardware/hantek-dso/api.c index abc3c08e..e0e05df5 100644 --- a/src/hardware/hantek-dso/api.c +++ b/src/hardware/hantek-dso/api.c @@ -46,18 +46,19 @@ static const uint32_t scanopts[] = { 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[] = { diff --git a/src/hardware/ikalogic-scanalogic2/api.c b/src/hardware/ikalogic-scanalogic2/api.c index 44eb4755..81756d76 100644 --- a/src/hardware/ikalogic-scanalogic2/api.c +++ b/src/hardware/ikalogic-scanalogic2/api.c @@ -21,10 +21,10 @@ 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[] = { diff --git a/src/hardware/ikalogic-scanaplus/api.c b/src/hardware/ikalogic-scanaplus/api.c index 0ba0d3c9..02d5c043 100644 --- a/src/hardware/ikalogic-scanaplus/api.c +++ b/src/hardware/ikalogic-scanaplus/api.c @@ -30,10 +30,9 @@ 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. */ diff --git a/src/hardware/kecheng-kc-330b/api.c b/src/hardware/kecheng-kc-330b/api.c index 30d3247e..0dbf198a 100644 --- a/src/hardware/kecheng-kc-330b/api.c +++ b/src/hardware/kecheng-kc-330b/api.c @@ -26,12 +26,13 @@ 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] = { diff --git a/src/hardware/lascar-el-usb/api.c b/src/hardware/lascar-el-usb/api.c index 5c615cce..73141561 100644 --- a/src/hardware/lascar-el-usb/api.c +++ b/src/hardware/lascar-el-usb/api.c @@ -33,8 +33,9 @@ static const uint32_t scanopts[] = { 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) diff --git a/src/hardware/link-mso19/api.c b/src/hardware/link-mso19/api.c index 7beb15ca..08fcb4b7 100644 --- a/src/hardware/link-mso19/api.c +++ b/src/hardware/link-mso19/api.c @@ -24,13 +24,13 @@ 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, }; /* diff --git a/src/hardware/manson-hcs-3xxx/api.c b/src/hardware/manson-hcs-3xxx/api.c index ce6b6f32..58fe7e1f 100644 --- a/src/hardware/manson-hcs-3xxx/api.c +++ b/src/hardware/manson-hcs-3xxx/api.c @@ -35,15 +35,15 @@ static const uint32_t devopts[] = { /* 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. */ diff --git a/src/hardware/mic-985xx/api.c b/src/hardware/mic-985xx/api.c index 10f114e4..8f9dd5cb 100644 --- a/src/hardware/mic-985xx/api.c +++ b/src/hardware/mic-985xx/api.c @@ -28,9 +28,9 @@ static const uint32_t scanopts[] = { 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; diff --git a/src/hardware/motech-lps-30x/api.c b/src/hardware/motech-lps-30x/api.c index 3778cc9b..1304e1c5 100644 --- a/src/hardware/motech-lps-30x/api.c +++ b/src/hardware/motech-lps-30x/api.c @@ -54,26 +54,26 @@ static const uint32_t devopts[] = { /* 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[] = { diff --git a/src/hardware/norma-dmm/api.c b/src/hardware/norma-dmm/api.c index 48a8f133..c5f95d28 100644 --- a/src/hardware/norma-dmm/api.c +++ b/src/hardware/norma-dmm/api.c @@ -31,9 +31,9 @@ static const uint32_t scanopts[] = { 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 diff --git a/src/hardware/openbench-logic-sniffer/api.c b/src/hardware/openbench-logic-sniffer/api.c index 73459e2d..25f296eb 100644 --- a/src/hardware/openbench-logic-sniffer/api.c +++ b/src/hardware/openbench-logic-sniffer/api.c @@ -29,14 +29,14 @@ static const uint32_t scanopts[] = { 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[] = { diff --git a/src/hardware/pipistrello-ols/api.c b/src/hardware/pipistrello-ols/api.c index 41f24fc5..9287509f 100644 --- a/src/hardware/pipistrello-ols/api.c +++ b/src/hardware/pipistrello-ols/api.c @@ -21,14 +21,14 @@ 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[] = { diff --git a/src/hardware/rigol-ds/api.c b/src/hardware/rigol-ds/api.c index e76b6b92..e943f9b2 100644 --- a/src/hardware/rigol-ds/api.c +++ b/src/hardware/rigol-ds/api.c @@ -36,20 +36,20 @@ static const uint32_t scanopts[] = { 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] = { diff --git a/src/hardware/saleae-logic16/api.c b/src/hardware/saleae-logic16/api.c index 6b282f7d..2ae1f3de 100644 --- a/src/hardware/saleae-logic16/api.c +++ b/src/hardware/saleae-logic16/api.c @@ -47,13 +47,12 @@ static const uint32_t scanopts[] = { 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[] = { diff --git a/src/hardware/scpi-pps/profiles.c b/src/hardware/scpi-pps/profiles.c index 925b6db8..efd87193 100644 --- a/src/hardware/scpi-pps/profiles.c +++ b/src/hardware/scpi-pps/profiles.c @@ -45,22 +45,22 @@ static const uint32_t devopts_none[] = { }; 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[] = { @@ -111,11 +111,11 @@ struct scpi_command rigol_dp800_cmd[] = { 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[] = { diff --git a/src/hardware/serial-dmm/api.c b/src/hardware/serial-dmm/api.c index 86488d76..f423f474 100644 --- a/src/hardware/serial-dmm/api.c +++ b/src/hardware/serial-dmm/api.c @@ -36,9 +36,9 @@ static const uint32_t scanopts[] = { 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; diff --git a/src/hardware/sysclk-lwla/api.c b/src/hardware/sysclk-lwla/api.c index 3bb0c4f3..40308f50 100644 --- a/src/hardware/sysclk-lwla/api.c +++ b/src/hardware/sysclk-lwla/api.c @@ -31,14 +31,14 @@ static const uint32_t scanopts[] = { 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[] = { diff --git a/src/hardware/teleinfo/api.c b/src/hardware/teleinfo/api.c index 02de164c..4060b03e 100644 --- a/src/hardware/teleinfo/api.c +++ b/src/hardware/teleinfo/api.c @@ -30,9 +30,9 @@ static const uint32_t scanopts[] = { 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; diff --git a/src/hardware/testo/api.c b/src/hardware/testo/api.c index c0604da6..8970a9f9 100644 --- a/src/hardware/testo/api.c +++ b/src/hardware/testo/api.c @@ -32,9 +32,9 @@ static const uint32_t scanopts[] = { 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 }; diff --git a/src/hardware/tondaj-sl-814/api.c b/src/hardware/tondaj-sl-814/api.c index 6150ccb9..5a294abc 100644 --- a/src/hardware/tondaj-sl-814/api.c +++ b/src/hardware/tondaj-sl-814/api.c @@ -33,8 +33,8 @@ static const uint32_t scanopts[] = { 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; diff --git a/src/hardware/uni-t-dmm/api.c b/src/hardware/uni-t-dmm/api.c index 56d116ce..440a7ec1 100644 --- a/src/hardware/uni-t-dmm/api.c +++ b/src/hardware/uni-t-dmm/api.c @@ -32,9 +32,9 @@ static const uint32_t scanopts[] = { 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; diff --git a/src/hardware/uni-t-ut32x/api.c b/src/hardware/uni-t-ut32x/api.c index 87ff065e..ab82b779 100644 --- a/src/hardware/uni-t-ut32x/api.c +++ b/src/hardware/uni-t-ut32x/api.c @@ -23,9 +23,9 @@ 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[] = { diff --git a/src/hardware/victor-dmm/api.c b/src/hardware/victor-dmm/api.c index 38c4504a..e0c5d2fd 100644 --- a/src/hardware/victor-dmm/api.c +++ b/src/hardware/victor-dmm/api.c @@ -41,9 +41,10 @@ static const uint32_t scanopts[] = { 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) diff --git a/src/hardware/yokogawa-dlm/protocol.c b/src/hardware/yokogawa-dlm/protocol.c index 7acd1b59..09d3c9b8 100644 --- a/src/hardware/yokogawa-dlm/protocol.c +++ b/src/hardware/yokogawa-dlm/protocol.c @@ -28,17 +28,19 @@ 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[] = { diff --git a/src/hardware/zeroplus-logic-cube/api.c b/src/hardware/zeroplus-logic-cube/api.c index 3e0dbef0..ade3a640 100644 --- a/src/hardware/zeroplus-logic-cube/api.c +++ b/src/hardware/zeroplus-logic-cube/api.c @@ -54,11 +54,11 @@ static const struct zp_model zeroplus_models[] = { 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[] = {