X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Fchronovu-la%2Fapi.c;h=f4b198946c661142c1c46f4d3012c6e788b10f88;hb=584560f142e1b17b9f4ef9069bd3724f2f77e750;hp=5a8a3d36c959a1c4b06c7411a07e01508d6907fe;hpb=155b680da482cea2381becb73c51cfb838bff31e;p=libsigrok.git diff --git a/src/hardware/chronovu-la/api.c b/src/hardware/chronovu-la/api.c index 5a8a3d36..f4b19894 100644 --- a/src/hardware/chronovu-la/api.c +++ b/src/hardware/chronovu-la/api.c @@ -23,7 +23,7 @@ SR_PRIV struct sr_dev_driver chronovu_la_driver_info; static struct sr_dev_driver *di = &chronovu_la_driver_info; -static const int32_t hwcaps[] = { +static const uint32_t hwcaps[] = { SR_CONF_LOGIC_ANALYZER, SR_CONF_SAMPLERATE, SR_CONF_TRIGGER_MATCH, @@ -285,14 +285,14 @@ static int cleanup(void) return dev_clear(); } -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)) return SR_ERR_BUG; @@ -305,7 +305,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; @@ -318,7 +318,7 @@ static int config_set(int id, GVariant *data, const struct sr_dev_inst *sdi, if (!(devc = sdi->priv)) return SR_ERR_BUG; - switch (id) { + switch (key) { case SR_CONF_SAMPLERATE: if (cv_set_samplerate(sdi, g_variant_get_uint64(data)) < 0) return SR_ERR; @@ -340,7 +340,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) { GVariant *gvar, *grange[2]; @@ -351,8 +351,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: if (!sdi || !sdi->priv || !(devc = sdi->priv)) @@ -379,7 +379,7 @@ static int config_list(int key, GVariant **data, const struct sr_dev_inst *sdi, case SR_CONF_TRIGGER_MATCH: if (!sdi || !sdi->priv || !(devc = sdi->priv) || !devc->prof) return SR_ERR_BUG; - *data = g_variant_new_fixed_array(G_VARIANT_TYPE_INT32, + *data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32, trigger_matches, devc->prof->num_trigger_matches, sizeof(int32_t)); break;