if (serial_open(serial, SERIAL_RDWR) != SR_OK)
return NULL;
- serial_flush(serial);
gpd_send_cmd(serial, "*IDN?\n");
if (gpd_receive_reply(serial, reply, sizeof(reply)) != SR_OK) {
sr_err("Device did not reply.");
static int config_get(uint32_t key, GVariant **data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
- int ret, channel;
+ int channel;
const struct dev_context *devc;
const struct sr_channel *ch;
} else {
ch = cg->channels->data;
channel = ch->index;
- ret = SR_OK;
switch (key) {
case SR_CONF_VOLTAGE:
*data = g_variant_new_double(
}
}
- return ret;
+ return SR_OK;
}
static int config_set(uint32_t key, GVariant *data,
return SR_OK;
}
-SR_PRIV const struct sr_dev_driver gwinstek_gpd_driver_info = {
+static struct sr_dev_driver gwinstek_gpd_driver_info = {
.name = "gwinstek-gpd",
.longname = "GW Instek GPD",
.api_version = 1,