]> sigrok.org Git - libsigrok.git/commitdiff
Rename a few more API calls with 'probe' in their name.
authorUwe Hermann <redacted>
Mon, 24 Mar 2014 15:05:42 +0000 (16:05 +0100)
committerUwe Hermann <redacted>
Tue, 25 Mar 2014 19:58:54 +0000 (20:58 +0100)
This fixes parts of bug #259.

device.c
filter.c
hardware/sysclk-lwla/api.c
libsigrok-internal.h
libsigrok.h
proto.h
session_file.c

index 4cdae580076c0c51fcce8d3edee2c1b70b594a51..d437b72d822171da2adce03b0c8ac9c7ddccbbcc 100644 (file)
--- a/device.c
+++ b/device.c
@@ -83,7 +83,7 @@ SR_PRIV struct sr_channel *sr_channel_new(int index, int type,
  *
  * @since 0.2.0
  */
-SR_API int sr_dev_probe_name_set(const struct sr_dev_inst *sdi,
+SR_API int sr_dev_channel_name_set(const struct sr_dev_inst *sdi,
                int channelnum, const char *name)
 {
        GSList *l;
@@ -122,7 +122,7 @@ SR_API int sr_dev_probe_name_set(const struct sr_dev_inst *sdi,
  *
  * @since 0.2.0
  */
-SR_API int sr_dev_probe_enable(const struct sr_dev_inst *sdi, int channelnum,
+SR_API int sr_dev_channel_enable(const struct sr_dev_inst *sdi, int channelnum,
                gboolean state)
 {
        GSList *l;
@@ -141,8 +141,8 @@ SR_API int sr_dev_probe_enable(const struct sr_dev_inst *sdi, int channelnum,
                        ch->enabled = state;
                        ret = SR_OK;
                        if (!state != !was_enabled && sdi->driver
-                                       && sdi->driver->config_probe_set) {
-                               ret = sdi->driver->config_probe_set(
+                                       && sdi->driver->config_channel_set) {
+                               ret = sdi->driver->config_channel_set(
                                        sdi, ch, SR_CHANNEL_SET_ENABLED);
                                /* Roll back change if it wasn't applicable. */
                                if (ret == SR_ERR_ARG)
@@ -193,8 +193,8 @@ SR_API int sr_dev_trigger_set(const struct sr_dev_inst *sdi, int channelnum,
                        /* Set new trigger if it has changed. */
                        ch->trigger = g_strdup(trigger);
 
-                       if (sdi->driver && sdi->driver->config_probe_set) {
-                               ret = sdi->driver->config_probe_set(
+                       if (sdi->driver && sdi->driver->config_channel_set) {
+                               ret = sdi->driver->config_channel_set(
                                        sdi, ch, SR_CHANNEL_SET_TRIGGER);
                                /* Roll back change if it wasn't applicable. */
                                if (ret == SR_ERR_ARG) {
index eaf69e5cf1ae3bea19d7744b009430d94edcb523..46467543788320214796b9c8599e5bc7b055dcbf 100644 (file)
--- a/filter.c
+++ b/filter.c
@@ -91,7 +91,7 @@
  *
  * @since 0.2.0
  */
-SR_API int sr_filter_probes(unsigned int in_unitsize, unsigned int out_unitsize,
+SR_API int sr_filter_channels(unsigned int in_unitsize, unsigned int out_unitsize,
                            const GArray *probe_array, const uint8_t *data_in,
                            uint64_t length_in, uint8_t **data_out,
                            uint64_t *length_out)
index de5929fe14c42a3cadda08a541b663be12c97737..12a1e08696764c20d9d365d0eafb21caf7e57f4b 100644 (file)
@@ -401,7 +401,7 @@ static int config_set(int key, GVariant *data, const struct sr_dev_inst *sdi,
        return SR_OK;
 }
 
-static int config_probe_set(const struct sr_dev_inst *sdi,
+static int config_channel_set(const struct sr_dev_inst *sdi,
                            struct sr_channel *ch, unsigned int changes)
 {
        uint64_t channel_bit;
@@ -601,7 +601,7 @@ SR_PRIV struct sr_dev_driver sysclk_lwla_driver_info = {
        .dev_clear = dev_clear,
        .config_get = config_get,
        .config_set = config_set,
-       .config_probe_set = config_probe_set,
+       .config_channel_set = config_channel_set,
        .config_commit = config_commit,
        .config_list = config_list,
        .dev_open = dev_open,
index 4d508c5b11ca64343b8c3947e85bde73897523a4..60c35b831a74acf0b22729426231ea597d67bf5c 100644 (file)
@@ -224,7 +224,7 @@ SR_PRIV int sr_err(const char *format, ...);
 
 /*--- device.c --------------------------------------------------------------*/
 
-/** Values for the changes argument of sr_dev_driver.config_probe_set. */
+/** Values for the changes argument of sr_dev_driver.config_channel_set. */
 enum {
        /** The enabled state of the probe has been changed. */
        SR_CHANNEL_SET_ENABLED = 1 << 0,
index bd2202ed51e05c9589531e9bb5148f97fda9bbd6..8df2f396ab15ed6f90614672cc7f74602378a663 100644 (file)
@@ -993,8 +993,8 @@ struct sr_dev_driver {
                        const struct sr_dev_inst *sdi,
                        const struct sr_channel_group *cg);
        /** Probe status change.
-        *  @see sr_dev_probe_enable(), sr_dev_trigger_set(). */
-       int (*config_probe_set) (const struct sr_dev_inst *sdi,
+        *  @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);
        /** Apply configuration settings to the device hardware.
         *  @see sr_config_commit().*/
diff --git a/proto.h b/proto.h
index 3d860e4b72eebbbeb0c119161822ec6b695b3d6a..2b5dd6eddf7097d8bd8c93d225d20903cb6ff354 100644 (file)
--- a/proto.h
+++ b/proto.h
@@ -45,9 +45,9 @@ SR_API char *sr_log_logdomain_get(void);
 
 /*--- device.c --------------------------------------------------------------*/
 
-SR_API int sr_dev_probe_name_set(const struct sr_dev_inst *sdi,
+SR_API int sr_dev_channel_name_set(const struct sr_dev_inst *sdi,
                int probenum, const char *name);
-SR_API int sr_dev_probe_enable(const struct sr_dev_inst *sdi, int probenum,
+SR_API int sr_dev_channel_enable(const struct sr_dev_inst *sdi, int probenum,
                gboolean state);
 SR_API int sr_dev_trigger_set(const struct sr_dev_inst *sdi, int probenum,
                const char *trigger);
@@ -59,7 +59,7 @@ SR_API int sr_dev_close(struct sr_dev_inst *sdi);
 
 /*--- filter.c --------------------------------------------------------------*/
 
-SR_API int sr_filter_probes(unsigned int in_unitsize, unsigned int out_unitsize,
+SR_API int sr_filter_channels(unsigned int in_unitsize, unsigned int out_unitsize,
                            const GArray *probe_array, const uint8_t *data_in,
                            uint64_t length_in, uint8_t **data_out,
                            uint64_t *length_out);
index 8ff74cbd2054721af67289601481a8ebd59d75a2..3ace85b628221cacdb8bbbf1b546c47f2acde746 100644 (file)
@@ -197,7 +197,7 @@ SR_API int sr_session_load(const char *filename)
                                        enabled_channels++;
                                        tmp_u64 = strtoul(keys[j]+5, NULL, 10);
                                        /* sr_session_save() */
-                                       sr_dev_probe_name_set(sdi, tmp_u64 - 1, val);
+                                       sr_dev_channel_name_set(sdi, tmp_u64 - 1, val);
                                } else if (!strncmp(keys[j], "trigger", 7)) {
                                        channelnum = strtoul(keys[j]+7, NULL, 10);
                                        sr_dev_trigger_set(sdi, channelnum, val);
@@ -207,7 +207,7 @@ SR_API int sr_session_load(const char *filename)
                        /* Disable channels not specifically listed. */
                        if (total_channels)
                                for (p = enabled_channels; p < total_channels; p++)
-                                       sr_dev_probe_enable(sdi, p, FALSE);
+                                       sr_dev_channel_enable(sdi, p, FALSE);
                }
                devcnt++;
        }