X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=tests%2Flib.c;h=ad0b3e1f38a2c75b9faa043385801e3ce4cc322c;hb=00ebcbf48a775e56b6e73a39e69af390db547865;hp=faffc3a9f64d452c439736924772baf8ac29f7fa;hpb=17794067f96fd2b6f55b49bfcc2ce08e6edf57e5;p=libsigrok.git diff --git a/tests/lib.c b/tests/lib.c index faffc3a9..ad0b3e1f 100644 --- a/tests/lib.c +++ b/tests/lib.c @@ -211,21 +211,21 @@ void srtest_buf_to_file(const char *filename, const uint8_t *buf, uint64_t len) fclose(f); } -GArray *srtest_get_enabled_logic_probes(const struct sr_dev_inst *sdi) +GArray *srtest_get_enabled_logic_channels(const struct sr_dev_inst *sdi) { - struct sr_probe *probe; - GArray *probes; + struct sr_channel *ch; + GArray *channels; GSList *l; - probes = g_array_new(FALSE, FALSE, sizeof(int)); - for (l = sdi->probes; l; l = l->next) { - probe = l->data; - if (probe->type != SR_PROBE_LOGIC) + channels = g_array_new(FALSE, FALSE, sizeof(int)); + for (l = sdi->channels; l; l = l->next) { + ch = l->data; + if (ch->type != SR_CHANNEL_LOGIC) continue; - if (probe->enabled != TRUE) + if (ch->enabled != TRUE) continue; - g_array_append_val(probes, probe->index); + g_array_append_val(channels, ch->index); } - return probes; + return channels; }