return sdi;
}
-static int configure_probes(struct dev_context *devc, const GSList *probes)
+static int configure_probes(const struct sr_dev_inst *sdi)
{
+ struct dev_context *devc;
const struct sr_probe *probe;
const GSList *l;
+ devc = sdi->priv;
+
devc->ch1_enabled = devc->ch2_enabled = FALSE;
- for (l = probes; l; l = l->next) {
+ for (l = sdi->probes; l; l = l->next) {
probe = (struct sr_probe *)l->data;
if (probe->index == 0)
devc->ch1_enabled = probe->enabled;
case SR_HWCAP_LIMIT_FRAMES:
devc->limit_frames = *(const uint64_t *)value;
break;
- case SR_HWCAP_PROBECONFIG:
- ret = configure_probes(devc, (const GSList *)value);
- break;
case SR_HWCAP_TRIGGER_SLOPE:
tmp_u64 = *(const int *)value;
if (tmp_u64 != SLOPE_NEGATIVE && tmp_u64 != SLOPE_POSITIVE)
devc = sdi->priv;
devc->cb_data = cb_data;
+ if (configure_probes(sdi) != SR_OK) {
+ sr_err("hantek-dso: failed to configured probes");
+ return SR_ERR;
+ }
+
if (dso_init(devc) != SR_OK)
return SR_ERR;