X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Fzeroplus-logic-cube%2Fapi.c;h=3a0e4d8c714ffa7dacfc4252233d9bd5a6950d79;hb=584560f142e1b17b9f4ef9069bd3724f2f77e750;hp=a49f07481c0469a1adcede4fa25cda98c227a0c0;hpb=a4e47454580b83972f052b5ace8e687d54d9425c;p=libsigrok.git diff --git a/src/hardware/zeroplus-logic-cube/api.c b/src/hardware/zeroplus-logic-cube/api.c index a49f0748..3a0e4d8c 100644 --- a/src/hardware/zeroplus-logic-cube/api.c +++ b/src/hardware/zeroplus-logic-cube/api.c @@ -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 hwcaps[] = { 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, + hwcaps, ARRAY_SIZE(hwcaps), sizeof(uint32_t)); break; case SR_CONF_SAMPLERATE: devc = sdi->priv;