Drop SR_CONF_SET flag from SR_CONF_CONTINUOUS options

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 <lars@metafoo.de>
This commit is contained in:
Lars-Peter Clausen 2016-05-02 13:22:46 +02:00 committed by Bert Vermeulen
parent c01bf34ca2
commit e91bb0a6c4
15 changed files with 20 additions and 20 deletions

View 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,
};

View 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,

View 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,
};

View 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,
};

View 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,

View 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,

View 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,
};

View 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,

View 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,

View 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,

View 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,

View 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,

View 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,
};

View 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,
};

View 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[] = {