NULL,
};
-static GSList *device_instances = NULL;
+static GSList *dev_insts = NULL;
struct alsa {
uint64_t cur_rate;
static int hw_init(const char *deviceinfo)
{
- struct sr_device_instance *sdi;
+ struct sr_dev_inst *sdi;
struct alsa *alsa;
/* Avoid compiler warnings. */
sdi->priv = alsa;
- device_instances = g_slist_append(device_instances, sdi);
+ dev_insts = g_slist_append(dev_insts, sdi);
return 1;
free_alsa:
static int hw_opendev(int device_index)
{
- struct sr_device_instance *sdi;
+ struct sr_dev_inst *sdi;
struct alsa *alsa;
int err;
- if (!(sdi = sr_dev_inst_get(device_instances, device_index)))
+ if (!(sdi = sr_dev_inst_get(dev_insts, device_index)))
return SR_ERR;
alsa = sdi->priv;
static int hw_closedev(int device_index)
{
- struct sr_device_instance *sdi;
+ struct sr_dev_inst *sdi;
struct alsa *alsa;
- if (!(sdi = sr_dev_inst_get(device_instances, device_index))) {
+ if (!(sdi = sr_dev_inst_get(dev_insts, device_index))) {
sr_err("alsa: %s: sdi was NULL", __func__);
return SR_ERR; /* TODO: SR_ERR_ARG? */
}
static int hw_cleanup(void)
{
- struct sr_device_instance *sdi;
+ struct sr_dev_inst *sdi;
- if (!(sdi = sr_dev_inst_get(device_instances, 0))) {
+ if (!(sdi = sr_dev_inst_get(dev_insts, 0))) {
sr_err("alsa: %s: sdi was NULL", __func__);
return SR_ERR_BUG;
}
static void *hw_get_device_info(int device_index, int device_info_id)
{
- struct sr_device_instance *sdi;
+ struct sr_dev_inst *sdi;
struct alsa *alsa;
void *info = NULL;
- if (!(sdi = sr_dev_inst_get(device_instances, device_index)))
+ if (!(sdi = sr_dev_inst_get(dev_insts, device_index)))
return NULL;
alsa = sdi->priv;
static int hw_set_configuration(int device_index, int capability, void *value)
{
- struct sr_device_instance *sdi;
+ struct sr_dev_inst *sdi;
struct alsa *alsa;
- if (!(sdi = sr_dev_inst_get(device_instances, device_index)))
+ if (!(sdi = sr_dev_inst_get(dev_insts, device_index)))
return SR_ERR;
alsa = sdi->priv;
static int receive_data(int fd, int revents, void *user_data)
{
- struct sr_device_instance *sdi = user_data;
+ struct sr_dev_inst *sdi = user_data;
struct alsa *alsa = sdi->priv;
struct sr_datafeed_packet packet;
struct sr_analog_sample *sample;
static int hw_start_acquisition(int device_index, gpointer session_device_id)
{
- struct sr_device_instance *sdi;
+ struct sr_dev_inst *sdi;
struct alsa *alsa;
struct sr_datafeed_packet packet;
struct sr_datafeed_header header;
int count;
int err;
- if (!(sdi = sr_dev_inst_get(device_instances, device_index)))
+ if (!(sdi = sr_dev_inst_get(dev_insts, device_index)))
return SR_ERR;
alsa = sdi->priv;
#define TRIGGER_TYPES "rf10"
#define NUM_PROBES 16
-static GSList *device_instances = NULL;
+static GSList *dev_insts = NULL;
static uint64_t supported_samplerates[] = {
SR_KHZ(200),
static int hw_init(const char *deviceinfo)
{
- struct sr_device_instance *sdi;
+ struct sr_dev_inst *sdi;
struct sigma *sigma;
/* Avoid compiler warnings. */
sigma->use_triggers = 0;
/* Register SIGMA device. */
- sdi = sr_dev_inst_new(0, SR_ST_INITIALIZING,
- USB_VENDOR_NAME, USB_MODEL_NAME, USB_MODEL_VERSION);
- if (!sdi)
+ if (!(sdi = sr_dev_inst_new(0, SR_ST_INITIALIZING, USB_VENDOR_NAME,
+ USB_MODEL_NAME, USB_MODEL_VERSION))) {
+ sr_err("sigma: %s: sdi was NULL", __func__);
goto free;
+ }
sdi->priv = sigma;
- device_instances = g_slist_append(device_instances, sdi);
+ dev_insts = g_slist_append(dev_insts, sdi);
/* We will open the device again when we need it. */
ftdi_usb_close(&sigma->ftdic);
static int hw_opendev(int device_index)
{
- struct sr_device_instance *sdi;
+ struct sr_dev_inst *sdi;
struct sigma *sigma;
int ret;
- if (!(sdi = sr_dev_inst_get(device_instances, device_index)))
+ if (!(sdi = sr_dev_inst_get(dev_insts, device_index)))
return SR_ERR;
sigma = sdi->priv;
return SR_OK;
}
-static int set_samplerate(struct sr_device_instance *sdi,
- uint64_t samplerate)
+static int set_samplerate(struct sr_dev_inst *sdi, uint64_t samplerate)
{
int i, ret;
struct sigma *sigma = sdi->priv;
* The Sigma supports complex triggers using boolean expressions, but this
* has not been implemented yet.
*/
-static int configure_probes(struct sr_device_instance *sdi, GSList *probes)
+static int configure_probes(struct sr_dev_inst *sdi, GSList *probes)
{
struct sigma *sigma = sdi->priv;
struct sr_probe *probe;
static int hw_closedev(int device_index)
{
- struct sr_device_instance *sdi;
+ struct sr_dev_inst *sdi;
struct sigma *sigma;
- if (!(sdi = sr_dev_inst_get(device_instances, device_index))) {
+ if (!(sdi = sr_dev_inst_get(dev_insts, device_index))) {
sr_err("sigma: %s: sdi was NULL", __func__);
return SR_ERR; /* TODO: SR_ERR_ARG? */
}
static int hw_cleanup(void)
{
GSList *l;
- struct sr_device_instance *sdi;
+ struct sr_dev_inst *sdi;
int ret = SR_OK;
/* Properly close all devices. */
- for (l = device_instances; l; l = l->next) {
+ for (l = dev_insts; 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(device_instances);
- device_instances = NULL;
+ g_slist_free(dev_insts);
+ dev_insts = NULL;
return ret;
}
static void *hw_get_device_info(int device_index, int device_info_id)
{
- struct sr_device_instance *sdi;
+ struct sr_dev_inst *sdi;
struct sigma *sigma;
void *info = NULL;
- if (!(sdi = sr_dev_inst_get(device_instances, device_index))) {
+ if (!(sdi = sr_dev_inst_get(dev_insts, device_index))) {
sr_err("sigma: %s: sdi was NULL", __func__);
return NULL;
}
static int hw_get_status(int device_index)
{
- struct sr_device_instance *sdi;
+ struct sr_dev_inst *sdi;
- sdi = sr_dev_inst_get(device_instances, device_index);
+ sdi = sr_dev_inst_get(dev_insts, device_index);
if (sdi)
return sdi->status;
else
static int hw_set_configuration(int device_index, int capability, void *value)
{
- struct sr_device_instance *sdi;
+ struct sr_dev_inst *sdi;
struct sigma *sigma;
int ret;
- if (!(sdi = sr_dev_inst_get(device_instances, device_index)))
+ if (!(sdi = sr_dev_inst_get(dev_insts, device_index)))
return SR_ERR;
sigma = sdi->priv;
uint16_t *lastsample, int triggerpos,
uint16_t limit_chunk, void *session_data)
{
- struct sr_device_instance *sdi = session_data;
+ struct sr_dev_inst *sdi = session_data;
struct sigma *sigma = sdi->priv;
uint16_t tsdiff, ts;
uint16_t samples[65536 * sigma->samples_per_event];
static int receive_data(int fd, int revents, void *session_data)
{
- struct sr_device_instance *sdi = session_data;
+ struct sr_dev_inst *sdi = session_data;
struct sigma *sigma = sdi->priv;
struct sr_datafeed_packet packet;
const int chunks_per_read = 32;
static int hw_start_acquisition(int device_index, gpointer session_data)
{
- struct sr_device_instance *sdi;
+ struct sr_dev_inst *sdi;
struct sigma *sigma;
struct sr_datafeed_packet packet;
struct sr_datafeed_header header;
/* Avoid compiler warnings. */
(void)session_data;
- if (!(sdi = sr_dev_inst_get(device_instances, device_index)))
+ if (!(sdi = sr_dev_inst_get(dev_insts, device_index)))
return SR_ERR;
sigma = sdi->priv;
static int hw_stop_acquisition(int device_index, gpointer session_data)
{
- struct sr_device_instance *sdi;
+ struct sr_dev_inst *sdi;
struct sigma *sigma;
uint8_t modestatus;
/* Avoid compiler warnings. */
(void)session_data;
- if (!(sdi = sr_dev_inst_get(device_instances, device_index))) {
+ if (!(sdi = sr_dev_inst_get(dev_insts, device_index))) {
sr_err("sigma: %s: sdi was NULL", __func__);
return SR_ERR_BUG;
}
#define BS 4096 /* Block size */
#define NUM_BLOCKS 2048 /* Number of blocks */
-static GSList *device_instances = NULL;
+static GSList *dev_insts = NULL;
static const char *probe_names[NUM_PROBES + 1] = {
"0",
static int hw_init(const char *deviceinfo)
{
int ret;
- struct sr_device_instance *sdi;
+ struct sr_dev_inst *sdi;
struct la8 *la8;
/* Avoid compiler errors. */
sdi = sr_dev_inst_new(0, SR_ST_INITIALIZING,
USB_VENDOR_NAME, USB_MODEL_NAME, USB_MODEL_VERSION);
if (!sdi) {
- sr_err("la8: %s: sr_device_instance_new failed", __func__);
+ sr_err("la8: %s: sr_dev_inst_new failed", __func__);
goto err_close_ftdic;
}
sdi->priv = la8;
- device_instances = g_slist_append(device_instances, sdi);
+ dev_insts = g_slist_append(dev_insts, sdi);
sr_spew("la8: %s finished successfully", __func__);
static int hw_opendev(int device_index)
{
int ret;
- struct sr_device_instance *sdi;
+ struct sr_dev_inst *sdi;
struct la8 *la8;
- if (!(sdi = sr_dev_inst_get(device_instances, device_index))) {
+ if (!(sdi = sr_dev_inst_get(dev_insts, device_index))) {
sr_err("la8: %s: sdi was NULL", __func__);
return SR_ERR; /* TODO: SR_ERR_ARG? */
}
return SR_ERR;
}
-static int set_samplerate(struct sr_device_instance *sdi, uint64_t samplerate)
+static int set_samplerate(struct sr_dev_inst *sdi, uint64_t samplerate)
{
struct la8 *la8;
static int hw_closedev(int device_index)
{
- struct sr_device_instance *sdi;
+ struct sr_dev_inst *sdi;
struct la8 *la8;
- if (!(sdi = sr_dev_inst_get(device_instances, device_index))) {
+ if (!(sdi = sr_dev_inst_get(dev_insts, device_index))) {
sr_err("la8: %s: sdi was NULL", __func__);
return SR_ERR; /* TODO: SR_ERR_ARG? */
}
static int hw_cleanup(void)
{
GSList *l;
- struct sr_device_instance *sdi;
+ struct sr_dev_inst *sdi;
int ret = SR_OK;
/* Properly close all devices. */
- for (l = device_instances; l; l = l->next) {
+ for (l = dev_insts; l; l = l->next) {
if (!(sdi = l->data)) {
/* Log error, but continue cleaning up the rest. */
sr_err("la8: %s: sdi was NULL, continuing", __func__);
}
sr_dev_inst_free(sdi); /* Returns void. */
}
- g_slist_free(device_instances); /* Returns void. */
- device_instances = NULL;
+ g_slist_free(dev_insts); /* Returns void. */
+ dev_insts = NULL;
return ret;
}
static void *hw_get_device_info(int device_index, int device_info_id)
{
- struct sr_device_instance *sdi;
+ struct sr_dev_inst *sdi;
struct la8 *la8;
void *info;
sr_spew("la8: entering %s", __func__);
- if (!(sdi = sr_dev_inst_get(device_instances, device_index))) {
+ if (!(sdi = sr_dev_inst_get(dev_insts, device_index))) {
sr_err("la8: %s: sdi was NULL", __func__);
return NULL;
}
static int hw_get_status(int device_index)
{
- struct sr_device_instance *sdi;
+ struct sr_dev_inst *sdi;
- if (!(sdi = sr_dev_inst_get(device_instances, device_index))) {
+ if (!(sdi = sr_dev_inst_get(dev_insts, device_index))) {
sr_err("la8: %s: sdi was NULL, device not found", __func__);
return SR_ST_NOT_FOUND;
}
static int hw_set_configuration(int device_index, int capability, void *value)
{
- struct sr_device_instance *sdi;
+ struct sr_dev_inst *sdi;
struct la8 *la8;
sr_spew("la8: entering %s", __func__);
- if (!(sdi = sr_dev_inst_get(device_instances, device_index))) {
+ if (!(sdi = sr_dev_inst_get(dev_insts, device_index))) {
sr_err("la8: %s: sdi was NULL", __func__);
return SR_ERR; /* TODO: SR_ERR_ARG? */
}
static int receive_data(int fd, int revents, void *session_data)
{
int i, ret;
- struct sr_device_instance *sdi;
+ struct sr_dev_inst *sdi;
struct la8 *la8;
/* Avoid compiler errors. */
static int hw_start_acquisition(int device_index, gpointer session_data)
{
- struct sr_device_instance *sdi;
+ struct sr_dev_inst *sdi;
struct la8 *la8;
struct sr_datafeed_packet packet;
struct sr_datafeed_header header;
sr_spew("la8: entering %s", __func__);
- if (!(sdi = sr_dev_inst_get(device_instances, device_index))) {
+ if (!(sdi = sr_dev_inst_get(dev_insts, device_index))) {
sr_err("la8: %s: sdi was NULL", __func__);
return SR_ERR; /* TODO: SR_ERR_ARG? */
}
static int hw_stop_acquisition(int device_index, gpointer session_data)
{
- struct sr_device_instance *sdi;
+ struct sr_dev_inst *sdi;
struct la8 *la8;
struct sr_datafeed_packet packet;
sr_dbg("la8: stopping acquisition");
- if (!(sdi = sr_dev_inst_get(device_instances, device_index))) {
+ if (!(sdi = sr_dev_inst_get(dev_insts, device_index))) {
sr_err("la8: %s: sdi was NULL", __func__);
return SR_ERR_BUG;
}
0xbe, 0xbe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
-/* List of struct sr_device_instance, maintained by opendev()/closedev(). */
-static GSList *device_instances = NULL;
+/* List of struct sr_dev_inst, maintained by opendev()/closedev(). */
+static GSList *dev_insts = NULL;
static uint64_t cur_samplerate = SR_KHZ(200);
static uint64_t limit_samples = 0;
static uint64_t limit_msec = 0;
static int hw_init(const char *deviceinfo)
{
- struct sr_device_instance *sdi;
+ struct sr_dev_inst *sdi;
/* Avoid compiler warnings. */
(void)deviceinfo;
sdi = sr_dev_inst_new(0, SR_ST_ACTIVE, DEMONAME, NULL, NULL);
if (!sdi) {
- sr_err("demo: %s: sr_device_instance_new failed", __func__);
+ sr_err("demo: %s: sr_dev_inst_new failed", __func__);
return 0;
}
- device_instances = g_slist_append(device_instances, sdi);
+ dev_insts = g_slist_append(dev_insts, sdi);
return 1;
}
static void *hw_get_device_info(int device_index, int device_info_id)
{
- struct sr_device_instance *sdi;
+ struct sr_dev_inst *sdi;
void *info = NULL;
- if (!(sdi = sr_dev_inst_get(device_instances, device_index))) {
+ if (!(sdi = sr_dev_inst_get(dev_insts, device_index))) {
sr_err("demo: %s: sdi was NULL", __func__);
return NULL;
}
supported_samplerates,
};
-static GSList *device_instances = NULL;
+static GSList *dev_insts = NULL;
-static int mso_send_control_message(struct sr_device_instance *sdi,
- uint16_t payload[], int n)
+static int mso_send_control_message(struct sr_dev_inst *sdi,
+ uint16_t payload[], int n)
{
int fd = sdi->serial->fd;
int i, w, ret, s = n * 2 + sizeof(mso_head) + sizeof(mso_foot);
return ret;
}
-static int mso_reset_adc(struct sr_device_instance *sdi)
+static int mso_reset_adc(struct sr_dev_inst *sdi)
{
struct mso *mso = sdi->priv;
uint16_t ops[2];
return mso_send_control_message(sdi, ARRAY_AND_SIZE(ops));
}
-static int mso_reset_fsm(struct sr_device_instance *sdi)
+static int mso_reset_fsm(struct sr_dev_inst *sdi)
{
struct mso *mso = sdi->priv;
uint16_t ops[1];
return mso_send_control_message(sdi, ARRAY_AND_SIZE(ops));
}
-static int mso_toggle_led(struct sr_device_instance *sdi, int state)
+static int mso_toggle_led(struct sr_dev_inst *sdi, int state)
{
struct mso *mso = sdi->priv;
uint16_t ops[1];
return mso_send_control_message(sdi, ARRAY_AND_SIZE(ops));
}
-static int mso_check_trigger(struct sr_device_instance *sdi,
- uint8_t *info)
+static int mso_check_trigger(struct sr_dev_inst *sdi, uint8_t *info)
{
uint16_t ops[] = { mso_trans(REG_TRIGGER, 0) };
char buf[1];
return ret;
}
-static int mso_read_buffer(struct sr_device_instance *sdi)
+static int mso_read_buffer(struct sr_dev_inst *sdi)
{
uint16_t ops[] = { mso_trans(REG_BUFFER, 0) };
return mso_send_control_message(sdi, ARRAY_AND_SIZE(ops));
}
-static int mso_arm(struct sr_device_instance *sdi)
+static int mso_arm(struct sr_dev_inst *sdi)
{
struct mso *mso = sdi->priv;
uint16_t ops[] = {
return mso_send_control_message(sdi, ARRAY_AND_SIZE(ops));
}
-static int mso_force_capture(struct sr_device_instance *sdi)
+static int mso_force_capture(struct sr_dev_inst *sdi)
{
struct mso *mso = sdi->priv;
uint16_t ops[] = {
return mso_send_control_message(sdi, ARRAY_AND_SIZE(ops));
}
-static int mso_dac_out(struct sr_device_instance *sdi, uint16_t val)
+static int mso_dac_out(struct sr_dev_inst *sdi, uint16_t val)
{
struct mso *mso = sdi->priv;
uint16_t ops[] = {
return mso_send_control_message(sdi, ARRAY_AND_SIZE(ops));
}
-static int mso_clkrate_out(struct sr_device_instance *sdi, uint16_t val)
+static int mso_clkrate_out(struct sr_dev_inst *sdi, uint16_t val)
{
uint16_t ops[] = {
mso_trans(REG_CLKRATE1, (val >> 8) & 0xff),
return mso_send_control_message(sdi, ARRAY_AND_SIZE(ops));
}
-static int mso_configure_rate(struct sr_device_instance *sdi,
- uint32_t rate)
+static int mso_configure_rate(struct sr_dev_inst *sdi, uint32_t rate)
{
struct mso *mso = sdi->priv;
unsigned int i;
mso->vbit));
}
-static int mso_configure_trigger(struct sr_device_instance *sdi)
+static int mso_configure_trigger(struct sr_dev_inst *sdi)
{
struct mso *mso = sdi->priv;
uint16_t ops[16];
return mso_send_control_message(sdi, ARRAY_AND_SIZE(ops));
}
-static int mso_configure_threshold_level(struct sr_device_instance *sdi)
+static int mso_configure_threshold_level(struct sr_dev_inst *sdi)
{
struct mso *mso = sdi->priv;
}
static int mso_parse_serial(const char *iSerial, const char *iProduct,
- struct mso *mso)
+ struct mso *mso)
{
unsigned int u1, u2, u3, u4, u5, u6;
static int hw_init(const char *deviceinfo)
{
- struct sr_device_instance *sdi;
+ struct sr_dev_inst *sdi;
int devcnt = 0;
struct udev *udev;
struct udev_enumerate *enumerate;
sdi->serial = sr_serial_dev_inst_new(path, -1);
if (!sdi->serial)
- goto err_device_instance_free;
+ goto err_dev_inst_free;
- device_instances = g_slist_append(device_instances, sdi);
+ dev_insts = g_slist_append(dev_insts, sdi);
devcnt++;
continue;
-err_device_instance_free:
+err_dev_inst_free:
sr_dev_inst_free(sdi);
err_free_mso:
g_free(mso);
static int hw_cleanup(void)
{
GSList *l;
- struct sr_device_instance *sdi;
+ struct sr_dev_inst *sdi;
int ret;
ret = SR_OK;
/* Properly close all devices. */
- for (l = device_instances; l; l = l->next) {
+ for (l = dev_insts; l; l = l->next) {
if (!(sdi = l->data)) {
/* Log error, but continue cleaning up the rest. */
sr_err("mso19: %s: sdi was NULL, continuing", __func__);
serial_close(sdi->serial->fd);
sr_dev_inst_free(sdi);
}
- g_slist_free(device_instances);
- device_instances = NULL;
+ g_slist_free(dev_insts);
+ dev_insts = NULL;
return ret;
}
static int hw_opendev(int device_index)
{
- struct sr_device_instance *sdi;
+ struct sr_dev_inst *sdi;
struct mso *mso;
int ret = SR_ERR;
- if (!(sdi = sr_dev_inst_get(device_instances, device_index)))
+ if (!(sdi = sr_dev_inst_get(dev_insts, device_index)))
return ret;
mso = sdi->priv;
static int hw_closedev(int device_index)
{
- struct sr_device_instance *sdi;
+ struct sr_dev_inst *sdi;
- if (!(sdi = sr_dev_inst_get(device_instances, device_index))) {
+ if (!(sdi = sr_dev_inst_get(dev_insts, device_index))) {
sr_err("mso19: %s: sdi was NULL", __func__);
return SR_ERR; /* TODO: SR_ERR_ARG? */
}
static void *hw_get_device_info(int device_index, int device_info_id)
{
- struct sr_device_instance *sdi;
+ struct sr_dev_inst *sdi;
struct mso *mso;
void *info = NULL;
- if (!(sdi = sr_dev_inst_get(device_instances, device_index)))
+ if (!(sdi = sr_dev_inst_get(dev_insts, device_index)))
return NULL;
mso = sdi->priv;
static int hw_get_status(int device_index)
{
- struct sr_device_instance *sdi;
+ struct sr_dev_inst *sdi;
- if (!(sdi = sr_dev_inst_get(device_instances, device_index)))
+ if (!(sdi = sr_dev_inst_get(dev_insts, device_index)))
return SR_ST_NOT_FOUND;
return sdi->status;
static int hw_set_configuration(int device_index, int capability, void *value)
{
- struct sr_device_instance *sdi;
+ struct sr_dev_inst *sdi;
- if (!(sdi = sr_dev_inst_get(device_instances, device_index)))
+ if (!(sdi = sr_dev_inst_get(dev_insts, device_index)))
return SR_ERR;
switch (capability) {
/* FIXME: Pass errors? */
static int receive_data(int fd, int revents, void *user_data)
{
- struct sr_device_instance *sdi = user_data;
+ struct sr_dev_inst *sdi = user_data;
struct mso *mso = sdi->priv;
struct sr_datafeed_packet packet;
struct sr_datafeed_logic logic;
static int hw_start_acquisition(int device_index, gpointer session_device_id)
{
- struct sr_device_instance *sdi;
+ struct sr_dev_inst *sdi;
struct mso *mso;
struct sr_datafeed_packet packet;
struct sr_datafeed_header header;
int ret = SR_ERR;
- if (!(sdi = sr_dev_inst_get(device_instances, device_index)))
+ if (!(sdi = sr_dev_inst_get(dev_insts, device_index)))
return ret;
mso = sdi->priv;
NULL,
};
-/* List of struct sr_serial_device_instance */
-static GSList *device_instances = NULL;
+/* List of struct sr_serial_dev_inst */
+static GSList *dev_insts = NULL;
static int send_shortcommand(int fd, uint8_t command)
{
return ols;
}
-static struct sr_device_instance *get_metadata(int fd)
+static struct sr_dev_inst *get_metadata(int fd)
{
- struct sr_device_instance *sdi;
+ struct sr_dev_inst *sdi;
struct ols_device *ols;
uint32_t tmp_int;
uint8_t key, type, token;
static int hw_init(const char *deviceinfo)
{
- struct sr_device_instance *sdi;
+ struct sr_dev_inst *sdi;
struct ols_device *ols;
GSList *ports, *l;
GPollFD *fds, probefd;
sdi->priv = ols;
}
ols->serial = sr_serial_dev_inst_new(device_names[i], -1);
- device_instances = g_slist_append(device_instances, sdi);
+ dev_insts = g_slist_append(dev_insts, sdi);
final_devcnt++;
serial_close(fds[i].fd);
fds[i].fd = 0;
static int hw_opendev(int device_index)
{
- struct sr_device_instance *sdi;
+ struct sr_dev_inst *sdi;
struct ols_device *ols;
- if (!(sdi = sr_dev_inst_get(device_instances, device_index)))
+ if (!(sdi = sr_dev_inst_get(dev_insts, device_index)))
return SR_ERR;
ols = sdi->priv;
static int hw_closedev(int device_index)
{
- struct sr_device_instance *sdi;
+ struct sr_dev_inst *sdi;
struct ols_device *ols;
- if (!(sdi = sr_dev_inst_get(device_instances, device_index))) {
+ if (!(sdi = sr_dev_inst_get(dev_insts, device_index))) {
sr_err("ols: %s: sdi was NULL", __func__);
return SR_ERR; /* TODO: SR_ERR_ARG? */
}
static int hw_cleanup(void)
{
GSList *l;
- struct sr_device_instance *sdi;
+ struct sr_dev_inst *sdi;
struct ols_device *ols;
int ret = SR_OK;
/* Properly close and free all devices. */
- for (l = device_instances; l; l = l->next) {
+ for (l = dev_insts; l; l = l->next) {
if (!(sdi = l->data)) {
/* Log error, but continue cleaning up the rest. */
sr_err("ols: %s: sdi was NULL, continuing", __func__);
sr_serial_dev_inst_free(ols->serial);
sr_dev_inst_free(sdi);
}
- g_slist_free(device_instances);
- device_instances = NULL;
+ g_slist_free(dev_insts);
+ dev_insts = NULL;
return ret;
}
static void *hw_get_device_info(int device_index, int device_info_id)
{
- struct sr_device_instance *sdi;
+ struct sr_dev_inst *sdi;
struct ols_device *ols;
void *info;
- if (!(sdi = sr_dev_inst_get(device_instances, device_index)))
+ if (!(sdi = sr_dev_inst_get(dev_insts, device_index)))
return NULL;
ols = sdi->priv;
static int hw_get_status(int device_index)
{
- struct sr_device_instance *sdi;
+ struct sr_dev_inst *sdi;
- if (!(sdi = sr_dev_inst_get(device_instances, device_index)))
+ if (!(sdi = sr_dev_inst_get(dev_insts, device_index)))
return SR_ST_NOT_FOUND;
return sdi->status;
return capabilities;
}
-static int set_configuration_samplerate(struct sr_device_instance *sdi,
+static int set_configuration_samplerate(struct sr_dev_inst *sdi,
uint64_t samplerate)
{
struct ols_device *ols;
static int hw_set_configuration(int device_index, int capability, void *value)
{
- struct sr_device_instance *sdi;
+ struct sr_dev_inst *sdi;
struct ols_device *ols;
int ret;
uint64_t *tmp_u64;
- if (!(sdi = sr_dev_inst_get(device_instances, device_index)))
+ if (!(sdi = sr_dev_inst_get(dev_insts, device_index)))
return SR_ERR;
ols = sdi->priv;
{
struct sr_datafeed_packet packet;
struct sr_datafeed_logic logic;
- struct sr_device_instance *sdi;
+ struct sr_dev_inst *sdi;
struct ols_device *ols;
GSList *l;
int num_channels, offset, i, j;
/* find this device's ols_device struct by its fd */
ols = NULL;
- for (l = device_instances; l; l = l->next) {
+ for (l = dev_insts; l; l = l->next) {
sdi = l->data;
if (ols->serial->fd == fd) {
ols = sdi->priv;
{
struct sr_datafeed_packet *packet;
struct sr_datafeed_header *header;
- struct sr_device_instance *sdi;
+ struct sr_dev_inst *sdi;
struct ols_device *ols;
uint32_t trigger_config[4];
uint32_t data;
int num_channels;
int i;
- if (!(sdi = sr_dev_inst_get(device_instances, device_index)))
+ if (!(sdi = sr_dev_inst_get(dev_insts, device_index)))
return SR_ERR;
ols = sdi->priv;
unsigned char tmp_sample[4];
unsigned char *raw_sample_buf;
- struct sr_serial_device_instance *serial;
+ struct sr_serial_dev_inst *serial;
};
#endif
supported_samplerates,
};
-/* List of struct sr_device_instance, maintained by opendev()/closedev(). */
-static GSList *device_instances = NULL;
+/* List of struct sr_dev_inst, maintained by opendev()/closedev(). */
+static GSList *dev_insts = NULL;
static libusb_context *usb_context = NULL;
static int new_saleae_logic_firmware = 0;
{
libusb_device **devlist;
struct libusb_device_descriptor des;
- struct sr_device_instance *sdi;
+ struct sr_dev_inst *sdi;
struct fx2_device *fx2;
int err, skip, i;
- if (!(sdi = sr_dev_inst_get(device_instances, device_index)))
+ if (!(sdi = sr_dev_inst_get(dev_insts, device_index)))
return SR_ERR;
fx2 = sdi->priv;
return SR_OK;
}
-static void close_device(struct sr_device_instance *sdi)
+static void close_device(struct sr_dev_inst *sdi)
{
struct fx2_device *fx2;
static int hw_init(const char *deviceinfo)
{
- struct sr_device_instance *sdi;
+ struct sr_dev_inst *sdi;
struct libusb_device_descriptor des;
struct fx2_profile *fx2_prof;
struct fx2_device *fx2;
fx2 = fx2_device_new();
fx2->profile = fx2_prof;
sdi->priv = fx2;
- device_instances = g_slist_append(device_instances, sdi);
+ dev_insts = g_slist_append(dev_insts, sdi);
if (check_conf_profile(devlist[i])) {
/* Already has the firmware, so fix the new address. */
static int hw_opendev(int device_index)
{
GTimeVal cur_time;
- struct sr_device_instance *sdi;
+ struct sr_dev_inst *sdi;
struct fx2_device *fx2;
int timediff, err;
- if (!(sdi = sr_dev_inst_get(device_instances, device_index)))
+ if (!(sdi = sr_dev_inst_get(dev_insts, device_index)))
return SR_ERR;
fx2 = sdi->priv;
static int hw_closedev(int device_index)
{
- struct sr_device_instance *sdi;
+ struct sr_dev_inst *sdi;
- if (!(sdi = sr_dev_inst_get(device_instances, device_index))) {
+ if (!(sdi = sr_dev_inst_get(dev_insts, device_index))) {
sr_err("logic: %s: sdi was NULL", __func__);
return SR_ERR; /* TODO: SR_ERR_ARG? */
}
static int hw_cleanup(void)
{
GSList *l;
- struct sr_device_instance *sdi;
+ struct sr_dev_inst *sdi;
struct fx2_device *fx2;
int ret = SR_OK;
/* Properly close and free all devices. */
- for (l = device_instances; l; l = l->next) {
+ for (l = dev_insts; l; l = l->next) {
if (!(sdi = l->data)) {
/* Log error, but continue cleaning up the rest. */
sr_err("logic: %s: sdi was NULL, continuing", __func__);
sr_dev_inst_free(sdi);
}
- g_slist_free(device_instances);
- device_instances = NULL;
+ g_slist_free(dev_insts);
+ dev_insts = NULL;
if (usb_context)
libusb_exit(usb_context);
static void *hw_get_device_info(int device_index, int device_info_id)
{
- struct sr_device_instance *sdi;
+ struct sr_dev_inst *sdi;
struct fx2_device *fx2;
void *info = NULL;
- if (!(sdi = sr_dev_inst_get(device_instances, device_index)))
+ if (!(sdi = sr_dev_inst_get(dev_insts, device_index)))
return NULL;
fx2 = sdi->priv;
static int hw_get_status(int device_index)
{
- struct sr_device_instance *sdi;
+ struct sr_dev_inst *sdi;
- sdi = sr_dev_inst_get(device_instances, device_index);
+ sdi = sr_dev_inst_get(dev_insts, device_index);
if (sdi)
return sdi->status;
else
return 0;
}
-static int set_configuration_samplerate(struct sr_device_instance *sdi,
+static int set_configuration_samplerate(struct sr_dev_inst *sdi,
uint64_t samplerate)
{
struct fx2_device *fx2;
static int hw_set_configuration(int device_index, int capability, void *value)
{
- struct sr_device_instance *sdi;
+ struct sr_dev_inst *sdi;
struct fx2_device *fx2;
int ret;
uint64_t *tmp_u64;
- if (!(sdi = sr_dev_inst_get(device_instances, device_index)))
+ if (!(sdi = sr_dev_inst_get(dev_insts, device_index)))
return SR_ERR;
fx2 = sdi->priv;
static int hw_start_acquisition(int device_index, gpointer session_data)
{
- struct sr_device_instance *sdi;
+ struct sr_dev_inst *sdi;
struct sr_datafeed_packet *packet;
struct sr_datafeed_header *header;
struct fx2_device *fx2;
int size, i;
unsigned char *buf;
- if (!(sdi = sr_dev_inst_get(device_instances, device_index)))
+ if (!(sdi = sr_dev_inst_get(dev_insts, device_index)))
return SR_ERR;
fx2 = sdi->priv;
fx2->session_data = session_data;
*/
void *session_data;
- struct sr_usb_device_instance *usb;
+ struct sr_usb_dev_inst *usb;
};
#endif
NULL,
};
-/* List of struct sr_device_instance, maintained by opendev()/closedev(). */
-static GSList *device_instances = NULL;
+/* List of struct sr_dev_inst, maintained by opendev()/closedev(). */
+static GSList *dev_insts = NULL;
static libusb_context *usb_context = NULL;
uint8_t trigger_value[NUM_TRIGGER_STAGES];
// uint8_t trigger_buffer[NUM_TRIGGER_STAGES];
- struct sr_usb_device_instance *usb;
+ struct sr_usb_dev_inst *usb;
};
static int hw_set_configuration(int device_index, int capability, void *value);
return 0;
}
-static int opendev4(struct sr_device_instance **sdi, libusb_device *dev,
+static int opendev4(struct sr_dev_inst **sdi, libusb_device *dev,
struct libusb_device_descriptor *des)
{
struct zp *zp;
return 0;
}
-static struct sr_device_instance *zp_open_device(int device_index)
+static struct sr_dev_inst *zp_open_device(int device_index)
{
- struct sr_device_instance *sdi;
+ struct sr_dev_inst *sdi;
libusb_device **devlist;
struct libusb_device_descriptor des;
int err, i;
- if (!(sdi = sr_dev_inst_get(device_instances, device_index)))
+ if (!(sdi = sr_dev_inst_get(dev_insts, device_index)))
return NULL;
libusb_get_device_list(usb_context, &devlist);
return sdi;
}
-static void close_device(struct sr_device_instance *sdi)
+static void close_device(struct sr_dev_inst *sdi)
{
struct zp *zp;
sdi->status = SR_ST_INACTIVE;
}
-static int configure_probes(struct sr_device_instance *sdi, GSList *probes)
+static int configure_probes(struct sr_dev_inst *sdi, GSList *probes)
{
struct zp *zp;
struct sr_probe *probe;
static int hw_init(const char *deviceinfo)
{
- struct sr_device_instance *sdi;
+ struct sr_dev_inst *sdi;
struct libusb_device_descriptor des;
libusb_device **devlist;
int err, devcnt, i;
* the zeroplus range?
*/
/* Register the device with libsigrok. */
- sdi = sr_dev_inst_new(devcnt,
+ if (!(sdi = sr_dev_inst_new(devcnt,
SR_ST_INACTIVE, USB_VENDOR_NAME,
- USB_MODEL_NAME, USB_MODEL_VERSION);
- if (!sdi) {
- sr_err("zp: %s: sr_device_instance_new failed",
+ USB_MODEL_NAME, USB_MODEL_VERSION))) {
+ sr_err("zp: %s: sr_dev_inst_new failed",
__func__);
return 0;
}
sdi->priv = zp;
- device_instances =
- g_slist_append(device_instances, sdi);
+ dev_insts =
+ g_slist_append(dev_insts, sdi);
zp->usb = sr_usb_dev_inst_new(
libusb_get_bus_number(devlist[i]),
libusb_get_device_address(devlist[i]), NULL);
static int hw_opendev(int device_index)
{
- struct sr_device_instance *sdi;
+ struct sr_dev_inst *sdi;
struct zp *zp;
int err;
static int hw_closedev(int device_index)
{
- struct sr_device_instance *sdi;
+ struct sr_dev_inst *sdi;
- if (!(sdi = sr_dev_inst_get(device_instances, device_index))) {
+ if (!(sdi = sr_dev_inst_get(dev_insts, device_index))) {
sr_err("zp: %s: sdi was NULL", __func__);
return SR_ERR; /* TODO: SR_ERR_ARG? */
}
static int hw_cleanup(void)
{
GSList *l;
- struct sr_device_instance *sdi;
+ struct sr_dev_inst *sdi;
- for (l = device_instances; l; l = l->next) {
+ for (l = dev_insts; l; l = l->next) {
sdi = l->data;
/* Properly close all devices... */
close_device(sdi);
/* ...and free all their memory. */
sr_dev_inst_free(sdi);
}
- g_slist_free(device_instances);
- device_instances = NULL;
+ g_slist_free(dev_insts);
+ dev_insts = NULL;
if (usb_context)
libusb_exit(usb_context);
static void *hw_get_device_info(int device_index, int device_info_id)
{
- struct sr_device_instance *sdi;
+ struct sr_dev_inst *sdi;
struct zp *zp;
void *info;
- if (!(sdi = sr_dev_inst_get(device_instances, device_index))) {
+ if (!(sdi = sr_dev_inst_get(dev_insts, device_index))) {
sr_err("zp: %s: sdi was NULL", __func__);
return NULL;
}
static int hw_get_status(int device_index)
{
- struct sr_device_instance *sdi;
+ struct sr_dev_inst *sdi;
- sdi = sr_dev_inst_get(device_instances, device_index);
+ sdi = sr_dev_inst_get(dev_insts, device_index);
if (sdi)
return sdi->status;
else
return capabilities;
}
-static int set_configuration_samplerate(struct sr_device_instance *sdi,
+static int set_configuration_samplerate(struct sr_dev_inst *sdi,
uint64_t samplerate)
{
struct zp *zp;
static int hw_set_configuration(int device_index, int capability, void *value)
{
- struct sr_device_instance *sdi;
+ struct sr_dev_inst *sdi;
uint64_t *tmp_u64;
struct zp *zp;
- if (!(sdi = sr_dev_inst_get(device_instances, device_index))) {
+ if (!(sdi = sr_dev_inst_get(dev_insts, device_index))) {
sr_err("zp: %s: sdi was NULL", __func__);
return SR_ERR;
}
static int hw_start_acquisition(int device_index, gpointer session_data)
{
- struct sr_device_instance *sdi;
+ struct sr_dev_inst *sdi;
struct sr_datafeed_packet packet;
struct sr_datafeed_logic logic;
struct sr_datafeed_header header;
unsigned char *buf;
struct zp *zp;
- if (!(sdi = sr_dev_inst_get(device_instances, device_index))) {
+ if (!(sdi = sr_dev_inst_get(dev_insts, device_index))) {
sr_err("zp: %s: sdi was NULL", __func__);
return SR_ERR;
}
static int hw_stop_acquisition(int device_index, gpointer session_device_id)
{
struct sr_datafeed_packet packet;
- struct sr_device_instance *sdi;
+ struct sr_dev_inst *sdi;
struct zp *zp;
packet.type = SR_DF_END;
sr_session_bus(session_device_id, &packet);
- if (!(sdi = sr_dev_inst_get(device_instances, device_index))) {
+ if (!(sdi = sr_dev_inst_get(dev_insts, device_index))) {
sr_err("zp: %s: sdi was NULL", __func__);
return SR_ERR_BUG;
}
}
}
-SR_PRIV struct sr_device_instance *sr_dev_inst_new(int index, int status,
+SR_PRIV struct sr_dev_inst *sr_dev_inst_new(int index, int status,
const char *vendor, const char *model, const char *version)
{
- struct sr_device_instance *sdi;
+ struct sr_dev_inst *sdi;
- if (!(sdi = g_try_malloc(sizeof(struct sr_device_instance)))) {
+ if (!(sdi = g_try_malloc(sizeof(struct sr_dev_inst)))) {
sr_err("hwplugin: %s: sdi malloc failed", __func__);
return NULL;
}
return sdi;
}
-SR_PRIV struct sr_device_instance *sr_dev_inst_get(
- GSList *device_instances, int device_index)
+SR_PRIV struct sr_dev_inst *sr_dev_inst_get(GSList *dev_insts, int device_index)
{
- struct sr_device_instance *sdi;
+ struct sr_dev_inst *sdi;
GSList *l;
- for (l = device_instances; l; l = l->next) {
- sdi = (struct sr_device_instance *)(l->data);
+ for (l = dev_insts; l; l = l->next) {
+ sdi = (struct sr_dev_inst *)(l->data);
if (sdi->index == device_index)
return sdi;
}
return NULL;
}
-SR_PRIV void sr_dev_inst_free(struct sr_device_instance *sdi)
+SR_PRIV void sr_dev_inst_free(struct sr_dev_inst *sdi)
{
g_free(sdi->priv);
g_free(sdi->vendor);
#ifdef HAVE_LIBUSB_1_0
-SR_PRIV struct sr_usb_device_instance *sr_usb_dev_inst_new(uint8_t bus,
+SR_PRIV struct sr_usb_dev_inst *sr_usb_dev_inst_new(uint8_t bus,
uint8_t address, struct libusb_device_handle *hdl)
{
- struct sr_usb_device_instance *udi;
+ struct sr_usb_dev_inst *udi;
- if (!(udi = g_try_malloc(sizeof(struct sr_usb_device_instance)))) {
+ if (!(udi = g_try_malloc(sizeof(struct sr_usb_dev_inst)))) {
sr_err("hwplugin: %s: udi malloc failed", __func__);
return NULL;
}
return udi;
}
-SR_PRIV void sr_usb_dev_inst_free(struct sr_usb_device_instance *usb)
+SR_PRIV void sr_usb_dev_inst_free(struct sr_usb_dev_inst *usb)
{
/* Avoid compiler warnings. */
(void)usb;
#endif
-SR_PRIV struct sr_serial_device_instance *sr_serial_dev_inst_new(
- const char *port, int fd)
+SR_PRIV struct sr_serial_dev_inst *sr_serial_dev_inst_new(const char *port,
+ int fd)
{
- struct sr_serial_device_instance *serial;
+ struct sr_serial_dev_inst *serial;
- if (!(serial = g_try_malloc(sizeof(struct sr_serial_device_instance)))) {
+ if (!(serial = g_try_malloc(sizeof(struct sr_serial_dev_inst)))) {
sr_err("hwplugin: %s: serial malloc failed", __func__);
return NULL;
}
return serial;
}
-SR_PRIV void sr_serial_dev_inst_free(
- struct sr_serial_device_instance *serial)
+SR_PRIV void sr_serial_dev_inst_free(struct sr_serial_dev_inst *serial)
{
g_free(serial->port);
}
};
static char *sessionfile = NULL;
-static GSList *device_instances = NULL;
+static GSList *dev_insts = NULL;
static int capabilities[] = {
SR_HWCAP_CAPTUREFILE,
SR_HWCAP_CAPTURE_UNITSIZE,
*/
static struct session_vdevice *get_vdevice_by_index(int device_index)
{
- struct sr_device_instance *sdi;
+ struct sr_dev_inst *sdi;
struct session_vdevice *vdevice;
/* TODO: Sanity checks on device_index. */
- if (!(sdi = sr_dev_inst_get(device_instances, device_index))) {
+ if (!(sdi = sr_dev_inst_get(dev_insts, device_index))) {
sr_err("session driver: %s: device instance with device "
"index %d was not found", __func__, device_index);
return NULL;
*/
static int feed_chunk(int fd, int revents, void *session_data)
{
- struct sr_device_instance *sdi;
+ struct sr_dev_inst *sdi;
struct session_vdevice *vdevice;
struct sr_datafeed_packet packet;
struct sr_datafeed_logic logic;
sr_dbg("session_driver: feed chunk");
got_data = FALSE;
- for (l = device_instances; l; l = l->next) {
+ for (l = dev_insts; l; l = l->next) {
sdi = l->data;
vdevice = sdi->priv;
if (!vdevice)
{
GSList *l;
- for (l = device_instances; l; l = l->next)
+ for (l = dev_insts; l; l = l->next)
sr_dev_inst_free(l->data);
- g_slist_free(device_instances);
- device_instances = NULL;
+ g_slist_free(dev_insts);
+ dev_insts = NULL;
sr_session_source_remove(-1);
static int hw_opendev(int device_index)
{
- struct sr_device_instance *sdi;
+ struct sr_dev_inst *sdi;
sdi = sr_dev_inst_new(device_index, SR_ST_INITIALIZING,
NULL, NULL, NULL);
return SR_ERR_MALLOC;
}
- device_instances = g_slist_append(device_instances, sdi);
+ dev_insts = g_slist_append(dev_insts, sdi);
return SR_OK;
}
#define DATASTORE_CHUNKSIZE (512 * 1024)
#ifdef HAVE_LIBUSB_1_0
-struct sr_usb_device_instance {
+struct sr_usb_dev_inst {
uint8_t bus;
uint8_t address;
struct libusb_device_handle *devhdl;
};
#endif
-struct sr_serial_device_instance {
+struct sr_serial_dev_inst {
char *port;
int fd;
};
#ifdef HAVE_LIBUSB_1_0
/* USB-specific instances */
-SR_PRIV struct sr_usb_device_instance *sr_usb_dev_inst_new(uint8_t bus,
+SR_PRIV struct sr_usb_dev_inst *sr_usb_dev_inst_new(uint8_t bus,
uint8_t address, struct libusb_device_handle *hdl);
-SR_PRIV void sr_usb_dev_inst_free(struct sr_usb_device_instance *usb);
+SR_PRIV void sr_usb_dev_inst_free(struct sr_usb_dev_inst *usb);
#endif
/* Serial-specific instances */
-SR_PRIV struct sr_serial_device_instance *sr_serial_dev_inst_new(
+SR_PRIV struct sr_serial_dev_inst *sr_serial_dev_inst_new(
const char *port, int fd);
-SR_PRIV void sr_serial_dev_inst_free(struct sr_serial_device_instance *serial);
+SR_PRIV void sr_serial_dev_inst_free(struct sr_serial_dev_inst *serial);
/*--- log.c -----------------------------------------------------------------*/
struct sr_datafeed_packet *packet);
/* Generic device instances */
-SR_PRIV struct sr_device_instance *sr_dev_inst_new(int index,
- int status, const char *vendor, const char *model, const char *version);
-SR_PRIV struct sr_device_instance *sr_dev_inst_get(
- GSList *device_instances, int device_index);
-SR_PRIV void sr_dev_inst_free(struct sr_device_instance *sdi);
+SR_PRIV struct sr_dev_inst *sr_dev_inst_new(int index, int status,
+ const char *vendor, const char *model, const char *version);
+SR_PRIV struct sr_dev_inst *sr_dev_inst_get(GSList *dev_insts,
+ int device_index);
+SR_PRIV void sr_dev_inst_free(struct sr_dev_inst *sdi);
SR_PRIV void sr_source_remove(int fd);
SR_PRIV void sr_source_add(int fd, int events, int timeout,
/*--- hardware/common/misc.c ------------------------------------------------*/
#ifdef HAVE_LIBUSB_1_0
-SR_PRIV int opendev2(int device_index, struct sr_device_instance **sdi,
+SR_PRIV int opendev2(int device_index, struct sr_dev_inst **sdi,
libusb_device *dev, struct libusb_device_descriptor *des,
int *skip, uint16_t vid, uint16_t pid, int interface);
-SR_PRIV int opendev3(struct sr_device_instance **sdi, libusb_device *dev,
+SR_PRIV int opendev3(struct sr_dev_inst **sdi, libusb_device *dev,
struct libusb_device_descriptor *des,
uint16_t vid, uint16_t pid, int interface);
#endif
char *shortname;
};
-struct sr_device_instance {
+struct sr_dev_inst {
int index;
int status;
int instance_type;
void *priv;
};
-/* sr_device_instance types */
+/* sr_dev_inst types */
enum {
SR_USB_INSTANCE,
SR_SERIAL_INSTANCE,
/* Device info IDs */
enum {
- /* struct sr_device_instance for this specific device */
+ /* struct sr_dev_inst for this specific device */
SR_DI_INSTANCE,
/* The number of probes connected to this device */
SR_DI_NUM_PROBES,