GSList *devices = NULL, *l;
const char *conn = NULL, *serialcomm = NULL;
uint8_t buf[292];
GSList *devices = NULL, *l;
const char *conn = NULL, *serialcomm = NULL;
uint8_t buf[292];
- if (!(sdi = sr_dev_inst_new(0, SR_ST_INACTIVE, "EDF", "Teleinfo", "")))
+ if (!(sdi = sr_dev_inst_new(0, SR_ST_INACTIVE, "EDF", "Teleinfo", NULL)))
- if (!(probe = sr_probe_new(0, SR_PROBE_ANALOG, TRUE, "P")))
+ if (!(ch = sr_channel_new(0, SR_CHANNEL_ANALOG, TRUE, "P")))
- if (!(probe = sr_probe_new(0, SR_PROBE_ANALOG, TRUE, "BASE")))
+ if (!(ch = sr_channel_new(0, SR_CHANNEL_ANALOG, TRUE, "BASE")))
- if (!(probe = sr_probe_new(0, SR_PROBE_ANALOG, TRUE, "HP")))
+ if (!(ch = sr_channel_new(0, SR_CHANNEL_ANALOG, TRUE, "HP")))
- sdi->probes = g_slist_append(sdi->probes, probe);
- if (!(probe = sr_probe_new(0, SR_PROBE_ANALOG, TRUE, "HC")))
+ sdi->channels = g_slist_append(sdi->channels, ch);
+ if (!(ch = sr_channel_new(0, SR_CHANNEL_ANALOG, TRUE, "HC")))
- if (!(probe = sr_probe_new(0, SR_PROBE_ANALOG, TRUE, "HN")))
+ if (!(ch = sr_channel_new(0, SR_CHANNEL_ANALOG, TRUE, "HN")))
- sdi->probes = g_slist_append(sdi->probes, probe);
- if (!(probe = sr_probe_new(0, SR_PROBE_ANALOG, TRUE, "HPM")))
+ sdi->channels = g_slist_append(sdi->channels, ch);
+ if (!(ch = sr_channel_new(0, SR_CHANNEL_ANALOG, TRUE, "HPM")))
- if (!(probe = sr_probe_new(0, SR_PROBE_ANALOG, TRUE, "HPJB")))
+ if (!(ch = sr_channel_new(0, SR_CHANNEL_ANALOG, TRUE, "HPJB")))
- sdi->probes = g_slist_append(sdi->probes, probe);
- if (!(probe = sr_probe_new(0, SR_PROBE_ANALOG, TRUE, "HPJW")))
+ sdi->channels = g_slist_append(sdi->channels, ch);
+ if (!(ch = sr_channel_new(0, SR_CHANNEL_ANALOG, TRUE, "HPJW")))
- sdi->probes = g_slist_append(sdi->probes, probe);
- if (!(probe = sr_probe_new(0, SR_PROBE_ANALOG, TRUE, "HPJR")))
+ sdi->channels = g_slist_append(sdi->channels, ch);
+ if (!(ch = sr_channel_new(0, SR_CHANNEL_ANALOG, TRUE, "HPJR")))
- sdi->probes = g_slist_append(sdi->probes, probe);
- if (!(probe = sr_probe_new(0, SR_PROBE_ANALOG, TRUE, "HCJB")))
+ sdi->channels = g_slist_append(sdi->channels, ch);
+ if (!(ch = sr_channel_new(0, SR_CHANNEL_ANALOG, TRUE, "HCJB")))
- sdi->probes = g_slist_append(sdi->probes, probe);
- if (!(probe = sr_probe_new(0, SR_PROBE_ANALOG, TRUE, "HCJW")))
+ sdi->channels = g_slist_append(sdi->channels, ch);
+ if (!(ch = sr_channel_new(0, SR_CHANNEL_ANALOG, TRUE, "HCJW")))
- sdi->probes = g_slist_append(sdi->probes, probe);
- if (!(probe = sr_probe_new(0, SR_PROBE_ANALOG, TRUE, "HCJR")))
+ sdi->channels = g_slist_append(sdi->channels, ch);
+ if (!(ch = sr_channel_new(0, SR_CHANNEL_ANALOG, TRUE, "HCJR")))
- if (!(probe = sr_probe_new(0, SR_PROBE_ANALOG, TRUE, "IINST")))
+ if (!(ch = sr_channel_new(0, SR_CHANNEL_ANALOG, TRUE, "IINST")))
- if (!(probe = sr_probe_new(0, SR_PROBE_ANALOG, TRUE, "PAPP")))
+ if (!(ch = sr_channel_new(0, SR_CHANNEL_ANALOG, TRUE, "PAPP")))
drvc->instances = g_slist_append(drvc->instances, sdi);
devices = g_slist_append(devices, sdi);
drvc->instances = g_slist_append(drvc->instances, sdi);
devices = g_slist_append(devices, sdi);
}
static int config_set(int key, GVariant *data, const struct sr_dev_inst *sdi,
}
static int config_set(int key, GVariant *data, const struct sr_dev_inst *sdi,
}
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,
- return std_serial_dev_acquisition_stop(sdi, cb_data, std_serial_dev_close,
- sdi->conn, LOG_PREFIX);
+ return std_serial_dev_acquisition_stop(sdi, cb_data,
+ std_serial_dev_close, sdi->conn, LOG_PREFIX);
.config_set = config_set,
.config_list = config_list,
.dev_open = std_serial_dev_open,
.dev_close = std_serial_dev_close,
.dev_acquisition_start = dev_acquisition_start,
.dev_acquisition_stop = dev_acquisition_stop,
.config_set = config_set,
.config_list = config_list,
.dev_open = std_serial_dev_open,
.dev_close = std_serial_dev_close,
.dev_acquisition_start = dev_acquisition_start,
.dev_acquisition_stop = dev_acquisition_stop,