X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Fcem-dt-885x%2Fapi.c;h=b4bfe861f58f2f97d5832358e92bbf8e4562db42;hb=a0e0bb4149081eda06714f1158639f2dadcfa9d8;hp=9aed547362c59bd5933c45e56cff2e24a7fb43f8;hpb=155b680da482cea2381becb73c51cfb838bff31e;p=libsigrok.git diff --git a/src/hardware/cem-dt-885x/api.c b/src/hardware/cem-dt-885x/api.c index 9aed5473..b4bfe861 100644 --- a/src/hardware/cem-dt-885x/api.c +++ b/src/hardware/cem-dt-885x/api.c @@ -24,11 +24,11 @@ /* 23ms is the longest interval between tokens. */ #define MAX_SCAN_TIME 25 * 1000 -static const int32_t hwopts[] = { +static const uint32_t scanopts[] = { SR_CONF_CONN, }; -static const int32_t hwcaps[] = { +static const uint32_t devopts[] = { SR_CONF_SOUNDLEVELMETER, SR_CONF_LIMIT_SAMPLES, SR_CONF_CONTINUOUS, @@ -165,7 +165,7 @@ static int cleanup(void) return std_dev_clear(di, NULL); } -static int config_get(int key, 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; @@ -237,7 +237,7 @@ static int config_get(int key, GVariant **data, const struct sr_dev_inst *sdi, return ret; } -static int config_set(int key, 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; @@ -327,7 +327,7 @@ static int config_set(int key, GVariant *data, const struct sr_dev_inst *sdi, return ret; } -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) { GVariant *tuple, *range[2]; @@ -341,12 +341,12 @@ static int config_list(int key, GVariant **data, const struct sr_dev_inst *sdi, ret = SR_OK; switch (key) { case SR_CONF_SCAN_OPTIONS: - *data = g_variant_new_fixed_array(G_VARIANT_TYPE_INT32, - hwopts, ARRAY_SIZE(hwopts), sizeof(int32_t)); + *data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32, + scanopts, ARRAY_SIZE(scanopts), sizeof(uint32_t)); break; 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_SPL_WEIGHT_FREQ: *data = g_variant_new_strv(weight_freq, ARRAY_SIZE(weight_freq));