#define TRIGGER_TYPES "rf10"
#define NUM_PROBES 16
-static GSList *dev_insts = NULL;
+SR_PRIV struct sr_dev_driver asix_sigma_driver_info;
+static struct sr_dev_driver *adi = &asix_sigma_driver_info;
static const uint64_t supported_samplerates[] = {
SR_KHZ(200),
sdi->priv = ctx;
- dev_insts = g_slist_append(dev_insts, sdi);
+ adi->instances = g_slist_append(adi->instances, sdi);
/* We will open the device again when we need it. */
ftdi_list_free(&devlist);
struct context *ctx;
int ret;
- if (!(sdi = sr_dev_inst_get(dev_insts, dev_index)))
+ if (!(sdi = sr_dev_inst_get(adi->instances, dev_index)))
return SR_ERR;
ctx = sdi->priv;
struct sr_dev_inst *sdi;
struct context *ctx;
- if (!(sdi = sr_dev_inst_get(dev_insts, dev_index))) {
+ if (!(sdi = sr_dev_inst_get(adi->instances, dev_index))) {
sr_err("sigma: %s: sdi was NULL", __func__);
return SR_ERR_BUG;
}
int ret = SR_OK;
/* Properly close all devices. */
- for (l = dev_insts; l; l = l->next) {
+ for (l = adi->instances; l; l = l->next) {
if (!(sdi = l->data)) {
/* Log error, but continue cleaning up the rest. */
sr_err("sigma: %s: sdi was NULL, continuing", __func__);
}
sr_dev_inst_free(sdi);
}
- g_slist_free(dev_insts);
- dev_insts = NULL;
+ g_slist_free(adi->instances);
+ adi->instances = NULL;
return ret;
}
struct context *ctx;
const void *info = NULL;
- if (!(sdi = sr_dev_inst_get(dev_insts, dev_index))) {
+ if (!(sdi = sr_dev_inst_get(adi->instances, dev_index))) {
sr_err("sigma: %s: sdi was NULL", __func__);
return NULL;
}
{
struct sr_dev_inst *sdi;
- sdi = sr_dev_inst_get(dev_insts, dev_index);
+ sdi = sr_dev_inst_get(adi->instances, dev_index);
if (sdi)
return sdi->status;
else
struct context *ctx;
int ret;
- if (!(sdi = sr_dev_inst_get(dev_insts, dev_index)))
+ if (!(sdi = sr_dev_inst_get(adi->instances, dev_index)))
return SR_ERR;
ctx = sdi->priv;
struct triggerinout triggerinout_conf;
struct triggerlut lut;
- if (!(sdi = sr_dev_inst_get(dev_insts, dev_index)))
+ if (!(sdi = sr_dev_inst_get(adi->instances, dev_index)))
return SR_ERR;
ctx = sdi->priv;
/* Avoid compiler warnings. */
(void)cb_data;
- if (!(sdi = sr_dev_inst_get(dev_insts, dev_index))) {
+ if (!(sdi = sr_dev_inst_get(adi->instances, dev_index))) {
sr_err("sigma: %s: sdi was NULL", __func__);
return SR_ERR_BUG;
}
.dev_config_set = hw_dev_config_set,
.dev_acquisition_start = hw_dev_acquisition_start,
.dev_acquisition_stop = hw_dev_acquisition_stop,
+ .instances = NULL,
};