]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/zeroplus-logic-cube/api.c
Consistently use 'devopts' variable across all drivers.
[libsigrok.git] / src / hardware / zeroplus-logic-cube / api.c
index a49f07481c0469a1adcede4fa25cda98c227a0c0..3e0dbef040e4018cc36bea25fe7c1d0cadbb413e 100644 (file)
@@ -52,7 +52,7 @@ static const struct zp_model zeroplus_models[] = {
        { 0, 0, 0, 0, 0, 0 }
 };
 
-static const int32_t hwcaps[] = {
+static const uint32_t devopts[] = {
        SR_CONF_LOGIC_ANALYZER,
        SR_CONF_SAMPLERATE,
        SR_CONF_TRIGGER_MATCH,
@@ -382,14 +382,14 @@ static int cleanup(void)
        return std_dev_clear(di, NULL);
 }
 
-static int config_get(int id, GVariant **data, const struct sr_dev_inst *sdi,
+static int config_get(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi,
                const struct sr_channel_group *cg)
 {
        struct dev_context *devc;
 
        (void)cg;
 
-       switch (id) {
+       switch (key) {
        case SR_CONF_SAMPLERATE:
                if (sdi) {
                        devc = sdi->priv;
@@ -423,7 +423,7 @@ static int config_get(int id, GVariant **data, const struct sr_dev_inst *sdi,
        return SR_OK;
 }
 
-static int config_set(int id, GVariant *data, const struct sr_dev_inst *sdi,
+static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sdi,
                const struct sr_channel_group *cg)
 {
        struct dev_context *devc;
@@ -439,7 +439,7 @@ static int config_set(int id, GVariant *data, const struct sr_dev_inst *sdi,
                return SR_ERR_ARG;
        }
 
-       switch (id) {
+       switch (key) {
        case SR_CONF_SAMPLERATE:
                return zp_set_samplerate(devc, g_variant_get_uint64(data));
        case SR_CONF_LIMIT_SAMPLES:
@@ -456,7 +456,7 @@ static int config_set(int id, GVariant *data, const struct sr_dev_inst *sdi,
        return SR_OK;
 }
 
-static int config_list(int key, GVariant **data, const struct sr_dev_inst *sdi,
+static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi,
                const struct sr_channel_group *cg)
 {
        struct dev_context *devc;
@@ -469,8 +469,8 @@ static int config_list(int key, GVariant **data, const struct sr_dev_inst *sdi,
 
        switch (key) {
        case SR_CONF_DEVICE_OPTIONS:
-               *data = g_variant_new_fixed_array(G_VARIANT_TYPE_INT32,
-                               hwcaps, ARRAY_SIZE(hwcaps), sizeof(int32_t));
+               *data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32,
+                               devopts, ARRAY_SIZE(devopts), sizeof(uint32_t));
                break;
        case SR_CONF_SAMPLERATE:
                devc = sdi->priv;