X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=tests%2Flib.c;h=aca44deb94da0041848909626ec2635cc97e1c4b;hb=886413b6d2e26513bd73f5d89f8b1816eda800a8;hp=09b697e817024d8e4c28cadf0acb353f9c27338b;hpb=91aea754aaed0f0f2a6fc4b2b875f0d0b7c01f8e;p=libsigrok.git diff --git a/tests/lib.c b/tests/lib.c index 09b697e8..aca44deb 100644 --- a/tests/lib.c +++ b/tests/lib.c @@ -23,7 +23,7 @@ #include #include #include -#include "../libsigrok.h" +#include "../include/libsigrok/libsigrok.h" #include "lib.h" /* Get a libsigrok driver by name. */ @@ -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_channel *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; }