]> sigrok.org Git - libsigrok.git/commitdiff
Drop SR_CONF_SET flag from SR_CONF_CONTINUOUS options
authorLars-Peter Clausen <redacted>
Mon, 2 May 2016 11:22:46 +0000 (13:22 +0200)
committerBert Vermeulen <redacted>
Tue, 3 May 2016 19:49:02 +0000 (21:49 +0200)
SR_CONF_CONTINUOUS is a capability option indicating whether a device
supports continuous capture or not. If the option exists the device
supports continuous capture and otherwise it doesn't. There is no value
associated with it and hence setting the SR_CONF_SET flag is nonsensical.

None of the drivers which set SR_CONF_SET for SR_CONF_CONTINUOUS handle it
in their config_set() callback and return an error if an application tried
to perform a config_set() operation for SR_CONF_CONTINUOUS.

Simply remove the SR_CONF_SET flag from all SR_CONF_CONTINUOUS options.

Signed-off-by: Lars-Peter Clausen <redacted>
15 files changed:
src/hardware/agilent-dmm/api.c
src/hardware/appa-55ii/api.c
src/hardware/arachnid-labs-re-load-pro/api.c
src/hardware/atten-pps3xxx/api.c
src/hardware/baylibre-acme/api.c
src/hardware/cem-dt-885x/api.c
src/hardware/center-3xx/api.c
src/hardware/demo/demo.c
src/hardware/ftdi-la/api.c
src/hardware/fx2lafw/api.c
src/hardware/hantek-dso/api.c
src/hardware/hp-3457a/api.c
src/hardware/maynuo-m97/api.c
src/hardware/mic-985xx/api.c
src/hardware/scpi-pps/profiles.c

index 4ce966d9d67dfc722cbd3f5ea35abcc44cb4269c..1e5679b218392a1e3b8482eae4d1786758be0788 100644 (file)
@@ -37,7 +37,7 @@ static const uint32_t drvopts[] = {
 };
 
 static const uint32_t devopts[] = {
-       SR_CONF_CONTINUOUS | SR_CONF_SET,
+       SR_CONF_CONTINUOUS,
        SR_CONF_LIMIT_SAMPLES | SR_CONF_SET,
        SR_CONF_LIMIT_MSEC | SR_CONF_SET,
 };
