From: Uwe Hermann Date: Tue, 18 Jul 2017 20:12:54 +0000 (+0200) Subject: drivers: Always use same scanopts/drvopts/devopts/devopts_cg* order. X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=55fb76b34826a287240bebeeda688e4c465b4751;p=libsigrok.git drivers: Always use same scanopts/drvopts/devopts/devopts_cg* order. --- diff --git a/src/hardware/chronovu-la/api.c b/src/hardware/chronovu-la/api.c index d9913adb..d02ef3ef 100644 --- a/src/hardware/chronovu-la/api.c +++ b/src/hardware/chronovu-la/api.c @@ -20,14 +20,14 @@ #include #include "protocol.h" -static const uint32_t drvopts[] = { - SR_CONF_LOGIC_ANALYZER, -}; - static const uint32_t scanopts[] = { SR_CONF_CONN, }; +static const uint32_t drvopts[] = { + SR_CONF_LOGIC_ANALYZER, +}; + static const uint32_t devopts[] = { SR_CONF_LIMIT_MSEC | SR_CONF_SET, SR_CONF_LIMIT_SAMPLES | SR_CONF_SET | SR_CONF_LIST, diff --git a/src/hardware/demo/api.c b/src/hardware/demo/api.c index 55e342d8..ed3d0c35 100644 --- a/src/hardware/demo/api.c +++ b/src/hardware/demo/api.c @@ -46,17 +46,17 @@ static const char *logic_pattern_str[] = { "squid", }; +static const uint32_t scanopts[] = { + SR_CONF_NUM_LOGIC_CHANNELS, + SR_CONF_NUM_ANALOG_CHANNELS, +}; + static const uint32_t drvopts[] = { SR_CONF_DEMO_DEV, SR_CONF_LOGIC_ANALYZER, SR_CONF_OSCILLOSCOPE, }; -static const uint32_t scanopts[] = { - SR_CONF_NUM_LOGIC_CHANNELS, - SR_CONF_NUM_ANALOG_CHANNELS, -}; - static const uint32_t devopts[] = { SR_CONF_CONTINUOUS, SR_CONF_LIMIT_SAMPLES | SR_CONF_GET | SR_CONF_SET, diff --git a/src/hardware/dreamsourcelab-dslogic/api.c b/src/hardware/dreamsourcelab-dslogic/api.c index d37768e4..08dded01 100644 --- a/src/hardware/dreamsourcelab-dslogic/api.c +++ b/src/hardware/dreamsourcelab-dslogic/api.c @@ -47,14 +47,14 @@ static const struct dslogic_profile supported_device[] = { ALL_ZERO }; -static const uint32_t drvopts[] = { - SR_CONF_LOGIC_ANALYZER, -}; - static const uint32_t scanopts[] = { SR_CONF_CONN, }; +static const uint32_t drvopts[] = { + SR_CONF_LOGIC_ANALYZER, +}; + static const uint32_t devopts[] = { SR_CONF_CONTINUOUS | SR_CONF_SET | SR_CONF_GET, SR_CONF_LIMIT_SAMPLES | SR_CONF_GET | SR_CONF_SET, diff --git a/src/hardware/fx2lafw/api.c b/src/hardware/fx2lafw/api.c index cc1a7c49..b9d43428 100644 --- a/src/hardware/fx2lafw/api.c +++ b/src/hardware/fx2lafw/api.c @@ -96,14 +96,14 @@ static const struct fx2lafw_profile supported_fx2[] = { ALL_ZERO }; -static const uint32_t drvopts[] = { - SR_CONF_LOGIC_ANALYZER, -}; - static const uint32_t scanopts[] = { SR_CONF_CONN, }; +static const uint32_t drvopts[] = { + SR_CONF_LOGIC_ANALYZER, +}; + static const uint32_t devopts[] = { SR_CONF_CONTINUOUS, SR_CONF_LIMIT_SAMPLES | SR_CONF_GET | SR_CONF_SET, diff --git a/src/hardware/hameg-hmo/api.c b/src/hardware/hameg-hmo/api.c index 22fcbc54..5f192a84 100644 --- a/src/hardware/hameg-hmo/api.c +++ b/src/hardware/hameg-hmo/api.c @@ -31,15 +31,15 @@ static const char *manufacturers[] = { "Rohde&Schwarz", }; -static const uint32_t drvopts[] = { - SR_CONF_OSCILLOSCOPE, -}; - static const uint32_t scanopts[] = { SR_CONF_CONN, SR_CONF_SERIALCOMM, }; +static const uint32_t drvopts[] = { + SR_CONF_OSCILLOSCOPE, +}; + enum { CG_INVALID = -1, CG_NONE, diff --git a/src/hardware/korad-kaxxxxp/api.c b/src/hardware/korad-kaxxxxp/api.c index a28bc1e2..35c16bd1 100644 --- a/src/hardware/korad-kaxxxxp/api.c +++ b/src/hardware/korad-kaxxxxp/api.c @@ -20,16 +20,16 @@ #include #include "protocol.h" -static const uint32_t drvopts[] = { - /* Device class */ - SR_CONF_POWER_SUPPLY, -}; - static const uint32_t scanopts[] = { SR_CONF_CONN, SR_CONF_SERIALCOMM, }; +static const uint32_t drvopts[] = { + /* Device class */ + SR_CONF_POWER_SUPPLY, +}; + static const uint32_t devopts[] = { /* Device class */ SR_CONF_POWER_SUPPLY, diff --git a/src/hardware/manson-hcs-3xxx/api.c b/src/hardware/manson-hcs-3xxx/api.c index 8102ba9a..a2f1feca 100644 --- a/src/hardware/manson-hcs-3xxx/api.c +++ b/src/hardware/manson-hcs-3xxx/api.c @@ -29,16 +29,16 @@ #include #include "protocol.h" -static const uint32_t drvopts[] = { - /* Device class */ - SR_CONF_POWER_SUPPLY, -}; - static const uint32_t scanopts[] = { SR_CONF_CONN, SR_CONF_SERIALCOMM, }; +static const uint32_t drvopts[] = { + /* Device class */ + SR_CONF_POWER_SUPPLY, +}; + static const uint32_t devopts[] = { /* Device class */ SR_CONF_POWER_SUPPLY, diff --git a/src/hardware/maynuo-m97/api.c b/src/hardware/maynuo-m97/api.c index effa1b0b..08bc1615 100644 --- a/src/hardware/maynuo-m97/api.c +++ b/src/hardware/maynuo-m97/api.c @@ -23,7 +23,7 @@ static const uint32_t scanopts[] = { SR_CONF_CONN, SR_CONF_SERIALCOMM, - SR_CONF_MODBUSADDR + SR_CONF_MODBUSADDR, }; static const uint32_t drvopts[] = { diff --git a/src/hardware/motech-lps-30x/api.c b/src/hardware/motech-lps-30x/api.c index 45677b42..a465c329 100644 --- a/src/hardware/motech-lps-30x/api.c +++ b/src/hardware/motech-lps-30x/api.c @@ -42,18 +42,18 @@ SR_PRIV int lps_query_status(struct sr_dev_inst *sdi); #define VENDOR_MOTECH "Motech" -/** Driver capabilities generic. */ -static const uint32_t drvopts[] = { - /* Device class */ - SR_CONF_POWER_SUPPLY, -}; - /** Driver scanning options. */ static const uint32_t scanopts[] = { SR_CONF_CONN, SR_CONF_SERIALCOMM, }; +/** Driver capabilities generic. */ +static const uint32_t drvopts[] = { + /* Device class */ + SR_CONF_POWER_SUPPLY, +}; + /** Hardware capabilities generic. */ static const uint32_t devopts[] = { /* Device class */ diff --git a/src/hardware/openbench-logic-sniffer/api.c b/src/hardware/openbench-logic-sniffer/api.c index ec22fd45..a3fb54e8 100644 --- a/src/hardware/openbench-logic-sniffer/api.c +++ b/src/hardware/openbench-logic-sniffer/api.c @@ -22,15 +22,15 @@ #define SERIALCOMM "115200/8n1" -static const uint32_t drvopts[] = { - SR_CONF_LOGIC_ANALYZER, -}; - static const uint32_t scanopts[] = { SR_CONF_CONN, SR_CONF_SERIALCOMM, }; +static const uint32_t drvopts[] = { + SR_CONF_LOGIC_ANALYZER, +}; + static const uint32_t devopts[] = { 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, diff --git a/src/hardware/saleae-logic-pro/api.c b/src/hardware/saleae-logic-pro/api.c index 9c257d2c..269ca5e9 100644 --- a/src/hardware/saleae-logic-pro/api.c +++ b/src/hardware/saleae-logic-pro/api.c @@ -28,14 +28,14 @@ SR_PRIV struct sr_dev_driver saleae_logic_pro_driver_info; -static const uint32_t drvopts[] = { - SR_CONF_LOGIC_ANALYZER, -}; - static const uint32_t scanopts[] = { SR_CONF_CONN, }; +static const uint32_t drvopts[] = { + SR_CONF_LOGIC_ANALYZER, +}; + static const uint32_t devopts[] = { SR_CONF_CONTINUOUS, SR_CONF_CONN | SR_CONF_GET, diff --git a/src/hardware/victor-dmm/api.c b/src/hardware/victor-dmm/api.c index 5ed70c80..d5d7e4a7 100644 --- a/src/hardware/victor-dmm/api.c +++ b/src/hardware/victor-dmm/api.c @@ -32,14 +32,14 @@ #define VICTOR_INTERFACE 0 #define VICTOR_ENDPOINT (LIBUSB_ENDPOINT_IN | 1) -static const uint32_t drvopts[] = { - SR_CONF_MULTIMETER, -}; - static const uint32_t scanopts[] = { SR_CONF_CONN, }; +static const uint32_t drvopts[] = { + SR_CONF_MULTIMETER, +}; + static const uint32_t devopts[] = { SR_CONF_CONTINUOUS, SR_CONF_LIMIT_SAMPLES | SR_CONF_SET,