This fixes parts of bug #259.
*
* @return NULL (failure) or new struct sr_channel*.
*/
-SR_PRIV struct sr_channel *sr_probe_new(int index, int type,
+SR_PRIV struct sr_channel *sr_channel_new(int index, int type,
gboolean enabled, const char *name)
{
struct sr_channel *ch;
sdi->conn = serial;
sdi->priv = devc;
sdi->driver = di;
- if (!(ch = sr_probe_new(0, SR_PROBE_ANALOG, TRUE, "P1")))
+ if (!(ch = sr_channel_new(0, SR_PROBE_ANALOG, TRUE, "P1")))
return NULL;
sdi->channels = g_slist_append(sdi->channels, ch);
drvc->instances = g_slist_append(drvc->instances, sdi);
for (i = 0; i < devc->num_channels; i++) {
snprintf(p_name, sizeof(p_name), "Ch_%d", i);
- if (!(ch = sr_probe_new(i, SR_PROBE_ANALOG, TRUE, p_name)))
+ if (!(ch = sr_channel_new(i, SR_PROBE_ANALOG, TRUE, p_name)))
goto scan_error_cleanup;
sdi->channels = g_slist_append(sdi->channels, ch);
}
sdi->priv = devc;
sdi->driver = di;
- if (!(ch = sr_probe_new(0, SR_PROBE_ANALOG, TRUE, "T1")))
+ if (!(ch = sr_channel_new(0, SR_PROBE_ANALOG, TRUE, "T1")))
goto scan_cleanup;
sdi->channels = g_slist_append(sdi->channels, ch);
- if (!(ch = sr_probe_new(0, SR_PROBE_ANALOG, TRUE, "T2")))
+ if (!(ch = sr_channel_new(0, SR_PROBE_ANALOG, TRUE, "T2")))
goto scan_cleanup;
sdi->channels = g_slist_append(sdi->channels, ch);
sdi->driver = di;
for (i = 0; channel_names[i]; i++) {
- if (!(ch = sr_probe_new(i, SR_PROBE_LOGIC, TRUE,
+ if (!(ch = sr_channel_new(i, SR_PROBE_LOGIC, TRUE,
channel_names[i])))
return NULL;
sdi->channels = g_slist_append(sdi->channels, ch);
sdi->conn = serial;
for (i = 0; i < MAX_CHANNELS; i++) {
snprintf(channel, 10, "CH%d", i + 1);
- ch = sr_probe_new(i, SR_PROBE_ANALOG, TRUE, channel);
+ ch = sr_channel_new(i, SR_PROBE_ANALOG, TRUE, channel);
sdi->channels = g_slist_append(sdi->channels, ch);
cg = g_malloc(sizeof(struct sr_channel_group));
cg->name = g_strdup(channel);
sdi->priv = devc;
sdi->driver = di;
- if (!(ch = sr_probe_new(0, SR_PROBE_ANALOG, TRUE, "P1")))
+ if (!(ch = sr_channel_new(0, SR_PROBE_ANALOG, TRUE, "P1")))
return NULL;
sdi->channels = g_slist_append(sdi->channels, ch);
- if (!(ch = sr_probe_new(0, SR_PROBE_ANALOG, TRUE, "P2")))
+ if (!(ch = sr_channel_new(0, SR_PROBE_ANALOG, TRUE, "P2")))
return NULL;
sdi->channels = g_slist_append(sdi->channels, ch);
sdi->priv = devc;
sdi->driver = di;
- if (!(ch = sr_probe_new(0, SR_PROBE_ANALOG, TRUE, "P1")))
+ if (!(ch = sr_channel_new(0, SR_PROBE_ANALOG, TRUE, "P1")))
goto scan_cleanup;
sdi->channels = g_slist_append(sdi->channels, ch);
sdi->inst_type = SR_INST_SERIAL;
sdi->priv = devc;
sdi->driver = di;
- if (!(ch = sr_probe_new(0, SR_PROBE_ANALOG, TRUE, "SPL")))
+ if (!(ch = sr_channel_new(0, SR_PROBE_ANALOG, TRUE, "SPL")))
return NULL;
sdi->channels = g_slist_append(sdi->channels, ch);
drvc->instances = g_slist_append(drvc->instances, sdi);
sdi->driver = center_devs[idx].di;
for (i = 0; i < center_devs[idx].num_channels; i++) {
- if (!(ch = sr_probe_new(i, SR_PROBE_ANALOG,
+ if (!(ch = sr_channel_new(i, SR_PROBE_ANALOG,
TRUE, channel_names[i])))
goto scan_cleanup;
sdi->channels = g_slist_append(sdi->channels, ch);
sdi->priv = devc;
for (i = 0; chronovu_la8_channel_names[i]; i++) {
- if (!(ch = sr_probe_new(i, SR_PROBE_LOGIC, TRUE,
+ if (!(ch = sr_channel_new(i, SR_PROBE_LOGIC, TRUE,
chronovu_la8_channel_names[i])))
return NULL;
sdi->channels = g_slist_append(sdi->channels, ch);
sdi->inst_type = SR_INST_SERIAL;
sdi->priv = devc;
sdi->driver = di;
- if (!(ch = sr_probe_new(0, SR_PROBE_ANALOG, TRUE, "P1")))
+ if (!(ch = sr_channel_new(0, SR_PROBE_ANALOG, TRUE, "P1")))
return NULL;
sdi->channels = g_slist_append(sdi->channels, ch);
drvc->instances = g_slist_append(drvc->instances, sdi);
sdi->conn = serial;
sdi->priv = NULL;
sdi->driver = di;
- if (!(ch = sr_probe_new(0, SR_PROBE_ANALOG, TRUE, "CH1")))
+ if (!(ch = sr_channel_new(0, SR_PROBE_ANALOG, TRUE, "CH1")))
return NULL;
sdi->channels = g_slist_append(sdi->channels, ch);
cg->priv = NULL;
for (i = 0; i < num_logic_channels; i++) {
sprintf(channel_name, "D%d", i);
- if (!(ch = sr_probe_new(i, SR_PROBE_LOGIC, TRUE, channel_name)))
+ if (!(ch = sr_channel_new(i, SR_PROBE_LOGIC, TRUE, channel_name)))
return NULL;
sdi->channels = g_slist_append(sdi->channels, ch);
cg->channels = g_slist_append(cg->channels, ch);
pattern = 0;
for (i = 0; i < num_analog_channels; i++) {
sprintf(channel_name, "A%d", i);
- if (!(ch = sr_probe_new(i + num_logic_channels,
+ if (!(ch = sr_channel_new(i + num_logic_channels,
SR_PROBE_ANALOG, TRUE, channel_name)))
return NULL;
sdi->channels = g_slist_append(sdi->channels, ch);
sdi->conn = serial;
sdi->priv = devc;
sdi->driver = di;
- if (!(ch = sr_probe_new(0, SR_PROBE_ANALOG, TRUE, "P1")))
+ if (!(ch = sr_channel_new(0, SR_PROBE_ANALOG, TRUE, "P1")))
return NULL;
sdi->channels = g_slist_append(sdi->channels, ch);
drvc->instances = g_slist_append(drvc->instances, sdi);
/* Fill in channellist according to this device's profile. */
num_logic_channels = prof->dev_caps & DEV_CAPS_16BIT ? 16 : 8;
for (j = 0; j < num_logic_channels; j++) {
- if (!(ch = sr_probe_new(j, SR_PROBE_LOGIC, TRUE,
+ if (!(ch = sr_channel_new(j, SR_PROBE_LOGIC, TRUE,
channel_names[j])))
return NULL;
sdi->channels = g_slist_append(sdi->channels, ch);
sdi->conn = serial;
sdi->priv = devc;
sdi->driver = &gmc_mh_1x_2x_rs232_driver_info;
- if (!(ch = sr_probe_new(0, SR_PROBE_ANALOG, TRUE, "P1")))
+ if (!(ch = sr_channel_new(0, SR_PROBE_ANALOG, TRUE, "P1")))
return NULL;
sdi->channels = g_slist_append(sdi->channels, ch);
drvc->instances = g_slist_append(drvc->instances, sdi);
sdi->conn = serial;
sdi->priv = devc;
sdi->driver = &gmc_mh_2x_bd232_driver_info;
- if (!(ch = sr_probe_new(0, SR_PROBE_ANALOG, TRUE, "P1")))
+ if (!(ch = sr_channel_new(0, SR_PROBE_ANALOG, TRUE, "P1")))
goto exit_err;
sdi->channels = g_slist_append(sdi->channels, ch);
drvc->instances = g_slist_append(drvc->instances, sdi);
/* Add analog channels. */
for (i = 0; i < scope_models[model_index].analog_channels; i++) {
- if (!(ch = sr_probe_new(i, SR_PROBE_ANALOG, TRUE,
+ if (!(ch = sr_channel_new(i, SR_PROBE_ANALOG, TRUE,
(*scope_models[model_index].analog_names)[i])))
return SR_ERR_MALLOC;
sdi->channels = g_slist_append(sdi->channels, ch);
/* Add digital channels. */
for (i = 0; i < scope_models[model_index].digital_channels; i++) {
- if (!(ch = sr_probe_new(i, SR_PROBE_LOGIC, TRUE,
+ if (!(ch = sr_channel_new(i, SR_PROBE_LOGIC, TRUE,
(*scope_models[model_index].digital_names)[i])))
return SR_ERR_MALLOC;
sdi->channels = g_slist_append(sdi->channels, ch);
* a trigger source internal to the device.
*/
for (i = 0; channel_names[i]; i++) {
- if (!(ch = sr_probe_new(i, SR_PROBE_ANALOG, TRUE,
+ if (!(ch = sr_channel_new(i, SR_PROBE_ANALOG, TRUE,
channel_names[i])))
return NULL;
sdi->channels = g_slist_append(sdi->channels, ch);
sdi->conn = usb;
for (i = 0; channel_names[i]; i++) {
- ch = sr_probe_new(i, SR_PROBE_LOGIC, TRUE,
+ ch = sr_channel_new(i, SR_PROBE_LOGIC, TRUE,
channel_names[i]);
sdi->channels = g_slist_append(sdi->channels, ch);
devc->channels[i] = ch;
sdi->priv = devc;
for (i = 0; channel_names[i]; i++) {
- if (!(ch = sr_probe_new(i, SR_PROBE_LOGIC, TRUE,
+ if (!(ch = sr_channel_new(i, SR_PROBE_LOGIC, TRUE,
channel_names[i])))
return NULL;
sdi->channels = g_slist_append(sdi->channels, ch);
sdi->driver = di;
sdi->inst_type = SR_INST_USB;
sdi->conn = l->data;
- if (!(ch = sr_probe_new(0, SR_PROBE_ANALOG, TRUE, "SPL")))
+ if (!(ch = sr_channel_new(0, SR_PROBE_ANALOG, TRUE, "SPL")))
return NULL;
sdi->channels = g_slist_append(sdi->channels, ch);
if (profile->logformat == LOG_TEMP_RH) {
/* Model this as two channels: temperature and humidity. */
- if (!(ch = sr_probe_new(0, SR_PROBE_ANALOG, TRUE, "Temp")))
+ if (!(ch = sr_channel_new(0, SR_PROBE_ANALOG, TRUE, "Temp")))
return NULL;
sdi->channels = g_slist_append(NULL, ch);
- if (!(ch = sr_probe_new(0, SR_PROBE_ANALOG, TRUE, "Hum")))
+ if (!(ch = sr_channel_new(0, SR_PROBE_ANALOG, TRUE, "Hum")))
return NULL;
sdi->channels = g_slist_append(sdi->channels, ch);
} else if (profile->logformat == LOG_CO) {
- if (!(ch = sr_probe_new(0, SR_PROBE_ANALOG, TRUE, "CO")))
+ if (!(ch = sr_channel_new(0, SR_PROBE_ANALOG, TRUE, "CO")))
return NULL;
sdi->channels = g_slist_append(NULL, ch);
} else {
- if (!(ch = sr_probe_new(0, SR_PROBE_ANALOG, TRUE, "P1")))
+ if (!(ch = sr_channel_new(0, SR_PROBE_ANALOG, TRUE, "P1")))
return NULL;
sdi->channels = g_slist_append(NULL, ch);
}
for (i = 0; i < NUM_PROBES; i++) {
struct sr_channel *ch;
ptype = (i == 0) ? SR_PROBE_ANALOG : SR_PROBE_LOGIC;
- if (!(ch = sr_probe_new(i, ptype, TRUE,
+ if (!(ch = sr_channel_new(i, ptype, TRUE,
mso19_channel_names[i])))
return 0;
sdi->channels = g_slist_append(sdi->channels, ch);
sdi->priv = devc;
sdi->driver = mic_devs[idx].di;
- if (!(ch = sr_probe_new(0, SR_PROBE_ANALOG, TRUE, "Temperature")))
+ if (!(ch = sr_channel_new(0, SR_PROBE_ANALOG, TRUE, "Temperature")))
goto scan_cleanup;
sdi->channels = g_slist_append(sdi->channels, ch);
if (mic_devs[idx].has_humidity) {
- if (!(ch = sr_probe_new(1, SR_PROBE_ANALOG, TRUE, "Humidity")))
+ if (!(ch = sr_channel_new(1, SR_PROBE_ANALOG, TRUE, "Humidity")))
goto scan_cleanup;
sdi->channels = g_slist_append(sdi->channels, ch);
}
sdi->conn = serial;
sdi->priv = devc;
sdi->driver = di;
- if (!(ch = sr_probe_new(0, SR_PROBE_ANALOG, TRUE,
+ if (!(ch = sr_channel_new(0, SR_PROBE_ANALOG, TRUE,
"P1")))
return NULL;
sdi->channels = g_slist_append(sdi->channels, ch);
"Sump", "Logic Analyzer", "v1.0");
sdi->driver = di;
for (i = 0; i < 32; i++) {
- if (!(ch = sr_probe_new(i, SR_PROBE_LOGIC, TRUE,
+ if (!(ch = sr_channel_new(i, SR_PROBE_LOGIC, TRUE,
ols_channel_names[i])))
return 0;
sdi->channels = g_slist_append(sdi->channels, ch);
case 0x00:
/* Number of usable channels */
for (ui = 0; ui < tmp_int; ui++) {
- if (!(ch = sr_probe_new(ui, SR_PROBE_LOGIC, TRUE,
+ if (!(ch = sr_channel_new(ui, SR_PROBE_LOGIC, TRUE,
ols_channel_names[ui])))
return 0;
sdi->channels = g_slist_append(sdi->channels, ch);
case 0x00:
/* Number of usable channels */
for (ui = 0; ui < tmp_c; ui++) {
- if (!(ch = sr_probe_new(ui, SR_PROBE_LOGIC, TRUE,
+ if (!(ch = sr_channel_new(ui, SR_PROBE_LOGIC, TRUE,
ols_channel_names[ui])))
return 0;
sdi->channels = g_slist_append(sdi->channels, ch);
for (i = 0; i < model->analog_channels; i++) {
if (!(channel_name = g_strdup_printf("CH%d", i + 1)))
return NULL;
- ch = sr_probe_new(i, SR_PROBE_ANALOG, TRUE, channel_name);
+ ch = sr_channel_new(i, SR_PROBE_ANALOG, TRUE, channel_name);
sdi->channels = g_slist_append(sdi->channels, ch);
devc->analog_groups[i].name = channel_name;
devc->analog_groups[i].channels = g_slist_append(NULL, ch);
for (i = 0; i < 16; i++) {
if (!(channel_name = g_strdup_printf("D%d", i)))
return NULL;
- ch = sr_probe_new(i, SR_PROBE_LOGIC, TRUE, channel_name);
+ ch = sr_channel_new(i, SR_PROBE_LOGIC, TRUE, channel_name);
g_free(channel_name);
if (!ch)
return NULL;
sdi->driver = di;
for (j = 0; channel_names[j]; j++) {
- if (!(ch = sr_probe_new(j, SR_PROBE_LOGIC, TRUE,
+ if (!(ch = sr_channel_new(j, SR_PROBE_LOGIC, TRUE,
channel_names[j])))
return NULL;
sdi->channels = g_slist_append(sdi->channels, ch);
sdi->priv = devc;
sdi->driver = dmms[dmm].di;
- if (!(ch = sr_probe_new(0, SR_PROBE_ANALOG, TRUE, "P1")))
+ if (!(ch = sr_channel_new(0, SR_PROBE_ANALOG, TRUE, "P1")))
goto scan_cleanup;
sdi->channels = g_slist_append(sdi->channels, ch);
drvc->instances = g_slist_append(drvc->instances, sdi);
/* The LWLA series simply number channels from CH1 to CHxx. */
g_snprintf(name, sizeof(name), "CH%d", i);
- ch = sr_probe_new(i - 1, SR_PROBE_LOGIC, TRUE, name);
+ ch = sr_channel_new(i - 1, SR_PROBE_LOGIC, TRUE, name);
list = g_slist_prepend(list, ch);
}
sdi->priv = devc;
sdi->driver = di;
- if (!(ch = sr_probe_new(0, SR_PROBE_ANALOG, TRUE, "P")))
+ if (!(ch = sr_channel_new(0, SR_PROBE_ANALOG, TRUE, "P")))
goto scan_cleanup;
sdi->channels = g_slist_append(sdi->channels, ch);
if (devc->optarif == OPTARIF_BASE) {
- if (!(ch = sr_probe_new(0, SR_PROBE_ANALOG, TRUE, "BASE")))
+ if (!(ch = sr_channel_new(0, SR_PROBE_ANALOG, TRUE, "BASE")))
goto scan_cleanup;
sdi->channels = g_slist_append(sdi->channels, ch);
} else if (devc->optarif == OPTARIF_HC) {
- if (!(ch = sr_probe_new(0, SR_PROBE_ANALOG, TRUE, "HP")))
+ if (!(ch = sr_channel_new(0, SR_PROBE_ANALOG, TRUE, "HP")))
goto scan_cleanup;
sdi->channels = g_slist_append(sdi->channels, ch);
- if (!(ch = sr_probe_new(0, SR_PROBE_ANALOG, TRUE, "HC")))
+ if (!(ch = sr_channel_new(0, SR_PROBE_ANALOG, TRUE, "HC")))
goto scan_cleanup;
sdi->channels = g_slist_append(sdi->channels, ch);
} else if (devc->optarif == OPTARIF_EJP) {
- if (!(ch = sr_probe_new(0, SR_PROBE_ANALOG, TRUE, "HN")))
+ if (!(ch = sr_channel_new(0, SR_PROBE_ANALOG, TRUE, "HN")))
goto scan_cleanup;
sdi->channels = g_slist_append(sdi->channels, ch);
- if (!(ch = sr_probe_new(0, SR_PROBE_ANALOG, TRUE, "HPM")))
+ if (!(ch = sr_channel_new(0, SR_PROBE_ANALOG, TRUE, "HPM")))
goto scan_cleanup;
sdi->channels = g_slist_append(sdi->channels, ch);
} else if (devc->optarif == OPTARIF_BBR) {
- if (!(ch = sr_probe_new(0, SR_PROBE_ANALOG, TRUE, "HPJB")))
+ if (!(ch = sr_channel_new(0, SR_PROBE_ANALOG, TRUE, "HPJB")))
goto scan_cleanup;
sdi->channels = g_slist_append(sdi->channels, ch);
- if (!(ch = sr_probe_new(0, SR_PROBE_ANALOG, TRUE, "HPJW")))
+ if (!(ch = sr_channel_new(0, SR_PROBE_ANALOG, TRUE, "HPJW")))
goto scan_cleanup;
sdi->channels = g_slist_append(sdi->channels, ch);
- if (!(ch = sr_probe_new(0, SR_PROBE_ANALOG, TRUE, "HPJR")))
+ if (!(ch = sr_channel_new(0, SR_PROBE_ANALOG, TRUE, "HPJR")))
goto scan_cleanup;
sdi->channels = g_slist_append(sdi->channels, ch);
- if (!(ch = sr_probe_new(0, SR_PROBE_ANALOG, TRUE, "HCJB")))
+ if (!(ch = sr_channel_new(0, SR_PROBE_ANALOG, TRUE, "HCJB")))
goto scan_cleanup;
sdi->channels = g_slist_append(sdi->channels, ch);
- if (!(ch = sr_probe_new(0, SR_PROBE_ANALOG, TRUE, "HCJW")))
+ if (!(ch = sr_channel_new(0, SR_PROBE_ANALOG, TRUE, "HCJW")))
goto scan_cleanup;
sdi->channels = g_slist_append(sdi->channels, ch);
- if (!(ch = sr_probe_new(0, SR_PROBE_ANALOG, TRUE, "HCJR")))
+ if (!(ch = sr_channel_new(0, SR_PROBE_ANALOG, TRUE, "HCJR")))
goto scan_cleanup;
sdi->channels = g_slist_append(sdi->channels, ch);
}
- if (!(ch = sr_probe_new(0, SR_PROBE_ANALOG, TRUE, "IINST")))
+ if (!(ch = sr_channel_new(0, SR_PROBE_ANALOG, TRUE, "IINST")))
goto scan_cleanup;
sdi->channels = g_slist_append(sdi->channels, ch);
- if (!(ch = sr_probe_new(0, SR_PROBE_ANALOG, TRUE, "PAPP")))
+ if (!(ch = sr_channel_new(0, SR_PROBE_ANALOG, TRUE, "PAPP")))
goto scan_cleanup;
sdi->channels = g_slist_append(sdi->channels, ch);
sdi->priv = devc;
sdi->driver = di;
- ch = sr_probe_new(0, SR_PROBE_ANALOG, TRUE, "P1");
+ ch = sr_channel_new(0, SR_PROBE_ANALOG, TRUE, "P1");
if (!ch) {
sr_err("Failed to create channel.");
return NULL;
}
sdi->priv = devc;
sdi->driver = udmms[dmm].di;
- if (!(ch = sr_probe_new(0, SR_PROBE_ANALOG, TRUE, "P1")))
+ if (!(ch = sr_channel_new(0, SR_PROBE_ANALOG, TRUE, "P1")))
return NULL;
sdi->channels = g_slist_append(sdi->channels, ch);
sdi->inst_type = SR_INST_USB;
sdi->conn = l->data;
for (i = 0; i < 3; i++) {
- if (!(ch = sr_probe_new(i, SR_PROBE_ANALOG, TRUE,
+ if (!(ch = sr_channel_new(i, SR_PROBE_ANALOG, TRUE,
channels[i]))) {
sr_dbg("Channel malloc failed.");
return NULL;
return NULL;
sdi->priv = devc;
- if (!(ch = sr_probe_new(0, SR_PROBE_ANALOG, TRUE, "P1")))
+ if (!(ch = sr_channel_new(0, SR_PROBE_ANALOG, TRUE, "P1")))
return NULL;
sdi->channels = g_slist_append(NULL, ch);
/* Fill in channellist according to this device's profile. */
for (j = 0; j < devc->num_channels; j++) {
- if (!(ch = sr_probe_new(j, SR_PROBE_LOGIC, TRUE,
+ if (!(ch = sr_channel_new(j, SR_PROBE_LOGIC, TRUE,
channel_names[j])))
return NULL;
sdi->channels = g_slist_append(sdi->channels, ch);
for (i = 0; i < num_channels; i++) {
snprintf(name, SR_MAX_PROBENAME_LEN, "%d", i);
/* TODO: Check return value. */
- if (!(ch = sr_probe_new(i, SR_PROBE_LOGIC, TRUE, name)))
+ if (!(ch = sr_channel_new(i, SR_PROBE_LOGIC, TRUE, name)))
return SR_ERR;
in->sdi->channels = g_slist_append(in->sdi->channels, ch);
}
for (i = 0; i < num_channels; i++) {
snprintf(name, SR_MAX_PROBENAME_LEN, "%d", i);
/* TODO: Check return value. */
- if (!(ch = sr_probe_new(i, SR_PROBE_LOGIC, TRUE, name)))
+ if (!(ch = sr_channel_new(i, SR_PROBE_LOGIC, TRUE, name)))
return SR_ERR;
in->sdi->channels = g_slist_append(in->sdi->channels, ch);
}
else
snprintf(channel_name, sizeof(channel_name), "%zu", i);
- ch = sr_probe_new(i, SR_PROBE_LOGIC, TRUE, channel_name);
+ ch = sr_channel_new(i, SR_PROBE_LOGIC, TRUE, channel_name);
if (!ch) {
sr_err("Channel creation failed.");
for (i = 0; i < num_channels; i++) {
snprintf(name, SR_MAX_PROBENAME_LEN, "%d", i);
- if (!(ch = sr_probe_new(i, SR_PROBE_LOGIC, TRUE, name))) {
+ if (!(ch = sr_channel_new(i, SR_PROBE_LOGIC, TRUE, name))) {
release_context(ctx);
return SR_ERR;
}
for (i = 0; i < ctx->num_channels; i++) {
snprintf(channelname, 8, "CH%d", i + 1);
- if (!(ch = sr_probe_new(0, SR_PROBE_ANALOG, TRUE, channelname)))
+ if (!(ch = sr_channel_new(0, SR_PROBE_ANALOG, TRUE, channelname)))
return SR_ERR;
in->sdi->channels = g_slist_append(in->sdi->channels, ch);
}
SR_PROBE_SET_TRIGGER = 1 << 1,
};
-SR_PRIV struct sr_channel *sr_probe_new(int index, int type,
+SR_PRIV struct sr_channel *sr_channel_new(int index, int type,
gboolean enabled, const char *name);
/* Generic device instances */
g_variant_new_uint64(total_channels), sdi, NULL);
for (p = 0; p < total_channels; p++) {
snprintf(channelname, SR_MAX_PROBENAME_LEN, "%" PRIu64, p);
- if (!(ch = sr_probe_new(p, SR_PROBE_LOGIC, TRUE,
+ if (!(ch = sr_channel_new(p, SR_PROBE_LOGIC, TRUE,
channelname)))
return SR_ERR;
sdi->channels = g_slist_append(sdi->channels, ch);