X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=hardware%2Ffx2lafw%2Ffx2lafw.c;h=9897fb9eab91cd7e0173d83b9b7265a9c4d00d0b;hb=1b79df2f57012926927983a8e2829004f0eee4fa;hp=38f3d14d49656e9388cff9d28e668f1dda493277;hpb=b7f578bef53ff0e645ca0cae3f9781f577b7367a;p=libsigrok.git diff --git a/hardware/fx2lafw/fx2lafw.c b/hardware/fx2lafw/fx2lafw.c index 38f3d14d..9897fb9e 100644 --- a/hardware/fx2lafw/fx2lafw.c +++ b/hardware/fx2lafw/fx2lafw.c @@ -125,7 +125,7 @@ static struct sr_samplerates samplerates = { static GSList *dev_insts = NULL; static libusb_context *usb_context = NULL; -static int hw_dev_config_set(int dev_index, int hwcap, void *value); +static int hw_dev_config_set(int dev_index, int hwcap, const void *value); static int hw_dev_acquisition_stop(int dev_index, void *cb_data); /** @@ -589,7 +589,7 @@ static const int *hw_hwcap_get_all(void) return hwcaps; } -static int hw_dev_config_set(int dev_index, int hwcap, void *value) +static int hw_dev_config_set(int dev_index, int hwcap, const void *value) { struct sr_dev_inst *sdi; struct context *ctx; @@ -600,12 +600,12 @@ static int hw_dev_config_set(int dev_index, int hwcap, void *value) ctx = sdi->priv; if (hwcap == SR_HWCAP_SAMPLERATE) { - ctx->cur_samplerate = *(uint64_t *)value; + ctx->cur_samplerate = *(const uint64_t *)value; ret = SR_OK; } else if (hwcap == SR_HWCAP_PROBECONFIG) { ret = configure_probes(ctx, (GSList *) value); } else if (hwcap == SR_HWCAP_LIMIT_SAMPLES) { - ctx->limit_samples = *(uint64_t *)value; + ctx->limit_samples = *(const uint64_t *)value; ret = SR_OK; } else { ret = SR_ERR;