SR_CONF_DATA_SOURCE,
};
-static char *probes[] = {
+static char *channels[] = {
"T1",
"T2",
"T1-T2",
struct drv_context *drvc;
struct dev_context *devc;
struct sr_dev_inst *sdi;
- struct sr_probe *probe;
+ struct sr_channel *ch;
struct sr_config *src;
GSList *usb_devices, *devices, *l;
int i;
sdi->inst_type = SR_INST_USB;
sdi->conn = l->data;
for (i = 0; i < 3; i++) {
- if (!(probe = sr_probe_new(i, SR_PROBE_ANALOG, TRUE,
- probes[i]))) {
- sr_dbg("Probe malloc failed.");
+ if (!(ch = sr_channel_new(i, SR_CHANNEL_ANALOG, TRUE,
+ channels[i]))) {
+ sr_dbg("Channel malloc failed.");
return NULL;
}
- sdi->probes = g_slist_append(sdi->probes, probe);
+ sdi->channels = g_slist_append(sdi->channels, ch);
}
if (!(devc = g_try_malloc(sizeof(struct dev_context)))) {
return ((struct drv_context *)(di->priv))->instances;
}
-static int dev_clear(void)
-{
- return std_dev_clear(di, NULL);
-}
-
static int dev_open(struct sr_dev_inst *sdi)
{
struct drv_context *drvc;
/* Can get called on an unused driver, doesn't matter. */
return SR_OK;
- ret = dev_clear();
+
+ ret = std_dev_clear(di, NULL);
g_free(drvc);
di->priv = NULL;
}
static int config_get(int key, GVariant **data, const struct sr_dev_inst *sdi,
- const struct sr_probe_group *probe_group)
+ const struct sr_channel_group *cg)
{
struct dev_context *devc;
- (void)probe_group;
+ (void)cg;
devc = sdi->priv;
switch (key) {
}
static int config_set(int key, GVariant *data, const struct sr_dev_inst *sdi,
- const struct sr_probe_group *probe_group)
+ const struct sr_channel_group *cg)
{
struct dev_context *devc;
int ret;
const char *tmp_str;
- (void)probe_group;
+ (void)cg;
if (sdi->status != SR_ST_ACTIVE)
return SR_ERR_DEV_CLOSED;
}
static int config_list(int key, GVariant **data, const struct sr_dev_inst *sdi,
- const struct sr_probe_group *probe_group)
+ const struct sr_channel_group *cg)
{
(void)sdi;
- (void)probe_group;
+ (void)cg;
switch (key) {
case SR_CONF_DEVICE_OPTIONS:
.cleanup = cleanup,
.scan = scan,
.dev_list = dev_list,
- .dev_clear = dev_clear,
+ .dev_clear = NULL,
.config_get = config_get,
.config_set = config_set,
.config_list = config_list,