#define NUM_PROBES 16
SR_PRIV struct sr_dev_driver asix_sigma_driver_info;
-static struct sr_dev_driver *adi = &asix_sigma_driver_info;
+static struct sr_dev_driver *di = &asix_sigma_driver_info;
static int hw_dev_acquisition_stop(struct sr_dev_inst *sdi, void *cb_data);
static const uint64_t supported_samplerates[] = {
struct drv_context *drvc;
struct dev_context *devc;
- drvc = adi->priv;
+ drvc = di->priv;
/* Properly close all devices. */
for (l = drvc->instances; l; l = l->next) {
return SR_ERR_MALLOC;
}
drvc->sr_ctx = sr_ctx;
- adi->priv = drvc;
+ di->priv = drvc;
return SR_OK;
}
(void)options;
- drvc = adi->priv;
+ drvc = di->priv;
devices = NULL;
clear_instances();
sr_err("%s: sdi was NULL", __func__);
goto free;
}
- sdi->driver = adi;
+ sdi->driver = di;
for (i = 0; probe_names[i]; i++) {
if (!(probe = sr_probe_new(i, SR_PROBE_LOGIC, TRUE,
{
struct drv_context *drvc;
- drvc = adi->priv;
+ drvc = di->priv;
return drvc->instances;
}
static int hw_cleanup(void)
{
- if (!adi->priv)
+ if (!di->priv)
return SR_OK;
clear_instances();
/* List of struct sr_dev_inst, maintained by dev_open()/dev_close(). */
SR_PRIV struct sr_dev_driver demo_driver_info;
-static struct sr_dev_driver *ddi = &demo_driver_info;
+static struct sr_dev_driver *di = &demo_driver_info;
static uint64_t cur_samplerate = SR_KHZ(200);
static uint64_t limit_samples = 0;
static uint64_t limit_msec = 0;
return SR_ERR_MALLOC;
}
drvc->sr_ctx = sr_ctx;
- ddi->priv = drvc;
+ di->priv = drvc;
return SR_OK;
}
(void)options;
- drvc = ddi->priv;
+ drvc = di->priv;
devices = NULL;
sdi = sr_dev_inst_new(0, SR_ST_ACTIVE, DEMONAME, NULL, NULL);
sr_err("%s: sr_dev_inst_new failed", __func__);
return 0;
}
- sdi->driver = ddi;
+ sdi->driver = di;
for (i = 0; probe_names[i]; i++) {
if (!(probe = sr_probe_new(i, SR_PROBE_LOGIC, TRUE,
{
struct drv_context *drvc;
- drvc = ddi->priv;
+ drvc = di->priv;
return drvc->instances;
}
};
SR_PRIV struct sr_dev_driver fx2lafw_driver_info;
-static struct sr_dev_driver *fdi = &fx2lafw_driver_info;
+static struct sr_dev_driver *di = &fx2lafw_driver_info;
static int hw_dev_close(struct sr_dev_inst *sdi);
static int hw_dev_config_set(const struct sr_dev_inst *sdi, int hwcap,
const void *value);
libusb_device **devlist;
struct libusb_device_descriptor des;
struct dev_context *devc;
- struct drv_context *drvc = fdi->priv;
+ struct drv_context *drvc = di->priv;
struct version_info vi;
int ret, skip, i;
uint8_t revid;
struct dev_context *devc;
int ret;
- drvc = fdi->priv;
+ drvc = di->priv;
ret = SR_OK;
for (l = drvc->instances; l; l = l->next) {
if (!(sdi = l->data)) {
}
drvc->sr_ctx = sr_ctx;
- fdi->priv = drvc;
+ di->priv = drvc;
return SR_OK;
}
(void)options;
- drvc = fdi->priv;
+ drvc = di->priv;
/* This scan always invalidates any previous scans. */
clear_instances();
prof->vendor, prof->model, prof->model_version);
if (!sdi)
return NULL;
- sdi->driver = fdi;
+ sdi->driver = di;
/* Fill in probelist according to this device's profile. */
num_logic_probes = prof->dev_caps & DEV_CAPS_16BIT ? 16 : 8;
{
struct drv_context *drvc;
- drvc = fdi->priv;
+ drvc = di->priv;
return drvc->instances;
}
struct drv_context *drvc;
int ret;
- if (!(drvc = fdi->priv))
+ if (!(drvc = di->priv))
return SR_OK;
ret = clear_instances();
g_free(drvc);
- fdi->priv = NULL;
+ di->priv = NULL;
return ret;
}
static int receive_data(int fd, int revents, void *cb_data)
{
struct timeval tv;
- struct drv_context *drvc = fdi->priv;
+ struct drv_context *drvc = di->priv;
(void)fd;
(void)revents;
static void finish_acquisition(struct dev_context *devc)
{
struct sr_datafeed_packet packet;
- struct drv_context *drvc = fdi->priv;
+ struct drv_context *drvc = di->priv;
int i;
struct sr_datafeed_header header;
struct sr_datafeed_meta_logic meta;
struct dev_context *devc;
- struct drv_context *drvc = fdi->priv;
+ struct drv_context *drvc = di->priv;
struct libusb_transfer *transfer;
const struct libusb_pollfd **lupfd;
unsigned int i;
};
SR_PRIV struct sr_dev_driver hantek_dso_driver_info;
-static struct sr_dev_driver *hdi = &hantek_dso_driver_info;
+static struct sr_dev_driver *di = &hantek_dso_driver_info;
static int hw_dev_acquisition_stop(struct sr_dev_inst *sdi, void *cb_data);
prof->vendor, prof->model, NULL);
if (!sdi)
return NULL;
- sdi->driver = hdi;
+ sdi->driver = di;
/*
* Add only the real probes -- EXT isn't a source of data, only
devc->triggersource = g_strdup(DEFAULT_TRIGGER_SOURCE);
devc->triggerposition = DEFAULT_HORIZ_TRIGGERPOS;
sdi->priv = devc;
- drvc = hdi->priv;
+ drvc = di->priv;
drvc->instances = g_slist_append(drvc->instances, sdi);
return sdi;
struct dev_context *devc;
GSList *l;
- drvc = hdi->priv;
+ drvc = di->priv;
for (l = drvc->instances; l; l = l->next) {
if (!(sdi = l->data)) {
/* Log error, but continue cleaning up the rest. */
}
drvc->sr_ctx = sr_ctx;
- hdi->priv = drvc;
+ di->priv = drvc;
return SR_OK;
}
devcnt = 0;
devices = 0;
- drvc = hdi->priv;
+ drvc = di->priv;
drvc->instances = NULL;
clear_instances();
{
struct drv_context *drvc;
- drvc = hdi->priv;
+ drvc = di->priv;
return drvc->instances;
}
{
struct drv_context *drvc;
- if (!(drvc = hdi->priv))
+ if (!(drvc = di->priv))
return SR_OK;
clear_instances();
struct sr_datafeed_packet packet;
struct timeval tv;
struct dev_context *devc;
- struct drv_context *drvc = hdi->priv;
+ struct drv_context *drvc = di->priv;
const struct libusb_pollfd **lupfd;
int num_probes, i;
uint32_t trigger_offset;
struct sr_datafeed_header header;
struct sr_datafeed_meta_analog meta;
struct dev_context *devc;
- struct drv_context *drvc = hdi->priv;
+ struct drv_context *drvc = di->priv;
int i;
if (sdi->status != SR_ST_ACTIVE)
};
SR_PRIV struct sr_dev_driver ols_driver_info;
-static struct sr_dev_driver *odi = &ols_driver_info;
+static struct sr_dev_driver *di = &ols_driver_info;
static int send_shortcommand(struct sr_serial_dev_inst *serial,
uint8_t command)
guchar tmp_c;
sdi = sr_dev_inst_new(0, SR_ST_INACTIVE, NULL, NULL, NULL);
- sdi->driver = odi;
+ sdi->driver = di;
devc = ols_dev_new();
sdi->priv = devc;
return SR_ERR_MALLOC;
}
drvc->sr_ctx = sr_ctx;
- odi->priv = drvc;
+ di->priv = drvc;
return SR_OK;
}
char buf[8];
(void)options;
- drvc = odi->priv;
+ drvc = di->priv;
devices = NULL;
conn = serialcomm = NULL;
/* Not an OLS -- some other board that uses the sump protocol. */
sdi = sr_dev_inst_new(0, SR_ST_INACTIVE,
"Sump", "Logic Analyzer", "v1.0");
- sdi->driver = odi;
+ sdi->driver = di;
devc = ols_dev_new();
for (i = 0; i < 32; i++) {
if (!(probe = sr_probe_new(i, SR_PROBE_LOGIC, TRUE,
{
struct drv_context *drvc;
- drvc = odi->priv;
+ drvc = di->priv;
return drvc->instances;
}
struct dev_context *devc;
int ret = SR_OK;
- if (!(drvc = odi->priv))
+ if (!(drvc = di->priv))
return SR_OK;
/* Properly close and free all devices. */
int num_channels, offset, i, j;
unsigned char byte;
- drvc = odi->priv;
+ drvc = di->priv;
/* Find this device's devc struct by its fd. */
devc = NULL;
/* List of struct sr_dev_inst, maintained by dev_open()/dev_close(). */
SR_PRIV struct sr_dev_driver zeroplus_logic_cube_driver_info;
-static struct sr_dev_driver *zdi = &zeroplus_logic_cube_driver_info;
+static struct sr_dev_driver *di = &zeroplus_logic_cube_driver_info;
/*
* The hardware supports more samplerates than these, but these are the
struct drv_context *drvc;
struct dev_context *devc;
- drvc = zdi->priv;
+ drvc = di->priv;
for (l = drvc->instances; l; l = l->next) {
sdi = l->data;
if (!(devc = sdi->priv)) {
return SR_ERR_MALLOC;
}
drvc->sr_ctx = sr_ctx;
- zdi->priv = drvc;
+ di->priv = drvc;
return SR_OK;
}
(void)options;
- drvc = zdi->priv;
+ drvc = di->priv;
devices = NULL;
clear_instances();
sr_err("zp: %s: sr_dev_inst_new failed", __func__);
return NULL;
}
- sdi->driver = zdi;
+ sdi->driver = di;
/* Allocate memory for our private driver context. */
if (!(devc = g_try_malloc0(sizeof(struct dev_context)))) {
{
struct drv_context *drvc;
- drvc = zdi->priv;
+ drvc = di->priv;
return drvc->instances;
}
static int hw_dev_open(struct sr_dev_inst *sdi)
{
struct dev_context *devc;
- struct drv_context *drvc = zdi->priv;
+ struct drv_context *drvc = di->priv;
libusb_device **devlist, *dev;
struct libusb_device_descriptor des;
int device_count, ret, i;
{
struct drv_context *drvc;
- if (!(drvc = zdi->priv))
+ if (!(drvc = di->priv))
return SR_OK;
clear_instances();