]> sigrok.org Git - libsigrok.git/commitdiff
drivers: Consistently name per-cg options 'devopts_cg_*'.
authorUwe Hermann <redacted>
Wed, 19 Jul 2017 20:40:47 +0000 (22:40 +0200)
committerUwe Hermann <redacted>
Fri, 21 Jul 2017 13:45:03 +0000 (15:45 +0200)
src/hardware/hameg-hmo/api.c
src/hardware/hameg-hmo/protocol.c
src/hardware/hameg-hmo/protocol.h
src/hardware/hung-chang-dso-2100/api.c
src/hardware/lecroy-xstream/api.c
src/hardware/motech-lps-30x/api.c
src/hardware/rigol-ds/api.c
src/hardware/yokogawa-dlm/api.c

index 5f192a842234d681aee4159a76a7fa2592f64c0e..c3809a92afcbc9e6caf7b96e6072ffcc1eb3d7ef 100644 (file)
@@ -492,7 +492,7 @@ static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *
                                        drvopts, ARRAY_SIZE(drvopts), sizeof(uint32_t));
                } else if (cg_type == CG_ANALOG) {
                        *data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32,
-                               model->analog_devopts, model->num_analog_devopts,
+                               model->devopts_cg_analog, model->num_devopts_cg_analog,
                                sizeof(uint32_t));
                } else {
                        *data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32,
index 437b5f37dfef445d2502379132a2e7590f3c9dc8..2fa50efb375d4ad7bcd57c7a363a8b1dff2aa544 100644 (file)
@@ -68,7 +68,7 @@ static const uint32_t devopts[] = {
        SR_CONF_TRIGGER_SLOPE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
 };
 
-static const uint32_t analog_devopts[] = {
+static const uint32_t devopts_cg_analog[] = {
        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,
@@ -259,8 +259,8 @@ static const struct scope_config scope_models[] = {
                .devopts = &devopts,
                .num_devopts = ARRAY_SIZE(devopts),
 
-               .analog_devopts = &analog_devopts,
-               .num_analog_devopts = ARRAY_SIZE(analog_devopts),
+               .devopts_cg_analog = &devopts_cg_analog,
+               .num_devopts_cg_analog = ARRAY_SIZE(devopts_cg_analog),
 
                .coupling_options = &coupling_options,
                .trigger_sources = &compact2_trigger_sources,
@@ -289,8 +289,8 @@ static const struct scope_config scope_models[] = {
                .devopts = &devopts,
                .num_devopts = ARRAY_SIZE(devopts),
 
-               .analog_devopts = &analog_devopts,
-               .num_analog_devopts = ARRAY_SIZE(analog_devopts),
+               .devopts_cg_analog = &devopts_cg_analog,
+               .num_devopts_cg_analog = ARRAY_SIZE(devopts_cg_analog),
 
                .coupling_options = &coupling_options,
                .trigger_sources = &compact4_trigger_sources,
@@ -319,8 +319,8 @@ static const struct scope_config scope_models[] = {
                .devopts = &devopts,
                .num_devopts = ARRAY_SIZE(devopts),
 
-               .analog_devopts = &analog_devopts,
-               .num_analog_devopts = ARRAY_SIZE(analog_devopts),
+               .devopts_cg_analog = &devopts_cg_analog,
+               .num_devopts_cg_analog = ARRAY_SIZE(devopts_cg_analog),
 
                .coupling_options = &coupling_options,
                .trigger_sources = &compact4_dig16_trigger_sources,
index 74ef3da9a0afb137f613089f692092a846f360ff..037b2426fcda6829e92d552c2df06e3865dbbdf9 100644 (file)
@@ -46,8 +46,8 @@ struct scope_config {
        const uint32_t (*devopts)[];
        const uint8_t num_devopts;
 
-       const uint32_t (*analog_devopts)[];
-       const uint8_t num_analog_devopts;
+       const uint32_t (*devopts_cg_analog)[];
+       const uint8_t num_devopts_cg_analog;
 
        const char *(*coupling_options)[];
        const uint8_t num_coupling_options;
index 655b11c871d9552da27269943ad481c34e3072d2..c98cdbbeab5ed051996dcd3eec28ab5b763cea4b 100644 (file)
@@ -39,7 +39,7 @@ static const uint32_t devopts[] = {
        SR_CONF_BUFFERSIZE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
 };
 
-static const uint32_t cgopts[] = {
+static const uint32_t devopts_cg[] = {
        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_PROBE_FACTOR | SR_CONF_GET | SR_CONF_SET,
@@ -596,7 +596,7 @@ static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *
                if (!cg)
                        return STD_CONFIG_LIST(key, data, sdi, cg, NULL, drvopts, devopts);
                *data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32,
-                               cgopts, ARRAY_SIZE(cgopts), sizeof(uint32_t));
+                               devopts_cg, ARRAY_SIZE(devopts_cg), sizeof(uint32_t));
                break;
        case SR_CONF_SAMPLERATE:
                g_variant_builder_init(&gvb, G_VARIANT_TYPE("a{sv}"));
index 140308dc62f67dfc23be4a3936fad7cae2f82195..c00a9e7ec3704a97552c206874559b1dafb883f5 100644 (file)
@@ -46,7 +46,7 @@ static const uint32_t devopts[] = {
        SR_CONF_TRIGGER_SLOPE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
 };
 
-static const uint32_t analog_devopts[] = {
+static const uint32_t devopts_cg_analog[] = {
        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,
@@ -401,7 +401,7 @@ static int config_list(uint32_t key, GVariant **data,
                if (!cg)
                        return STD_CONFIG_LIST(key, data, sdi, cg, NULL, drvopts, devopts);
                *data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32,
-                       analog_devopts, ARRAY_SIZE(analog_devopts),
+                       devopts_cg_analog, ARRAY_SIZE(devopts_cg_analog),
                        sizeof(uint32_t));
                break;
        case SR_CONF_COUPLING:
index 6164e4ace3cc3bcf2f3d136e0a459ed0128d9565..fb1c177dc5c41e2c0146d9a863e975cf745e6b46 100644 (file)
@@ -51,7 +51,7 @@ static const uint32_t devopts[] = {
 };
 
 /** Hardware capabilities channel 1, 2. */
-static const uint32_t devopts_ch12[] = {
+static const uint32_t devopts_cg_ch12[] = {
        SR_CONF_VOLTAGE | SR_CONF_GET,
        SR_CONF_VOLTAGE_TARGET | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
        SR_CONF_CURRENT | SR_CONF_GET,
@@ -60,7 +60,7 @@ static const uint32_t devopts_ch12[] = {
 };
 
 /** Hardware capabilities channel 3 (LPS-304/305 only). */
-static const uint32_t devopts_ch3[] = {
+static const uint32_t devopts_cg_ch3[] = {
        SR_CONF_VOLTAGE | SR_CONF_GET,
        SR_CONF_ENABLED | SR_CONF_GET | SR_CONF_SET,
 };
@@ -685,10 +685,10 @@ static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *
        case SR_CONF_DEVICE_OPTIONS:
                if ((ch_idx == 0) || (ch_idx == 1)) /* CH1, CH2 */
                        *data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32,
-                               devopts_ch12, ARRAY_SIZE(devopts_ch12), sizeof(uint32_t));
+                               devopts_cg_ch12, ARRAY_SIZE(devopts_cg_ch12), sizeof(uint32_t));
                else /* Must be CH3 */
                        *data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32,
-                               devopts_ch3, ARRAY_SIZE(devopts_ch3), sizeof(uint32_t));
+                               devopts_cg_ch3, ARRAY_SIZE(devopts_cg_ch3), sizeof(uint32_t));
                break;
        case SR_CONF_VOLTAGE_TARGET:
                g_variant_builder_init(&gvb, G_VARIANT_TYPE_ARRAY);
index bfb6cd415eb5f8671eebe7808749aeb3f1131b60..384966e799086fe021321bbfe5b7e76fa62aa5b9 100644 (file)
@@ -53,7 +53,7 @@ static const uint32_t devopts[] = {
        SR_CONF_DATA_SOURCE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
 };
 
-static const uint32_t analog_devopts[] = {
+static const uint32_t devopts_cg_analog[] = {
        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,
@@ -860,7 +860,7 @@ static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *
                        for (i = 0; i < devc->model->analog_channels; i++) {
                                if (cg == devc->analog_groups[i]) {
                                        *data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32,
-                                               analog_devopts, ARRAY_SIZE(analog_devopts), sizeof(uint32_t));
+                                               devopts_cg_analog, ARRAY_SIZE(devopts_cg_analog), sizeof(uint32_t));
                                        return SR_OK;
                                }
                        }
index e1702956b5e044096824758d9abcbbfc019a783f..bc44675ec873861c6212c1c98edf340566a44ca4 100644 (file)
@@ -47,13 +47,13 @@ static const uint32_t devopts[] = {
        SR_CONF_TRIGGER_SLOPE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
 };
 
-static const uint32_t analog_devopts[] = {
+static const uint32_t devopts_cg_analog[] = {
        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,
 };
 
-static const uint32_t digital_devopts[] = {
+static const uint32_t devopts_cg_digital[] = {
 };
 
 enum {
@@ -509,10 +509,10 @@ static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *
        case SR_CONF_DEVICE_OPTIONS:
                if (cg_type == CG_ANALOG) {
                        *data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32,
-                               analog_devopts, ARRAY_SIZE(analog_devopts), sizeof(uint32_t));
+                               devopts_cg_analog, ARRAY_SIZE(devopts_cg_analog), sizeof(uint32_t));
                } else if (cg_type == CG_DIGITAL) {
                        *data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32,
-                               digital_devopts, ARRAY_SIZE(digital_devopts), sizeof(uint32_t));
+                               devopts_cg_digital, ARRAY_SIZE(devopts_cg_digital), sizeof(uint32_t));
                } else {
                        *data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32,
                                NULL, 0, sizeof(uint32_t));