X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Ftesto%2Fapi.c;h=8970a9f9b5f34efaefa61c49620ab62c8e6adc53;hb=5827f61b641cfd326a9cf2ea534eb4f9481a8187;hp=2b4c9634c09a75b83019e53a95b1e144bb83b941;hpb=155b680da482cea2381becb73c51cfb838bff31e;p=libsigrok.git diff --git a/src/hardware/testo/api.c b/src/hardware/testo/api.c index 2b4c9634..8970a9f9 100644 --- a/src/hardware/testo/api.c +++ b/src/hardware/testo/api.c @@ -26,15 +26,15 @@ SR_PRIV struct sr_dev_driver testo_driver_info; static struct sr_dev_driver *di = &testo_driver_info; static int dev_acquisition_stop(struct sr_dev_inst *sdi, void *cb_data); -static const int32_t scanopts[] = { +static const uint32_t scanopts[] = { SR_CONF_CONN, }; -static const int32_t devopts[] = { +static const uint32_t devopts[] = { SR_CONF_MULTIMETER, - SR_CONF_LIMIT_MSEC, - SR_CONF_LIMIT_SAMPLES, SR_CONF_CONTINUOUS, + SR_CONF_LIMIT_SAMPLES | SR_CONF_SET, + SR_CONF_LIMIT_MSEC | SR_CONF_SET, }; unsigned char TESTO_x35_REQUEST[] = { 0x12, 0, 0, 0, 1, 1, 0x55, 0xd1, 0xb7 }; @@ -241,7 +241,7 @@ static int cleanup(void) return ret; } -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 sr_usb_dev_inst *usb; @@ -264,7 +264,7 @@ static int config_get(int key, GVariant **data, const struct sr_dev_inst *sdi, return SR_OK; } -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; @@ -303,7 +303,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) { (void)sdi; @@ -311,12 +311,12 @@ static int config_list(int key, GVariant **data, const struct sr_dev_inst *sdi, switch (key) { case SR_CONF_SCAN_OPTIONS: - *data = g_variant_new_fixed_array(G_VARIANT_TYPE_INT32, - scanopts, ARRAY_SIZE(scanopts), 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, - devopts, ARRAY_SIZE(devopts), sizeof(int32_t)); + *data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32, + devopts, ARRAY_SIZE(devopts), sizeof(uint32_t)); break; default: return SR_ERR_NA;