index cdf30af8bf850a3d5c052d0a52ec2c0a3c54540c..c4e34331a71332d7e911ce9816705c9c0e156bd5 100644 (file)
@@ -31,7 +31,7 @@ static const uint32_t drvopts[] = {
 };
 
 static const uint32_t devopts[] = {
-       SR_CONF_CONTINUOUS | SR_CONF_SET,
+       SR_CONF_CONTINUOUS,
        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,
index 5a6ad00748cc9abcd3fa6a7620636a2018681b0a..e1bf5fc2cbb3157d20d8f3ad5f9794ddf88381a6 100644 (file)
@@ -37,7 +37,7 @@ static const uint32_t drvopts[] = {
 };
 
 static const uint32_t devopts[] = {
-       SR_CONF_CONTINUOUS | SR_CONF_SET,
+       SR_CONF_CONTINUOUS,
        SR_CONF_LIMIT_SAMPLES | SR_CONF_GET | SR_CONF_SET,
        SR_CONF_LIMIT_MSEC | SR_CONF_GET | SR_CONF_SET,
 };
index 85a32a4a99a4e144800a417eec1c8056fa8a4afa..21968df4c77beac2dcc88461a074a2255d0e860c 100644 (file)
@@ -41,7 +41,7 @@ static const uint32_t drvopts[] = {
 };
 
 static const uint32_t devopts[] = {
-       SR_CONF_CONTINUOUS | SR_CONF_SET,
+       SR_CONF_CONTINUOUS,
        SR_CONF_CHANNEL_CONFIG | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
        SR_CONF_OVER_CURRENT_PROTECTION_ENABLED | SR_CONF_GET | SR_CONF_SET,
 };
index b4a7f8c6d7491ac252c0ac7786effaa489d1d5e5..6153513bd5b3017f173a80870e09704741ac6ca7 100644 (file)
@@ -25,7 +25,7 @@
 SR_PRIV struct sr_dev_driver baylibre_acme_driver_info;
 
 static const uint32_t devopts[] = {
-       SR_CONF_CONTINUOUS | SR_CONF_SET,
+       SR_CONF_CONTINUOUS,
        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,
index 9eb8bf0624f5c10c272cf2f5a4b43c578f53307a..435c236f148a08c5da2a1d01743ec624f55f007f 100644 (file)
@@ -35,7 +35,7 @@ static const uint32_t drvopts[] = {
 };
 
 static const uint32_t devopts[] = {
-       SR_CONF_CONTINUOUS | SR_CONF_SET,
+       SR_CONF_CONTINUOUS,
        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,
index 2e72cc969ce68b820bfda39374e19699337f4c9f..997d1405b1b6d8d93ec88b73c4aba4dc8ef56bc1 100644 (file)
@@ -31,7 +31,7 @@ static const uint32_t drvopts[] = {
 };
 
 static const uint32_t devopts[] = {
-       SR_CONF_CONTINUOUS | SR_CONF_SET,
+       SR_CONF_CONTINUOUS,
        SR_CONF_LIMIT_SAMPLES | SR_CONF_SET,
        SR_CONF_LIMIT_MSEC | SR_CONF_SET,
 };
index 10a3eb029cb28d858f0c5360ce83ef7b0d28e8e6..9a0232397564456156a339539e78d2fc9c5653b1 100644 (file)
@@ -137,7 +137,7 @@ static const uint32_t scanopts[] = {
 };
 
 static const uint32_t devopts[] = {
-       SR_CONF_CONTINUOUS | SR_CONF_SET,
+       SR_CONF_CONTINUOUS,
        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,
index a2cc4a75db3d8333b545d234bd84f69d52b8897f..a1b3e967239b70107401cdccca42f23586a17099 100644 (file)
@@ -32,7 +32,7 @@ static const uint32_t scanopts[] = {
 
 static const uint32_t devopts[] = {
        SR_CONF_LOGIC_ANALYZER,
-       SR_CONF_CONTINUOUS | SR_CONF_SET,
+       SR_CONF_CONTINUOUS,
        SR_CONF_LIMIT_SAMPLES | SR_CONF_SET,
        SR_CONF_SAMPLERATE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
        SR_CONF_CONN | SR_CONF_GET,
index 368873abaeec7f316efc7c8c84c5d24c6daac2e2..6eeaed0b4c5f5520e6ce19448f79589814b43706 100644 (file)
@@ -125,7 +125,7 @@ static const uint32_t scanopts[] = {
 };
 
 static const uint32_t devopts[] = {
-       SR_CONF_CONTINUOUS | SR_CONF_SET,
+       SR_CONF_CONTINUOUS,
        SR_CONF_LIMIT_SAMPLES | SR_CONF_GET | SR_CONF_SET,
        SR_CONF_CONN | SR_CONF_GET,
        SR_CONF_SAMPLERATE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
index ddea80846f80011f5e45257b2a0409bfcdbfdf31..8a2f42c5f7335864bcdccf70080616670dc86de8 100644 (file)
@@ -52,7 +52,7 @@ static const uint32_t drvopts[] = {
 };
 
 static const uint32_t devopts[] = {
-       SR_CONF_CONTINUOUS | SR_CONF_SET,
+       SR_CONF_CONTINUOUS,
        SR_CONF_LIMIT_FRAMES | SR_CONF_SET,
        SR_CONF_CONN | SR_CONF_GET,
        SR_CONF_TIMEBASE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
index 129e1e59656e7ed9dc458295da8631eade6af5b6..5dedc9213292beca4ff3f7c276afb20eb3dcbfc5 100644 (file)
@@ -31,7 +31,7 @@ static const uint32_t drvopts[] = {
 };
 
 static const uint32_t devopts[] = {
-       SR_CONF_CONTINUOUS | SR_CONF_SET,
+       SR_CONF_CONTINUOUS,
        SR_CONF_LIMIT_SAMPLES | SR_CONF_SET,
        SR_CONF_MEASURED_QUANTITY | SR_CONF_SET,
        SR_CONF_ADC_POWERLINE_CYCLES | SR_CONF_SET | SR_CONF_GET,
index 3878e6f90778328929c4bb5db60adecfde15cd3f..2a18a5a1ac26970a896dbaaea0a5497e7253fdb4 100644 (file)
@@ -31,7 +31,7 @@ static const uint32_t drvopts[] = {
 };
 
 static const uint32_t devopts[] = {
-       SR_CONF_CONTINUOUS | SR_CONF_SET,
+       SR_CONF_CONTINUOUS,
        SR_CONF_LIMIT_SAMPLES | SR_CONF_GET | SR_CONF_SET,
        SR_CONF_LIMIT_MSEC | SR_CONF_GET | SR_CONF_SET,
 };
index 8e1bba8d780913d43db06716628f263563054cf0..46cad7dbcaf4ec81a417e20a078bf38e8a75583a 100644 (file)
@@ -36,7 +36,7 @@ static const uint32_t drvopts_temp_hum[] = {
 };
 
 static const uint32_t devopts[] = {
-       SR_CONF_CONTINUOUS | SR_CONF_SET,
+       SR_CONF_CONTINUOUS,
        SR_CONF_LIMIT_SAMPLES | SR_CONF_SET,
        SR_CONF_LIMIT_MSEC | SR_CONF_SET,
 };
index 33f9c23d3eb159b6f4aea62780f512c523dfa1e4..686987f68729368f5622d3da60d8e45d64ec1459 100644 (file)
@@ -31,7 +31,7 @@ static const uint32_t devopts_none[] = { };
 
 /* Agilent/Keysight N5700A series */
 static const uint32_t agilent_n5700a_devopts[] = {
-       SR_CONF_CONTINUOUS | SR_CONF_SET,
+       SR_CONF_CONTINUOUS,
 };
 
 static const uint32_t agilent_n5700a_devopts_cg[] = {
@@ -85,7 +85,7 @@ static const struct scpi_command agilent_n5700a_cmd[] = {
 
 /* Chroma 61600 series AC source */
 static const uint32_t chroma_61604_devopts[] = {
-       SR_CONF_CONTINUOUS | SR_CONF_SET,
+       SR_CONF_CONTINUOUS,
 };
 
 static const uint32_t chroma_61604_devopts_cg[] = {
@@ -132,7 +132,7 @@ static const struct scpi_command chroma_61604_cmd[] = {
 /* Chroma 62000 series DC source */
 
 static const uint32_t chroma_62000_devopts[] = {
-       SR_CONF_CONTINUOUS | SR_CONF_SET,
+       SR_CONF_CONTINUOUS,
 };
 
 static const uint32_t chroma_62000_devopts_cg[] = {
@@ -214,7 +214,7 @@ static int chroma_62000p_probe_channels(struct sr_dev_inst *sdi,
 
 /* Rigol DP800 series */
 static const uint32_t rigol_dp800_devopts[] = {
-       SR_CONF_CONTINUOUS | SR_CONF_SET,
+       SR_CONF_CONTINUOUS,
        SR_CONF_OVER_TEMPERATURE_PROTECTION | SR_CONF_GET | SR_CONF_SET,
 };
 
@@ -299,7 +299,7 @@ static const struct scpi_command rigol_dp800_cmd[] = {
 
 /* HP 663xx series */
 static const uint32_t hp_6632b_devopts[] = {
-       SR_CONF_CONTINUOUS | SR_CONF_SET,
+       SR_CONF_CONTINUOUS,
        SR_CONF_ENABLED | SR_CONF_GET | SR_CONF_SET,
        SR_CONF_VOLTAGE | SR_CONF_GET,
        SR_CONF_CURRENT | SR_CONF_GET,
@@ -330,7 +330,7 @@ static const struct scpi_command hp_6632b_cmd[] = {
 
 /* Philips/Fluke PM2800 series */
 static const uint32_t philips_pm2800_devopts[] = {
-       SR_CONF_CONTINUOUS | SR_CONF_SET,
+       SR_CONF_CONTINUOUS,
 };
 
 static const uint32_t philips_pm2800_devopts_cg[] = {