};
static const uint32_t devopts[] = {
+ SR_CONF_CONN | SR_CONF_GET,
SR_CONF_LIMIT_SAMPLES | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
SR_CONF_SAMPLERATE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
SR_CONF_TRIGGER_MATCH | SR_CONF_LIST,
DEFAULT_SAMPLERATE);
sdi->inst_type = SR_INST_SERIAL;
sdi->conn = serial;
+ sdi->connection_id = g_strdup(serial->port);
serial_close(serial);
devc = sdi->priv;
switch (key) {
+ case SR_CONF_CONN:
+ if (!sdi->conn || !sdi->connection_id)
+ return SR_ERR_NA;
+ *data = g_variant_new_string(sdi->connection_id);
+ break;
case SR_CONF_SAMPLERATE:
*data = g_variant_new_uint64(devc->cur_samplerate);
break;