X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Fscpi-pps%2Fapi.c;h=e68836b7acf34438e1a26e3e8e6a8dcbda3c5a34;hb=ba464a121766fda8f8a1799b1b140b225c9774ee;hp=33d94286baf87a4c3ca02f730f4ce2c32cbbca87;hpb=4f840ce965b1c30c5ab75afecc56193cbaf5c1b3;p=libsigrok.git diff --git a/src/hardware/scpi-pps/api.c b/src/hardware/scpi-pps/api.c index 33d94286..e68836b7 100644 --- a/src/hardware/scpi-pps/api.c +++ b/src/hardware/scpi-pps/api.c @@ -18,6 +18,7 @@ */ #include +#include #include "protocol.h" SR_PRIV struct sr_dev_driver scpi_pps_driver_info; @@ -33,7 +34,7 @@ static const uint32_t drvopts[] = { SR_CONF_POWER_SUPPLY, }; -static struct pps_channel_instance pci[] = { +static const struct pps_channel_instance pci[] = { { SR_MQ_VOLTAGE, SCPI_CMD_GET_MEAS_VOLTAGE, "V" }, { SR_MQ_CURRENT, SCPI_CMD_GET_MEAS_CURRENT, "I" }, { SR_MQ_POWER, SCPI_CMD_GET_MEAS_POWER, "P" }, @@ -104,9 +105,9 @@ static struct sr_dev_inst *probe_device(struct sr_scpi_dev_inst *scpi) if (device->num_channels) { /* Static channels and groups. */ - channels = device->channels; + channels = (struct channel_spec *)device->channels; num_channels = device->num_channels; - channel_groups = device->channel_groups; + channel_groups = (struct channel_group_spec *)device->channel_groups; num_channel_groups = device->num_channel_groups; } else { /* Channels and groups need to be probed. */ @@ -419,7 +420,7 @@ static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst * { struct dev_context *devc; struct sr_channel *ch; - struct channel_spec *ch_spec; + const struct channel_spec *ch_spec; GVariant *gvar; GVariantBuilder gvb; int ret, i;