SR_CONF_CONTINUOUS, // TODO?
};
-/* Probes are numbered 1-9. */
-static const char *probe_names[] = {
+/* Channels are numbered 1-9. */
+static const char *channel_names[] = {
"1", "2", "3", "4", "5", "6", "7", "8", "9",
NULL,
};
static GSList *scan(GSList *options)
{
struct sr_dev_inst *sdi;
- struct sr_probe *probe;
+ struct sr_channel *ch;
struct drv_context *drvc;
struct dev_context *devc;
GSList *devices;
sdi->driver = di;
sdi->priv = devc;
- for (i = 0; probe_names[i]; i++) {
- if (!(probe = sr_probe_new(i, SR_PROBE_LOGIC, TRUE,
- probe_names[i])))
+ for (i = 0; channel_names[i]; i++) {
+ if (!(ch = sr_channel_new(i, SR_PROBE_LOGIC, TRUE,
+ channel_names[i])))
return NULL;
- sdi->probes = g_slist_append(sdi->probes, probe);
+ sdi->channels = g_slist_append(sdi->channels, ch);
}
devices = g_slist_append(devices, sdi);
return dev_clear();
}
-static int config_get(int id, GVariant **data, const struct sr_dev_inst *sdi)
+static int config_get(int id, GVariant **data, const struct sr_dev_inst *sdi,
+ const struct sr_channel_group *cg)
{
(void)sdi;
+ (void)cg;
switch (id) {
case SR_CONF_SAMPLERATE:
return SR_OK;
}
-static int config_set(int id, GVariant *data, const struct sr_dev_inst *sdi)
+static int config_set(int id, GVariant *data, const struct sr_dev_inst *sdi,
+ const struct sr_channel_group *cg)
{
struct dev_context *devc;
+ (void)cg;
+
if (sdi->status != SR_ST_ACTIVE)
return SR_ERR_DEV_CLOSED;
return SR_OK;
}
-static int config_list(int key, GVariant **data, const struct sr_dev_inst *sdi)
+static int config_list(int key, GVariant **data, const struct sr_dev_inst *sdi,
+ const struct sr_channel_group *cg)
{
GVariant *gvar;
GVariantBuilder gvb;
(void)sdi;
+ (void)cg;
switch (key) {
case SR_CONF_DEVICE_OPTIONS:
if (!devc->ftdic)
return SR_ERR_BUG;
- /* TODO: Configure probes later (thresholds etc.). */
+ /* TODO: Configure channels later (thresholds etc.). */
devc->cb_data = cb_data;