]> sigrok.org Git - libsigrok.git/commitdiff
A few more random 'probe' to 'channel' changes.
authorUwe Hermann <redacted>
Mon, 24 Mar 2014 15:11:45 +0000 (16:11 +0100)
committerUwe Hermann <redacted>
Tue, 25 Mar 2014 19:58:54 +0000 (20:58 +0100)
This fixes parts of bug #259.

13 files changed:
filter.c
hardware/chronovu-la8/protocol.c
hardware/link-mso19/api.c
hwdriver.c
libsigrok-internal.h
libsigrok.h
output/text/ascii.c
output/text/bits.c
proto.h
session_driver.c
tests/check_input_binary.c
tests/lib.c
tests/lib.h

index 46467543788320214796b9c8599e5bc7b055dcbf..8e74b10d0f0f4ae8742b1ea3bba77243eaefc924 100644 (file)
--- a/filter.c
+++ b/filter.c
 /**
  * @file
  *
 /**
  * @file
  *
- * Helper functions to filter out unused probes from samples.
+ * Helper functions to filter out unused channels from samples.
  */
 
 /**
  */
 
 /**
- * @defgroup grp_filter Probe filter
+ * @defgroup grp_filter Channel filter
  *
  *
- * Helper functions to filter out unused probes from samples.
+ * Helper functions to filter out unused channels from samples.
  *
  * @{
  */
 
 /**
  *
  * @{
  */
 
 /**
- * Remove unused probes from samples.
+ * Remove unused channels from samples.
  *
  *
- * Convert sample from maximum probes -- the way the hardware driver sent
+ * Convert sample from maximum channels -- the way the hardware driver sent
  * it -- to a sample taking up only as much space as required, with
  * it -- to a sample taking up only as much space as required, with
- * unused probes removed.
+ * unused channels removed.
  *
  *
- * The "unit size" is the number of bytes used to store probe values.
+ * The "unit size" is the number of bytes used to store channel values.
  * For example, a unit size of 1 means one byte is used (which can store
  * For example, a unit size of 1 means one byte is used (which can store
- * 8 probe values, each of them is 1 bit). A unit size of 2 means we can
- * store 16 probe values, 3 means we can store 24 probe values, and so on.
+ * 8 channel values, each of them is 1 bit). A unit size of 2 means we can
+ * store 16 channel values, 3 means we can store 24 channel values, and so on.
  *
  * If the data coming from the logic analyzer has a unit size of 4 for
  *
  * If the data coming from the logic analyzer has a unit size of 4 for
- * example (as the device has 32 probes), but only 2 of them are actually
+ * example (as the device has 32 channels), but only 2 of them are actually
  * used in an acquisition, this function can convert the samples to only
  * use up 1 byte per sample (unit size = 1) instead of 4 bytes per sample.
  *
  * used in an acquisition, this function can convert the samples to only
  * use up 1 byte per sample (unit size = 1) instead of 4 bytes per sample.
  *
- * The output will contain the probe values in the order specified via the
- * probelist. For example, if in_unitsize = 4, probelist = [5, 16, 30], and
+ * The output will contain the channel values in the order specified via the
+ * channellist. For example, if in_unitsize = 4, channellist = [5, 16, 30], and
  * out_unitsize = 1, then the output samples (each of them one byte in size)
  * out_unitsize = 1, then the output samples (each of them one byte in size)
- * will have the following format: bit 0 = value of probe 5, bit 1 = value
- * of probe 16, bit 2 = value of probe 30. Unused bit(s) in the output byte(s)
+ * will have the following format: bit 0 = value of channel 5, bit 1 = value
+ * of channel 16, bit 2 = value of channel 30. Unused bit(s) in the output byte(s)
  * are zero.
  *
  * The caller must make sure that length_in is not bigger than the memory
  * are zero.
  *
  * The caller must make sure that length_in is not bigger than the memory
@@ -72,8 +72,8 @@
  * @param out_unitsize The unit size (>= 1) the output shall have (data_out).
  *                     The requested unit size must be big enough to hold as
  *                     much data as is specified by the number of enabled
  * @param out_unitsize The unit size (>= 1) the output shall have (data_out).
  *                     The requested unit size must be big enough to hold as
  *                     much data as is specified by the number of enabled
- *                     probes in 'probelist'.
- * @param probe_array Pointer to a list of probe numbers, numbered starting
+ *                     channels in 'channellist'.
+ * @param channel_array Pointer to a list of channel numbers, numbered starting
  *                    from 0. The list is terminated with -1.
  * @param data_in Pointer to the input data buffer. Must not be NULL.
  * @param length_in The input data length (>= 1), in number of bytes.
  *                    from 0. The list is terminated with -1.
  * @param data_in Pointer to the input data buffer. Must not be NULL.
  * @param length_in The input data length (>= 1), in number of bytes.
  * @since 0.2.0
  */
 SR_API int sr_filter_channels(unsigned int in_unitsize, unsigned int out_unitsize,
  * @since 0.2.0
  */
 SR_API int sr_filter_channels(unsigned int in_unitsize, unsigned int out_unitsize,
-                           const GArray *probe_array, const uint8_t *data_in,
+                           const GArray *channel_array, const uint8_t *data_in,
                            uint64_t length_in, uint8_t **data_out,
                            uint64_t *length_out)
 {
        unsigned int in_offset, out_offset;
                            uint64_t length_in, uint8_t **data_out,
                            uint64_t *length_out)
 {
        unsigned int in_offset, out_offset;
-       int *probelist, out_bit;
+       int *channellist, out_bit;
        unsigned int i;
        uint8_t *sample_in, *sample_out;
 
        unsigned int i;
        uint8_t *sample_in, *sample_out;
 
-       if (!probe_array) {
-               sr_err("%s: probe_array was NULL", __func__);
+       if (!channel_array) {
+               sr_err("%s: channel_array was NULL", __func__);
                return SR_ERR_ARG;
        }
                return SR_ERR_ARG;
        }
-       probelist = (int *)probe_array->data;
+       channellist = (int *)channel_array->data;
 
        if (!data_in) {
                sr_err("%s: data_in was NULL", __func__);
 
        if (!data_in) {
                sr_err("%s: data_in was NULL", __func__);
@@ -122,10 +122,10 @@ SR_API int sr_filter_channels(unsigned int in_unitsize, unsigned int out_unitsiz
                return SR_ERR_ARG;
        }
 
                return SR_ERR_ARG;
        }
 
-       /* Are there more probes than the target unit size supports? */
-       if (probe_array->len > out_unitsize * 8) {
-               sr_err("%s: too many probes (%d) for the target unit "
-                      "size (%d)", __func__, probe_array->len, out_unitsize);
+       /* Are there more channels than the target unit size supports? */
+       if (channel_array->len > out_unitsize * 8) {
+               sr_err("%s: too many channels (%d) for the target unit "
+                      "size (%d)", __func__, channel_array->len, out_unitsize);
                return SR_ERR_ARG;
        }
 
                return SR_ERR_ARG;
        }
 
@@ -134,22 +134,22 @@ SR_API int sr_filter_channels(unsigned int in_unitsize, unsigned int out_unitsiz
                return SR_ERR_MALLOC;
        }
 
                return SR_ERR_MALLOC;
        }
 
-       if (probe_array->len == in_unitsize * 8) {
-               /* All probes are used -- no need to compress anything. */
+       if (channel_array->len == in_unitsize * 8) {
+               /* All channels are used -- no need to compress anything. */
                memcpy(*data_out, data_in, length_in);
                *length_out = length_in;
                return SR_OK;
        }
 
                memcpy(*data_out, data_in, length_in);
                *length_out = length_in;
                return SR_OK;
        }
 
-       /* If we reached this point, not all probes are used, so "compress". */
+       /* If we reached this point, not all channels are used, so "compress". */
        in_offset = out_offset = 0;
        while (in_offset <= length_in - in_unitsize) {
                sample_in = (uint8_t *)data_in + in_offset;
                sample_out = (*data_out) + out_offset;
                memset(sample_out, 0, out_unitsize);
                out_bit = 0;
        in_offset = out_offset = 0;
        while (in_offset <= length_in - in_unitsize) {
                sample_in = (uint8_t *)data_in + in_offset;
                sample_out = (*data_out) + out_offset;
                memset(sample_out, 0, out_unitsize);
                out_bit = 0;
-               for (i = 0; i < probe_array->len; i++) {
-                       if (sample_in[probelist[i]>>3] & (1 << (probelist[i]&7)))
+               for (i = 0; i < channel_array->len; i++) {
+                       if (sample_in[channellist[i]>>3] & (1 << (channellist[i]&7)))
                                sample_out[out_bit>>3] |= (1 << (out_bit&7));
                        out_bit++;
                }
                                sample_out[out_bit>>3] |= (1 << (out_bit&7));
                        out_bit++;
                }
index 587849e96983e7d37d4049335d660f3863d2d803..6f8738bca6dd9d84eb8e599591ee9b2ea93ab320 100644 (file)
@@ -24,7 +24,7 @@
 #include "libsigrok-internal.h"
 #include "protocol.h"
 
 #include "libsigrok-internal.h"
 #include "protocol.h"
 
-/* Probes are numbered 0-7. */
+/* Channels are numbered 0-7. */
 SR_PRIV const char *chronovu_la8_channel_names[NUM_CHANNELS + 1] = {
        "0", "1", "2", "3", "4", "5", "6", "7",
        NULL,
 SR_PRIV const char *chronovu_la8_channel_names[NUM_CHANNELS + 1] = {
        "0", "1", "2", "3", "4", "5", "6", "7",
        NULL,
index 384b52c4660f126722b6484f4ad499248957bed3..80f48f413814a71e504af7f99549e4c3b33bba19 100644 (file)
@@ -101,7 +101,7 @@ static GSList *scan(GSList *options)
        GSList *l;
        struct sr_config *src;
        struct udev *udev;
        GSList *l;
        struct sr_config *src;
        struct udev *udev;
-       int ptype;
+       int chtype;
 
        for (l = options; l; l = l->next) {
                src = l->data;
 
        for (l = options; l; l = l->next) {
                src = l->data;
@@ -218,8 +218,8 @@ static GSList *scan(GSList *options)
 
                for (i = 0; i < NUM_CHANNELS; i++) {
                        struct sr_channel *ch;
 
                for (i = 0; i < NUM_CHANNELS; i++) {
                        struct sr_channel *ch;
-                       ptype = (i == 0) ? SR_CHANNEL_ANALOG : SR_CHANNEL_LOGIC;
-                       if (!(ch = sr_channel_new(i, ptype, TRUE,
+                       chtype = (i == 0) ? SR_CHANNEL_ANALOG : SR_CHANNEL_LOGIC;
+                       if (!(ch = sr_channel_new(i, chtype, TRUE,
                                                   mso19_channel_names[i])))
                                return 0;
                        sdi->channels = g_slist_append(sdi->channels, ch);
                                                   mso19_channel_names[i])))
                                return 0;
                        sdi->channels = g_slist_append(sdi->channels, ch);
index ee13d6e5816fd9404f2caa9e705380e52d535468..4728cb074ba9abbde76e56cedbdbcf0118997a02 100644 (file)
@@ -96,10 +96,10 @@ static struct sr_config_info sr_config_info_data[] = {
                "Power off", NULL},
        {SR_CONF_DATA_SOURCE, SR_T_CHAR, "data_source",
                "Data source", NULL},
                "Power off", NULL},
        {SR_CONF_DATA_SOURCE, SR_T_CHAR, "data_source",
                "Data source", NULL},
-       {SR_CONF_NUM_LOGIC_CHANNELS, SR_T_INT32, "logic_probes",
-               "Number of logic probes", NULL},
-       {SR_CONF_NUM_ANALOG_CHANNELS, SR_T_INT32, "analog_probes",
-               "Number of analog probes", NULL},
+       {SR_CONF_NUM_LOGIC_CHANNELS, SR_T_INT32, "logic_channels",
+               "Number of logic channels", NULL},
+       {SR_CONF_NUM_ANALOG_CHANNELS, SR_T_INT32, "analog_channels",
+               "Number of analog channels", NULL},
        {SR_CONF_OUTPUT_VOLTAGE, SR_T_FLOAT, "output_voltage",
                "Current output voltage", NULL},
        {SR_CONF_OUTPUT_VOLTAGE_MAX, SR_T_FLOAT, "output_voltage_max",
        {SR_CONF_OUTPUT_VOLTAGE, SR_T_FLOAT, "output_voltage",
                "Current output voltage", NULL},
        {SR_CONF_OUTPUT_VOLTAGE_MAX, SR_T_FLOAT, "output_voltage_max",
index 60c35b831a74acf0b22729426231ea597d67bf5c..89bedde1dabb6c5b3f4cdd9f5241f3ff3cae72e5 100644 (file)
@@ -226,9 +226,9 @@ SR_PRIV int sr_err(const char *format, ...);
 
 /** Values for the changes argument of sr_dev_driver.config_channel_set. */
 enum {
 
 /** Values for the changes argument of sr_dev_driver.config_channel_set. */
 enum {
-       /** The enabled state of the probe has been changed. */
+       /** The enabled state of the channel has been changed. */
        SR_CHANNEL_SET_ENABLED = 1 << 0,
        SR_CHANNEL_SET_ENABLED = 1 << 0,
-       /** The trigger setup of the probe has been changed. */
+       /** The trigger setup of the channel has been changed. */
        SR_CHANNEL_SET_TRIGGER = 1 << 1,
 };
 
        SR_CHANNEL_SET_TRIGGER = 1 << 1,
 };
 
index 8df2f396ab15ed6f90614672cc7f74602378a663..49703757d264b56bfd0c8ff8aba20be2c6b5435b 100644 (file)
@@ -597,12 +597,12 @@ struct sr_output_format {
        int (*cleanup) (struct sr_output *o);
 };
 
        int (*cleanup) (struct sr_output *o);
 };
 
-/** Constants for probe type. */
+/** Constants for channel type. */
 enum {
 enum {
-       /** Probe type is logic probe. */
-    SR_CHANNEL_LOGIC = 10000,
-       /** Probe type is analog probe. */
-    SR_CHANNEL_ANALOG,
+       /** Channel type is logic channel. */
+       SR_CHANNEL_LOGIC = 10000,
+       /** Channel type is analog channel. */
+       SR_CHANNEL_ANALOG,
 };
 
 /** Information on single channel. */
 };
 
 /** Information on single channel. */
@@ -803,10 +803,10 @@ enum {
         */
        SR_CONF_CENTER_FREQUENCY,
 
         */
        SR_CONF_CENTER_FREQUENCY,
 
-       /** The device supports setting the number of logic probes. */
+       /** The device supports setting the number of logic channels. */
        SR_CONF_NUM_LOGIC_CHANNELS,
 
        SR_CONF_NUM_LOGIC_CHANNELS,
 
-       /** The device supports setting the number of analog probes. */
+       /** The device supports setting the number of analog channels. */
        SR_CONF_NUM_ANALOG_CHANNELS,
 
        /** Output voltage. */
        SR_CONF_NUM_ANALOG_CHANNELS,
 
        /** Output voltage. */
@@ -992,7 +992,7 @@ struct sr_dev_driver {
        int (*config_set) (int id, GVariant *data,
                        const struct sr_dev_inst *sdi,
                        const struct sr_channel_group *cg);
        int (*config_set) (int id, GVariant *data,
                        const struct sr_dev_inst *sdi,
                        const struct sr_channel_group *cg);
-       /** Probe status change.
+       /** Channel status change.
         *  @see sr_dev_channel_enable(), sr_dev_trigger_set(). */
        int (*config_channel_set) (const struct sr_dev_inst *sdi,
                        struct sr_channel *ch, unsigned int changes);
         *  @see sr_dev_channel_enable(), sr_dev_trigger_set(). */
        int (*config_channel_set) (const struct sr_dev_inst *sdi,
                        struct sr_channel *ch, unsigned int changes);
index 7ad3fec335c45e1697ee716aa92532929c0c9998..3b3bcc72a28402db4e00fa35f17b81232b1209d8 100644 (file)
@@ -46,7 +46,7 @@ SR_PRIV int data_ascii(struct sr_output *o, const uint8_t *data_in,
        max_linelen = SR_MAX_CHANNELNAME_LEN + 3 + ctx->samples_per_line
                        + ctx->samples_per_line / 8;
         /*
        max_linelen = SR_MAX_CHANNELNAME_LEN + 3 + ctx->samples_per_line
                        + ctx->samples_per_line / 8;
         /*
-         * Calculate space needed for probes. Set aside 512 bytes for
+         * Calculate space needed for channels. Set aside 512 bytes for
          * extra output, e.g. trigger.
          */
        outsize = 512 + (1 + (length_in / ctx->unitsize) / ctx->samples_per_line)
          * extra output, e.g. trigger.
          */
        outsize = 512 + (1 + (length_in / ctx->unitsize) / ctx->samples_per_line)
index 7eafecdf3e99e0ecef13240d1cd136c5cefaa685..4ab59253fb4fb85285bfee84b5e1dd2dd34048fd 100644 (file)
@@ -46,7 +46,7 @@ SR_PRIV int data_bits(struct sr_output *o, const uint8_t *data_in,
        max_linelen = SR_MAX_CHANNELNAME_LEN + 3 + ctx->samples_per_line
                        + ctx->samples_per_line / 8;
         /*
        max_linelen = SR_MAX_CHANNELNAME_LEN + 3 + ctx->samples_per_line
                        + ctx->samples_per_line / 8;
         /*
-         * Calculate space needed for probes. Set aside 512 bytes for
+         * Calculate space needed for channels. Set aside 512 bytes for
          * extra output, e.g. trigger.
          */
        outsize = 512 + (1 + (length_in / ctx->unitsize) / ctx->samples_per_line)
          * extra output, e.g. trigger.
          */
        outsize = 512 + (1 + (length_in / ctx->unitsize) / ctx->samples_per_line)
diff --git a/proto.h b/proto.h
index 2b5dd6eddf7097d8bd8c93d225d20903cb6ff354..16bc269b099bf787a442f95bf748f3677c5cf96e 100644 (file)
--- a/proto.h
+++ b/proto.h
@@ -46,10 +46,10 @@ SR_API char *sr_log_logdomain_get(void);
 /*--- device.c --------------------------------------------------------------*/
 
 SR_API int sr_dev_channel_name_set(const struct sr_dev_inst *sdi,
 /*--- device.c --------------------------------------------------------------*/
 
 SR_API int sr_dev_channel_name_set(const struct sr_dev_inst *sdi,
-               int probenum, const char *name);
-SR_API int sr_dev_channel_enable(const struct sr_dev_inst *sdi, int probenum,
+               int channelnum, const char *name);
+SR_API int sr_dev_channel_enable(const struct sr_dev_inst *sdi, int channelnum,
                gboolean state);
                gboolean state);
-SR_API int sr_dev_trigger_set(const struct sr_dev_inst *sdi, int probenum,
+SR_API int sr_dev_trigger_set(const struct sr_dev_inst *sdi, int channelnum,
                const char *trigger);
 SR_API gboolean sr_dev_has_option(const struct sr_dev_inst *sdi, int key);
 SR_API GSList *sr_dev_list(const struct sr_dev_driver *driver);
                const char *trigger);
 SR_API gboolean sr_dev_has_option(const struct sr_dev_inst *sdi, int key);
 SR_API GSList *sr_dev_list(const struct sr_dev_driver *driver);
@@ -60,7 +60,7 @@ SR_API int sr_dev_close(struct sr_dev_inst *sdi);
 /*--- filter.c --------------------------------------------------------------*/
 
 SR_API int sr_filter_channels(unsigned int in_unitsize, unsigned int out_unitsize,
 /*--- filter.c --------------------------------------------------------------*/
 
 SR_API int sr_filter_channels(unsigned int in_unitsize, unsigned int out_unitsize,
-                           const GArray *probe_array, const uint8_t *data_in,
+                           const GArray *channel_array, const uint8_t *data_in,
                            uint64_t length_in, uint8_t **data_out,
                            uint64_t *length_out);
 
                            uint64_t length_in, uint8_t **data_out,
                            uint64_t *length_out);
 
@@ -110,7 +110,7 @@ SR_API int sr_session_stop(void);
 SR_API int sr_session_save(const char *filename, const struct sr_dev_inst *sdi,
                unsigned char *buf, int unitsize, int units);
 SR_API int sr_session_save_init(const char *filename, uint64_t samplerate,
 SR_API int sr_session_save(const char *filename, const struct sr_dev_inst *sdi,
                unsigned char *buf, int unitsize, int units);
 SR_API int sr_session_save_init(const char *filename, uint64_t samplerate,
-               char **probes);
+               char **channels);
 SR_API int sr_session_append(const char *filename, unsigned char *buf,
                int unitsize, int units);
 SR_API int sr_session_source_add(int fd, int events, int timeout,
 SR_API int sr_session_append(const char *filename, unsigned char *buf,
                int unitsize, int units);
 SR_API int sr_session_source_add(int fd, int events, int timeout,
index 36e5c0c2b67bff96d97f5fafcd8cd30d561afb8a..fe0db3e6e0acbbf0ad5b808e4321b11fe8a48d35 100644 (file)
@@ -41,7 +41,7 @@ struct session_vdev {
        int bytes_read;
        uint64_t samplerate;
        int unitsize;
        int bytes_read;
        uint64_t samplerate;
        int unitsize;
-       int num_probes;
+       int num_channels;
        int cur_chunk;
        gboolean finished;
 };
        int cur_chunk;
        gboolean finished;
 };
@@ -260,7 +260,7 @@ static int config_set(int id, GVariant *data, const struct sr_dev_inst *sdi,
                vdev->unitsize = g_variant_get_uint64(data);
                break;
        case SR_CONF_NUM_LOGIC_CHANNELS:
                vdev->unitsize = g_variant_get_uint64(data);
                break;
        case SR_CONF_NUM_LOGIC_CHANNELS:
-               vdev->num_probes = g_variant_get_uint64(data);
+               vdev->num_channels = g_variant_get_uint64(data);
                break;
        default:
                return SR_ERR_NA;
                break;
        default:
                return SR_ERR_NA;
index f69c73743fdcf9698884f465d60cfdb693aefe3b..9b40f1ef3b28ac8c825509be4758cefa86f1fe90 100644 (file)
@@ -34,7 +34,7 @@ static struct sr_context *sr_ctx;
 
 static uint64_t df_packet_counter = 0, sample_counter = 0;
 static gboolean have_seen_df_end = FALSE;
 
 static uint64_t df_packet_counter = 0, sample_counter = 0;
 static gboolean have_seen_df_end = FALSE;
-static GArray *logic_probelist = NULL;
+static GArray *logic_channellist = NULL;
 static int check_to_perform;
 static uint64_t expected_samples;
 static uint64_t *expected_samplerate;
 static int check_to_perform;
 static uint64_t expected_samples;
 static uint64_t *expected_samplerate;
@@ -123,10 +123,10 @@ static void datafeed_in(const struct sr_dev_inst *sdi,
                // g_debug("Received SR_DF_HEADER.");
                // fail_unless(p != NULL, "SR_DF_HEADER payload was NULL.");
 
                // g_debug("Received SR_DF_HEADER.");
                // fail_unless(p != NULL, "SR_DF_HEADER payload was NULL.");
 
-               logic_probelist = srtest_get_enabled_logic_probes(sdi);
-               fail_unless(logic_probelist != NULL);
-               fail_unless(logic_probelist->len != 0);
-               // g_debug("Enabled probes: %d.", logic_probelist->len);
+               logic_channellist = srtest_get_enabled_logic_channels(sdi);
+               fail_unless(logic_channellist != NULL);
+               fail_unless(logic_channellist->len != 0);
+               // g_debug("Enabled channels: %d.", logic_channellist->len);
                break;
        case SR_DF_META:
                // g_debug("Received SR_DF_META.");
                break;
        case SR_DF_META:
                // g_debug("Received SR_DF_META.");
@@ -208,7 +208,7 @@ static void check_buf(const char *filename, GHashTable *param,
        /* Initialize global variables for this run. */
        df_packet_counter = sample_counter = 0;
        have_seen_df_end = FALSE;
        /* Initialize global variables for this run. */
        df_packet_counter = sample_counter = 0;
        have_seen_df_end = FALSE;
-       logic_probelist = NULL;
+       logic_channellist = NULL;
        check_to_perform = check;
        expected_samples = samples;
        expected_samplerate = samplerate;
        check_to_perform = check;
        expected_samples = samples;
        expected_samplerate = samplerate;
index fa823c7aca8985680aa36704951a77fd89ea6806..ad0b3e1f38a2c75b9faa043385801e3ce4cc322c 100644 (file)
@@ -211,21 +211,21 @@ void srtest_buf_to_file(const char *filename, const uint8_t *buf, uint64_t len)
        fclose(f);
 }
 
        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 *ch;
 {
        struct sr_channel *ch;
-       GArray *probes;
+       GArray *channels;
        GSList *l;
 
        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_CHANNEL_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;
                        continue;
-               if (probe->enabled != TRUE)
+               if (ch->enabled != TRUE)
                        continue;
                        continue;
-               g_array_append_val(probes, probe->index);
+               g_array_append_val(channels, ch->index);
        }
 
        }
 
-       return probes;
+       return channels;
 }
 }
index edb32d7584f6dc42701943e7bc33f5b40b5acd28..e2e607e3d3538de69f88cd9064fe7d61e0d47fd3 100644 (file)
@@ -39,7 +39,7 @@ void srtest_check_samplerate(struct sr_context *sr_ctx, const char *drivername,
                             uint64_t samplerate);
 
 void srtest_buf_to_file(const char *filename, const uint8_t *buf, uint64_t len);
                             uint64_t samplerate);
 
 void srtest_buf_to_file(const char *filename, const uint8_t *buf, uint64_t len);
-GArray *srtest_get_enabled_logic_probes(const struct sr_dev_inst *sdi);
+GArray *srtest_get_enabled_logic_channels(const struct sr_dev_inst *sdi);
 
 Suite *suite_core(void);
 Suite *suite_driver_all(void);
 
 Suite *suite_core(void);
 Suite *suite_driver_all(void);