From: Uwe Hermann Date: Thu, 20 Mar 2014 20:58:57 +0000 (+0100) Subject: Rename 'struct sr_probe' to 'struct sr_channel' everywhere. X-Git-Tag: libsigrok-0.3.0~109 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=91aea754aaed0f0f2a6fc4b2b875f0d0b7c01f8e;p=libsigrok.git Rename 'struct sr_probe' to 'struct sr_channel' everywhere. This fixes parts of bug #259. --- diff --git a/bindings/python/sigrok/core/classes.py b/bindings/python/sigrok/core/classes.py index 2dcd1d95..d5038a0c 100644 --- a/bindings/python/sigrok/core/classes.py +++ b/bindings/python/sigrok/core/classes.py @@ -196,7 +196,7 @@ class Device(object): self._probes = {} probe_list = self.struct.probes while (probe_list): - probe_ptr = void_ptr_to_sr_probe_ptr(probe_list.data) + probe_ptr = void_ptr_to_sr_channel_ptr(probe_list.data) self._probes[probe_ptr.name] = Probe(self, probe_ptr) probe_list = probe_list.next return self._probes @@ -306,7 +306,7 @@ class ChannelGroup(object): self._channels = [] channel_list = self.struct.channels while (channel_list): - channel_ptr = void_ptr_to_sr_probe_ptr(channel_list.data) + channel_ptr = void_ptr_to_sr_channel_ptr(channel_list.data) self._channels.append(Probe(self, probe_ptr)) channel_list = channel_list.next return self._channels diff --git a/bindings/swig/libsigrok.i b/bindings/swig/libsigrok.i index 5b591489..8b7a2dfd 100644 --- a/bindings/swig/libsigrok.i +++ b/bindings/swig/libsigrok.i @@ -98,7 +98,7 @@ gchar *g_string_free(GString *string, gboolean free_segment); %pointer_cast(gpointer, struct sr_dev_inst *, gpointer_to_sr_dev_inst_ptr); %pointer_cast(void *, struct sr_datafeed_logic *, void_ptr_to_sr_datafeed_logic_ptr) %pointer_cast(void *, struct sr_datafeed_analog *, void_ptr_to_sr_datafeed_analog_ptr) -%pointer_cast(void *, struct sr_probe *, void_ptr_to_sr_probe_ptr) +%pointer_cast(void *, struct sr_channel *, void_ptr_to_sr_channel_ptr) %pointer_cast(void *, struct sr_channel_group *, void_ptr_to_sr_channel_group_ptr) %extend sr_input_format { diff --git a/device.c b/device.c index c01bc92f..4c8e9d1a 100644 --- a/device.c +++ b/device.c @@ -40,20 +40,20 @@ */ /** @private - * Allocate and initialize new struct sr_probe - * @param[in] index @copydoc sr_probe::index - * @param[in] type @copydoc sr_probe::type - * @param[in] enabled @copydoc sr_probe::enabled - * @param[in] name @copydoc sr_probe::name + * Allocate and initialize new struct sr_channel + * @param[in] index @copydoc sr_channel::index + * @param[in] type @copydoc sr_channel::type + * @param[in] enabled @copydoc sr_channel::enabled + * @param[in] name @copydoc sr_channel::name * - * @return NULL (failure) or new struct sr_probe*. + * @return NULL (failure) or new struct sr_channel*. */ -SR_PRIV struct sr_probe *sr_probe_new(int index, int type, +SR_PRIV struct sr_channel *sr_probe_new(int index, int type, gboolean enabled, const char *name) { - struct sr_probe *probe; + struct sr_channel *probe; - if (!(probe = g_try_malloc0(sizeof(struct sr_probe)))) { + if (!(probe = g_try_malloc0(sizeof(struct sr_channel)))) { sr_err("Probe malloc failed."); return NULL; } @@ -87,7 +87,7 @@ SR_API int sr_dev_probe_name_set(const struct sr_dev_inst *sdi, int probenum, const char *name) { GSList *l; - struct sr_probe *probe; + struct sr_channel *probe; int ret; if (!sdi) { @@ -126,7 +126,7 @@ SR_API int sr_dev_probe_enable(const struct sr_dev_inst *sdi, int probenum, gboolean state) { GSList *l; - struct sr_probe *probe; + struct sr_channel *probe; int ret; gboolean was_enabled; @@ -175,7 +175,7 @@ SR_API int sr_dev_trigger_set(const struct sr_dev_inst *sdi, int probenum, const char *trigger) { GSList *l; - struct sr_probe *probe; + struct sr_channel *probe; char *old_trigger; int ret; @@ -298,7 +298,7 @@ SR_PRIV struct sr_dev_inst *sr_dev_inst_new(int index, int status, */ SR_PRIV void sr_dev_inst_free(struct sr_dev_inst *sdi) { - struct sr_probe *probe; + struct sr_channel *probe; GSList *l; for (l = sdi->probes; l; l = l->next) { diff --git a/hardware/agilent-dmm/api.c b/hardware/agilent-dmm/api.c index 8c1f3b4a..395b711e 100644 --- a/hardware/agilent-dmm/api.c +++ b/hardware/agilent-dmm/api.c @@ -72,7 +72,7 @@ static GSList *scan(GSList *options) struct drv_context *drvc; struct dev_context *devc; struct sr_config *src; - struct sr_probe *probe; + struct sr_channel *probe; struct sr_serial_dev_inst *serial; GSList *l, *devices; int len, i; diff --git a/hardware/alsa/protocol.c b/hardware/alsa/protocol.c index eea2f5bd..ff785277 100644 --- a/hardware/alsa/protocol.c +++ b/hardware/alsa/protocol.c @@ -63,7 +63,7 @@ static void alsa_scan_handle_dev(GSList **devices, struct drv_context *drvc = NULL; struct sr_dev_inst *sdi = NULL; struct dev_context *devc = NULL; - struct sr_probe *probe; + struct sr_channel *probe; int ret; unsigned int i, offset, channels, minrate, maxrate, rate; uint64_t hwrates[ARRAY_SIZE(rates)]; diff --git a/hardware/appa-55ii/api.c b/hardware/appa-55ii/api.c index 77bd50a7..997da7f7 100644 --- a/hardware/appa-55ii/api.c +++ b/hardware/appa-55ii/api.c @@ -52,7 +52,7 @@ static GSList *scan(GSList *options) struct dev_context *devc; struct sr_serial_dev_inst *serial; struct sr_dev_inst *sdi; - struct sr_probe *probe; + struct sr_channel *probe; struct sr_config *src; GSList *devices, *l; const char *conn, *serialcomm; diff --git a/hardware/appa-55ii/protocol.c b/hardware/appa-55ii/protocol.c index fabd2556..e78b33ff 100644 --- a/hardware/appa-55ii/protocol.c +++ b/hardware/appa-55ii/protocol.c @@ -92,7 +92,7 @@ static void appa_55ii_live_data(struct sr_dev_inst *sdi, const uint8_t *buf) struct dev_context *devc; struct sr_datafeed_packet packet; struct sr_datafeed_analog analog; - struct sr_probe *probe; + struct sr_channel *probe; float values[APPA_55II_NUM_PROBES], *val_ptr; int i; @@ -138,7 +138,7 @@ static void appa_55ii_log_data_parse(struct sr_dev_inst *sdi) struct dev_context *devc; struct sr_datafeed_packet packet; struct sr_datafeed_analog analog; - struct sr_probe *probe; + struct sr_channel *probe; float values[APPA_55II_NUM_PROBES], *val_ptr; const uint8_t *buf; int16_t temp; diff --git a/hardware/asix-sigma/asix-sigma.c b/hardware/asix-sigma/asix-sigma.c index 5b39f0a2..1a56cf39 100644 --- a/hardware/asix-sigma/asix-sigma.c +++ b/hardware/asix-sigma/asix-sigma.c @@ -402,7 +402,7 @@ static int init(struct sr_context *sr_ctx) static GSList *scan(GSList *options) { struct sr_dev_inst *sdi; - struct sr_probe *probe; + struct sr_channel *probe; struct drv_context *drvc; struct dev_context *devc; GSList *devices; @@ -654,7 +654,7 @@ static int set_samplerate(const struct sr_dev_inst *sdi, uint64_t samplerate) static int configure_probes(const struct sr_dev_inst *sdi) { struct dev_context *devc = sdi->priv; - const struct sr_probe *probe; + const struct sr_channel *probe; const GSList *l; int trigger_set = 0; int probebit; @@ -662,7 +662,7 @@ static int configure_probes(const struct sr_dev_inst *sdi) memset(&devc->trigger, 0, sizeof(struct sigma_trigger)); for (l = sdi->probes; l; l = l->next) { - probe = (struct sr_probe *)l->data; + probe = (struct sr_channel *)l->data; probebit = 1 << (probe->index); if (!probe->enabled || !probe->trigger) diff --git a/hardware/atten-pps3xxx/api.c b/hardware/atten-pps3xxx/api.c index 102940b7..94e8fe44 100644 --- a/hardware/atten-pps3xxx/api.c +++ b/hardware/atten-pps3xxx/api.c @@ -87,7 +87,7 @@ static GSList *scan(GSList *options, int modelid) struct drv_context *drvc; struct dev_context *devc; struct sr_config *src; - struct sr_probe *probe; + struct sr_channel *probe; struct sr_channel_group *cg; struct sr_serial_dev_inst *serial; GSList *l, *devices; @@ -209,7 +209,7 @@ static int config_get(int key, GVariant **data, const struct sr_dev_inst *sdi, const struct sr_channel_group *cg) { struct dev_context *devc; - struct sr_probe *probe; + struct sr_channel *probe; int channel, ret; if (!sdi) @@ -278,7 +278,7 @@ static int config_set(int key, GVariant *data, const struct sr_dev_inst *sdi, const struct sr_channel_group *cg) { struct dev_context *devc; - struct sr_probe *probe; + struct sr_channel *probe; gdouble dval; int channel, ret, ival; const char *sval; @@ -362,7 +362,7 @@ static int config_list(int key, GVariant **data, const struct sr_dev_inst *sdi, const struct sr_channel_group *cg) { struct dev_context *devc; - struct sr_probe *probe; + struct sr_channel *probe; GVariant *gvar; GVariantBuilder gvb; int channel, ret, i; diff --git a/hardware/brymen-bm86x/api.c b/hardware/brymen-bm86x/api.c index a42aebca..07f2e49e 100644 --- a/hardware/brymen-bm86x/api.c +++ b/hardware/brymen-bm86x/api.c @@ -48,7 +48,7 @@ static GSList *scan(GSList *options) struct sr_dev_inst *sdi; struct sr_usb_dev_inst *usb; struct sr_config *src; - struct sr_probe *probe; + struct sr_channel *probe; const char *conn; drvc = di->priv; diff --git a/hardware/brymen-dmm/api.c b/hardware/brymen-dmm/api.c index 9af92f1d..df89fbbe 100644 --- a/hardware/brymen-dmm/api.c +++ b/hardware/brymen-dmm/api.c @@ -44,7 +44,7 @@ static GSList *brymen_scan(const char *conn, const char *serialcomm) struct sr_dev_inst *sdi; struct dev_context *devc; struct drv_context *drvc; - struct sr_probe *probe; + struct sr_channel *probe; struct sr_serial_dev_inst *serial; GSList *devices; int ret; diff --git a/hardware/cem-dt-885x/api.c b/hardware/cem-dt-885x/api.c index d996b03d..e42f8598 100644 --- a/hardware/cem-dt-885x/api.c +++ b/hardware/cem-dt-885x/api.c @@ -79,7 +79,7 @@ static GSList *scan(GSList *options) struct sr_config *src; struct sr_serial_dev_inst *serial; struct sr_dev_inst *sdi; - struct sr_probe *probe; + struct sr_channel *probe; GSList *l, *devices; gint64 start; const char *conn; diff --git a/hardware/center-3xx/api.c b/hardware/center-3xx/api.c index 376563a7..9c3bba7a 100644 --- a/hardware/center-3xx/api.c +++ b/hardware/center-3xx/api.c @@ -71,7 +71,7 @@ static GSList *center_scan(const char *conn, const char *serialcomm, int idx) struct sr_dev_inst *sdi; struct drv_context *drvc; struct dev_context *devc; - struct sr_probe *probe; + struct sr_channel *probe; struct sr_serial_dev_inst *serial; GSList *devices; diff --git a/hardware/chronovu-la8/api.c b/hardware/chronovu-la8/api.c index f73a7fd4..2d6a00ad 100644 --- a/hardware/chronovu-la8/api.c +++ b/hardware/chronovu-la8/api.c @@ -79,7 +79,7 @@ static int init(struct sr_context *sr_ctx) static GSList *scan(GSList *options) { struct sr_dev_inst *sdi; - struct sr_probe *probe; + struct sr_channel *probe; struct drv_context *drvc; struct dev_context *devc; GSList *devices; diff --git a/hardware/chronovu-la8/protocol.c b/hardware/chronovu-la8/protocol.c index 90bef5a4..4dcf26ff 100644 --- a/hardware/chronovu-la8/protocol.c +++ b/hardware/chronovu-la8/protocol.c @@ -287,7 +287,7 @@ SR_PRIV int la8_reset(struct dev_context *devc) SR_PRIV int configure_probes(const struct sr_dev_inst *sdi) { struct dev_context *devc; - const struct sr_probe *probe; + const struct sr_channel *probe; const GSList *l; uint8_t probe_bit; char *tc; @@ -297,7 +297,7 @@ SR_PRIV int configure_probes(const struct sr_dev_inst *sdi) devc->trigger_mask = 0; /* Default to "don't care" for all probes. */ for (l = sdi->probes; l; l = l->next) { - probe = (struct sr_probe *)l->data; + probe = (struct sr_channel *)l->data; if (!probe) { sr_err("%s: probe was NULL.", __func__); diff --git a/hardware/colead-slm/api.c b/hardware/colead-slm/api.c index 99773a80..58b8dfb6 100644 --- a/hardware/colead-slm/api.c +++ b/hardware/colead-slm/api.c @@ -56,7 +56,7 @@ static GSList *scan(GSList *options) struct dev_context *devc; struct sr_dev_inst *sdi; struct sr_config *src; - struct sr_probe *probe; + struct sr_channel *probe; GSList *devices, *l; const char *conn, *serialcomm; diff --git a/hardware/conrad-digi-35-cpu/api.c b/hardware/conrad-digi-35-cpu/api.c index 99e9916f..2a8c6dc0 100644 --- a/hardware/conrad-digi-35-cpu/api.c +++ b/hardware/conrad-digi-35-cpu/api.c @@ -52,7 +52,7 @@ static GSList *scan(GSList *options) struct sr_dev_inst *sdi; struct drv_context *drvc; struct sr_config *src; - struct sr_probe *probe; + struct sr_channel *probe; struct sr_serial_dev_inst *serial; GSList *l, *devices; const char *conn, *serialcomm; diff --git a/hardware/demo/demo.c b/hardware/demo/demo.c index 3a8d277d..45a6a13c 100644 --- a/hardware/demo/demo.c +++ b/hardware/demo/demo.c @@ -255,7 +255,7 @@ static GSList *scan(GSList *options) struct drv_context *drvc; struct dev_context *devc; struct sr_dev_inst *sdi; - struct sr_probe *probe; + struct sr_channel *probe; struct sr_channel_group *cg; struct sr_config *src; struct analog_gen *ag; @@ -385,7 +385,7 @@ static int config_get(int id, GVariant **data, const struct sr_dev_inst *sdi, const struct sr_channel_group *cg) { struct dev_context *devc; - struct sr_probe *probe; + struct sr_channel *probe; struct analog_gen *ag; int pattern; @@ -435,7 +435,7 @@ static int config_set(int id, GVariant *data, const struct sr_dev_inst *sdi, { struct dev_context *devc; struct analog_gen *ag; - struct sr_probe *probe; + struct sr_channel *probe; int pattern, ret; unsigned int i; const char *stropt; @@ -511,7 +511,7 @@ static int config_set(int id, GVariant *data, const struct sr_dev_inst *sdi, static int config_list(int key, GVariant **data, const struct sr_dev_inst *sdi, const struct sr_channel_group *cg) { - struct sr_probe *probe; + struct sr_channel *probe; GVariant *gvar; GVariantBuilder gvb; diff --git a/hardware/fluke-dmm/api.c b/hardware/fluke-dmm/api.c index 3613e9b4..5a5323e5 100644 --- a/hardware/fluke-dmm/api.c +++ b/hardware/fluke-dmm/api.c @@ -69,7 +69,7 @@ static GSList *fluke_scan(const char *conn, const char *serialcomm) struct sr_dev_inst *sdi; struct drv_context *drvc; struct dev_context *devc; - struct sr_probe *probe; + struct sr_channel *probe; struct sr_serial_dev_inst *serial; GSList *devices; int retry, len, i, s; diff --git a/hardware/fx2lafw/api.c b/hardware/fx2lafw/api.c index 777bd148..7f35ea81 100644 --- a/hardware/fx2lafw/api.c +++ b/hardware/fx2lafw/api.c @@ -126,7 +126,7 @@ static GSList *scan(GSList *options) struct dev_context *devc; struct sr_dev_inst *sdi; struct sr_usb_dev_inst *usb; - struct sr_probe *probe; + struct sr_channel *probe; struct sr_config *src; const struct fx2lafw_profile *prof; GSList *l, *devices, *conn_devices; diff --git a/hardware/fx2lafw/protocol.c b/hardware/fx2lafw/protocol.c index 1ea90209..60dd9e69 100644 --- a/hardware/fx2lafw/protocol.c +++ b/hardware/fx2lafw/protocol.c @@ -295,7 +295,7 @@ SR_PRIV int fx2lafw_dev_open(struct sr_dev_inst *sdi, struct sr_dev_driver *di) SR_PRIV int fx2lafw_configure_probes(const struct sr_dev_inst *sdi) { struct dev_context *devc; - struct sr_probe *probe; + struct sr_channel *probe; GSList *l; int probe_bit, stage, i; char *tc; @@ -308,7 +308,7 @@ SR_PRIV int fx2lafw_configure_probes(const struct sr_dev_inst *sdi) stage = -1; for (l = sdi->probes; l; l = l->next) { - probe = (struct sr_probe *)l->data; + probe = (struct sr_channel *)l->data; if (probe->enabled == FALSE) continue; diff --git a/hardware/gmc-mh-1x-2x/api.c b/hardware/gmc-mh-1x-2x/api.c index 33a3eee7..ce849765 100644 --- a/hardware/gmc-mh-1x-2x/api.c +++ b/hardware/gmc-mh-1x-2x/api.c @@ -162,7 +162,7 @@ static GSList *scan_1x_2x_rs232(GSList *options) struct drv_context *drvc; struct dev_context *devc; struct sr_config *src; - struct sr_probe *probe; + struct sr_channel *probe; struct sr_serial_dev_inst *serial; GSList *l, *devices; const char *conn, *serialcomm; @@ -259,7 +259,7 @@ static GSList *scan_2x_bd232(GSList *options) struct drv_context *drvc; struct dev_context *devc; struct sr_config *src; - struct sr_probe *probe; + struct sr_channel *probe; struct sr_serial_dev_inst *serial; GSList *l, *devices; const char *conn, *serialcomm; diff --git a/hardware/hameg-hmo/api.c b/hardware/hameg-hmo/api.c index 3200d64c..2988823b 100644 --- a/hardware/hameg-hmo/api.c +++ b/hardware/hameg-hmo/api.c @@ -565,7 +565,7 @@ static int config_list(int key, GVariant **data, const struct sr_dev_inst *sdi, SR_PRIV int hmo_request_data(const struct sr_dev_inst *sdi) { char command[MAX_COMMAND_SIZE]; - struct sr_probe *probe; + struct sr_channel *probe; struct dev_context *devc; struct scope_config *model; @@ -596,7 +596,7 @@ SR_PRIV int hmo_request_data(const struct sr_dev_inst *sdi) static int hmo_check_probes(GSList *probes) { GSList *l; - struct sr_probe *probe; + struct sr_channel *probe; gboolean enabled_pod1, enabled_pod2, enabled_chan3, enabled_chan4; enabled_pod1 = enabled_pod2 = enabled_chan3 = enabled_chan4 = FALSE; @@ -636,7 +636,7 @@ static int hmo_setup_probes(const struct sr_dev_inst *sdi) char command[MAX_COMMAND_SIZE]; struct scope_state *state; struct scope_config *model; - struct sr_probe *probe; + struct sr_channel *probe; struct dev_context *devc; struct sr_scpi_dev_inst *scpi; @@ -712,7 +712,7 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi, void *cb_data) { GSList *l; gboolean digital_added; - struct sr_probe *probe; + struct sr_channel *probe; struct dev_context *devc; struct sr_scpi_dev_inst *scpi; diff --git a/hardware/hameg-hmo/protocol.c b/hardware/hameg-hmo/protocol.c index 6dda2d35..c364d224 100644 --- a/hardware/hameg-hmo/protocol.c +++ b/hardware/hameg-hmo/protocol.c @@ -581,7 +581,7 @@ SR_PRIV int hmo_init_device(struct sr_dev_inst *sdi) char tmp[25]; int model_index; unsigned int i, j; - struct sr_probe *probe; + struct sr_channel *probe; struct dev_context *devc; devc = sdi->priv; @@ -657,7 +657,7 @@ SR_PRIV int hmo_init_device(struct sr_dev_inst *sdi) SR_PRIV int hmo_receive_data(int fd, int revents, void *cb_data) { - struct sr_probe *probe; + struct sr_channel *probe; struct sr_dev_inst *sdi; struct dev_context *devc; struct sr_datafeed_packet packet; diff --git a/hardware/hantek-dso/api.c b/hardware/hantek-dso/api.c index a10af6c5..bb752958 100644 --- a/hardware/hantek-dso/api.c +++ b/hardware/hantek-dso/api.c @@ -160,7 +160,7 @@ static int dev_acquisition_stop(struct sr_dev_inst *sdi, void *cb_data); static struct sr_dev_inst *dso_dev_new(int index, const struct dso_profile *prof) { struct sr_dev_inst *sdi; - struct sr_probe *probe; + struct sr_channel *probe; struct drv_context *drvc; struct dev_context *devc; int i; @@ -213,7 +213,7 @@ static struct sr_dev_inst *dso_dev_new(int index, const struct dso_profile *prof static int configure_probes(const struct sr_dev_inst *sdi) { struct dev_context *devc; - struct sr_probe *probe; + struct sr_channel *probe; const GSList *l; int p; diff --git a/hardware/ikalogic-scanalogic2/api.c b/hardware/ikalogic-scanalogic2/api.c index ac5084d3..b00f9adf 100644 --- a/hardware/ikalogic-scanalogic2/api.c +++ b/hardware/ikalogic-scanalogic2/api.c @@ -59,7 +59,7 @@ static GSList *scan(GSList *options) GSList *usb_devices, *devices, *l; struct drv_context *drvc; struct sr_dev_inst *sdi; - struct sr_probe *probe; + struct sr_channel *probe; struct dev_context *devc; struct sr_usb_dev_inst *usb; struct device_info dev_info; diff --git a/hardware/ikalogic-scanalogic2/protocol.c b/hardware/ikalogic-scanalogic2/protocol.c index 87218de5..475b6225 100644 --- a/hardware/ikalogic-scanalogic2/protocol.c +++ b/hardware/ikalogic-scanalogic2/protocol.c @@ -482,7 +482,7 @@ SR_PRIV int sl2_set_limit_samples(const struct sr_dev_inst *sdi, SR_PRIV void sl2_configure_trigger(const struct sr_dev_inst *sdi) { struct dev_context *devc; - struct sr_probe *probe; + struct sr_channel *probe; uint8_t trigger_type; int probe_index, num_triggers_anyedge; char *trigger; diff --git a/hardware/ikalogic-scanalogic2/protocol.h b/hardware/ikalogic-scanalogic2/protocol.h index add5dda8..6cdb6072 100644 --- a/hardware/ikalogic-scanalogic2/protocol.h +++ b/hardware/ikalogic-scanalogic2/protocol.h @@ -152,7 +152,7 @@ struct dev_context { void *cb_data; /* Array to provide an index based access to all probes. */ - const struct sr_probe *probes[NUM_PROBES]; + const struct sr_channel *probes[NUM_PROBES]; struct libusb_transfer *xfer_in, *xfer_out; diff --git a/hardware/ikalogic-scanaplus/api.c b/hardware/ikalogic-scanaplus/api.c index 04ae5c99..ad39c9a0 100644 --- a/hardware/ikalogic-scanaplus/api.c +++ b/hardware/ikalogic-scanaplus/api.c @@ -74,7 +74,7 @@ static int init(struct sr_context *sr_ctx) static GSList *scan(GSList *options) { struct sr_dev_inst *sdi; - struct sr_probe *probe; + struct sr_channel *probe; struct drv_context *drvc; struct dev_context *devc; GSList *devices; diff --git a/hardware/kecheng-kc-330b/api.c b/hardware/kecheng-kc-330b/api.c index d9e4d5cf..279b7d62 100644 --- a/hardware/kecheng-kc-330b/api.c +++ b/hardware/kecheng-kc-330b/api.c @@ -112,7 +112,7 @@ static GSList *scan(GSList *options) struct drv_context *drvc; struct dev_context *devc; struct sr_dev_inst *sdi; - struct sr_probe *probe; + struct sr_channel *probe; GSList *usb_devices, *devices, *l; char *model; diff --git a/hardware/lascar-el-usb/protocol.c b/hardware/lascar-el-usb/protocol.c index b1f39ccd..bf859008 100644 --- a/hardware/lascar-el-usb/protocol.c +++ b/hardware/lascar-el-usb/protocol.c @@ -293,7 +293,7 @@ static struct sr_dev_inst *lascar_identify(unsigned char *config) struct dev_context *devc; const struct elusb_profile *profile; struct sr_dev_inst *sdi; - struct sr_probe *probe; + struct sr_channel *probe; int modelid, i; char firmware[5]; @@ -398,7 +398,7 @@ static void lascar_el_usb_dispatch(struct sr_dev_inst *sdi, unsigned char *buf, struct dev_context *devc; struct sr_datafeed_packet packet; struct sr_datafeed_analog analog; - struct sr_probe *probe; + struct sr_channel *probe; float *temp, *rh; uint16_t s; int samples, samples_left, i, j; diff --git a/hardware/link-mso19/api.c b/hardware/link-mso19/api.c index 3d40015c..daa08d1c 100644 --- a/hardware/link-mso19/api.c +++ b/hardware/link-mso19/api.c @@ -217,7 +217,7 @@ static GSList *scan(GSList *options) sdi->priv = devc; for (i = 0; i < NUM_PROBES; i++) { - struct sr_probe *probe; + struct sr_channel *probe; ptype = (i == 0) ? SR_PROBE_ANALOG : SR_PROBE_LOGIC; if (!(probe = sr_probe_new(i, ptype, TRUE, mso19_probe_names[i]))) diff --git a/hardware/link-mso19/protocol.c b/hardware/link-mso19/protocol.c index fbb50054..942f0488 100644 --- a/hardware/link-mso19/protocol.c +++ b/hardware/link-mso19/protocol.c @@ -438,7 +438,7 @@ SR_PRIV int mso_receive_data(int fd, int revents, void *cb_data) SR_PRIV int mso_configure_probes(const struct sr_dev_inst *sdi) { struct dev_context *devc; - struct sr_probe *probe; + struct sr_channel *probe; GSList *l; char *tc; @@ -453,7 +453,7 @@ SR_PRIV int mso_configure_probes(const struct sr_dev_inst *sdi) devc->use_trigger = FALSE; for (l = sdi->probes; l; l = l->next) { - probe = (struct sr_probe *)l->data; + probe = (struct sr_channel *)l->data; if (probe->enabled == FALSE) continue; diff --git a/hardware/mic-985xx/api.c b/hardware/mic-985xx/api.c index 1368b35e..0cb029cc 100644 --- a/hardware/mic-985xx/api.c +++ b/hardware/mic-985xx/api.c @@ -66,7 +66,7 @@ static GSList *mic_scan(const char *conn, const char *serialcomm, int idx) struct sr_dev_inst *sdi; struct drv_context *drvc; struct dev_context *devc; - struct sr_probe *probe; + struct sr_channel *probe; struct sr_serial_dev_inst *serial; GSList *devices; diff --git a/hardware/norma-dmm/api.c b/hardware/norma-dmm/api.c index 35a5d706..a11812e9 100644 --- a/hardware/norma-dmm/api.c +++ b/hardware/norma-dmm/api.c @@ -49,7 +49,7 @@ static GSList *scan(GSList *options) struct drv_context *drvc; struct dev_context *devc; struct sr_config *src; - struct sr_probe *probe; + struct sr_channel *probe; struct sr_serial_dev_inst *serial; GSList *l, *devices; int len, cnt; diff --git a/hardware/openbench-logic-sniffer/api.c b/hardware/openbench-logic-sniffer/api.c index 76942437..c45b931c 100644 --- a/hardware/openbench-logic-sniffer/api.c +++ b/hardware/openbench-logic-sniffer/api.c @@ -90,7 +90,7 @@ static GSList *scan(GSList *options) struct sr_dev_inst *sdi; struct drv_context *drvc; struct dev_context *devc; - struct sr_probe *probe; + struct sr_channel *probe; struct sr_serial_dev_inst *serial; GPollFD probefd; GSList *l, *devices; diff --git a/hardware/openbench-logic-sniffer/protocol.c b/hardware/openbench-logic-sniffer/protocol.c index 5e8dc76a..46316db4 100644 --- a/hardware/openbench-logic-sniffer/protocol.c +++ b/hardware/openbench-logic-sniffer/protocol.c @@ -57,7 +57,7 @@ SR_PRIV int send_longcommand(struct sr_serial_dev_inst *serial, SR_PRIV int ols_configure_probes(const struct sr_dev_inst *sdi) { struct dev_context *devc; - const struct sr_probe *probe; + const struct sr_channel *probe; const GSList *l; int probe_bit, stage, i; char *tc; @@ -72,7 +72,7 @@ SR_PRIV int ols_configure_probes(const struct sr_dev_inst *sdi) devc->num_stages = 0; for (l = sdi->probes; l; l = l->next) { - probe = (const struct sr_probe *)l->data; + probe = (const struct sr_channel *)l->data; if (!probe->enabled) continue; @@ -134,7 +134,7 @@ SR_PRIV struct sr_dev_inst *get_metadata(struct sr_serial_dev_inst *serial) { struct sr_dev_inst *sdi; struct dev_context *devc; - struct sr_probe *probe; + struct sr_channel *probe; uint32_t tmp_int, ui; uint8_t key, type, token; GString *tmp_str, *devname, *version; diff --git a/hardware/rigol-ds/api.c b/hardware/rigol-ds/api.c index da1fe250..c23805c6 100644 --- a/hardware/rigol-ds/api.c +++ b/hardware/rigol-ds/api.c @@ -260,7 +260,7 @@ static struct sr_dev_inst *probe_device(struct sr_scpi_dev_inst *scpi) struct dev_context *devc; struct sr_dev_inst *sdi; struct sr_scpi_hw_info *hw_info; - struct sr_probe *probe; + struct sr_channel *probe; long n[3]; unsigned int i; const struct rigol_ds_model *model = NULL; @@ -439,7 +439,7 @@ static int cleanup(void) static int analog_frame_size(const struct sr_dev_inst *sdi) { struct dev_context *devc = sdi->priv; - struct sr_probe *probe; + struct sr_channel *probe; int analog_probes = 0; GSList *l; @@ -480,7 +480,7 @@ static int config_get(int id, GVariant **data, const struct sr_dev_inst *sdi, const struct sr_channel_group *cg) { struct dev_context *devc; - struct sr_probe *probe; + struct sr_channel *probe; const char *tmp_str; uint64_t samplerate; int analog_channel = -1; @@ -865,7 +865,7 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi, void *cb_data) { struct sr_scpi_dev_inst *scpi; struct dev_context *devc; - struct sr_probe *probe; + struct sr_channel *probe; struct sr_datafeed_packet packet; GSList *l; diff --git a/hardware/rigol-ds/protocol.c b/hardware/rigol-ds/protocol.c index d1c568c2..d609b060 100644 --- a/hardware/rigol-ds/protocol.c +++ b/hardware/rigol-ds/protocol.c @@ -207,7 +207,7 @@ static int rigol_ds_stop_wait(const struct sr_dev_inst *sdi) static int rigol_ds_check_stop(const struct sr_dev_inst *sdi) { struct dev_context *devc; - struct sr_probe *probe; + struct sr_channel *probe; int tmp; if (!(devc = sdi->priv)) @@ -376,7 +376,7 @@ SR_PRIV int rigol_ds_capture_start(const struct sr_dev_inst *sdi) SR_PRIV int rigol_ds_channel_start(const struct sr_dev_inst *sdi) { struct dev_context *devc; - struct sr_probe *probe; + struct sr_channel *probe; if (!(devc = sdi->priv)) return SR_ERR; @@ -483,7 +483,7 @@ SR_PRIV int rigol_ds_receive(int fd, int revents, void *cb_data) struct sr_datafeed_logic logic; double vdiv, offset; int len, i, vref; - struct sr_probe *probe; + struct sr_channel *probe; gsize expected_data_bytes; (void)fd; diff --git a/hardware/saleae-logic16/api.c b/hardware/saleae-logic16/api.c index 40f7812c..2e47899d 100644 --- a/hardware/saleae-logic16/api.c +++ b/hardware/saleae-logic16/api.c @@ -136,7 +136,7 @@ static GSList *scan(GSList *options) struct dev_context *devc; struct sr_dev_inst *sdi; struct sr_usb_dev_inst *usb; - struct sr_probe *probe; + struct sr_channel *probe; struct sr_config *src; GSList *l, *devices, *conn_devices; struct libusb_device_descriptor des; @@ -624,7 +624,7 @@ static unsigned int get_timeout(struct dev_context *devc) static int configure_probes(const struct sr_dev_inst *sdi) { struct dev_context *devc; - struct sr_probe *probe; + struct sr_channel *probe; GSList *l; uint16_t probe_bit; @@ -633,7 +633,7 @@ static int configure_probes(const struct sr_dev_inst *sdi) devc->cur_channels = 0; devc->num_channels = 0; for (l = sdi->probes; l; l = l->next) { - probe = (struct sr_probe *)l->data; + probe = (struct sr_channel *)l->data; if (probe->enabled == FALSE) continue; diff --git a/hardware/serial-dmm/api.c b/hardware/serial-dmm/api.c index 3efe4f6a..2982aaac 100644 --- a/hardware/serial-dmm/api.c +++ b/hardware/serial-dmm/api.c @@ -337,7 +337,7 @@ static GSList *sdmm_scan(const char *conn, const char *serialcomm, int dmm) struct sr_dev_inst *sdi; struct drv_context *drvc; struct dev_context *devc; - struct sr_probe *probe; + struct sr_channel *probe; struct sr_serial_dev_inst *serial; GSList *devices; int dropped, ret; diff --git a/hardware/sysclk-lwla/api.c b/hardware/sysclk-lwla/api.c index f693b434..525af58e 100644 --- a/hardware/sysclk-lwla/api.c +++ b/hardware/sysclk-lwla/api.c @@ -75,7 +75,7 @@ static int init(struct sr_context *sr_ctx) static GSList *gen_probe_list(int num_probes) { GSList *list; - struct sr_probe *probe; + struct sr_channel *probe; int i; char name[8]; @@ -402,7 +402,7 @@ static int config_set(int key, GVariant *data, const struct sr_dev_inst *sdi, } static int config_probe_set(const struct sr_dev_inst *sdi, - struct sr_probe *probe, unsigned int changes) + struct sr_channel *probe, unsigned int changes) { uint64_t probe_bit; uint64_t trigger_mask; diff --git a/hardware/teleinfo/api.c b/hardware/teleinfo/api.c index f8fb3243..fa3b347c 100644 --- a/hardware/teleinfo/api.c +++ b/hardware/teleinfo/api.c @@ -49,7 +49,7 @@ static GSList *scan(GSList *options) struct dev_context *devc; struct sr_serial_dev_inst *serial; struct sr_dev_inst *sdi; - struct sr_probe *probe; + struct sr_channel *probe; GSList *devices = NULL, *l; const char *conn = NULL, *serialcomm = NULL; uint8_t buf[292]; diff --git a/hardware/teleinfo/protocol.c b/hardware/teleinfo/protocol.c index 746d43c0..5e0fa5e5 100644 --- a/hardware/teleinfo/protocol.c +++ b/hardware/teleinfo/protocol.c @@ -41,12 +41,12 @@ static gboolean teleinfo_control_check(char *label, char *data, char control) static gint teleinfo_probe_compare(gconstpointer a, gconstpointer b) { - const struct sr_probe *probe = a; + const struct sr_channel *probe = a; const char *name = b; return strcmp(probe->name, name); } -static struct sr_probe *teleinfo_find_probe(struct sr_dev_inst *sdi, +static struct sr_channel *teleinfo_find_probe(struct sr_dev_inst *sdi, const char *name) { GSList *elem = g_slist_find_custom(sdi->probes, name, @@ -60,7 +60,7 @@ static void teleinfo_send_value(struct sr_dev_inst *sdi, const char *probe_name, struct dev_context *devc; struct sr_datafeed_packet packet; struct sr_datafeed_analog analog; - struct sr_probe *probe; + struct sr_channel *probe; devc = sdi->priv; probe = teleinfo_find_probe(sdi, probe_name); diff --git a/hardware/tondaj-sl-814/api.c b/hardware/tondaj-sl-814/api.c index e6e28472..613f0945 100644 --- a/hardware/tondaj-sl-814/api.c +++ b/hardware/tondaj-sl-814/api.c @@ -51,7 +51,7 @@ static GSList *scan(GSList *options) struct dev_context *devc; struct sr_dev_inst *sdi; struct sr_config *src; - struct sr_probe *probe; + struct sr_channel *probe; GSList *devices, *l; const char *conn, *serialcomm; struct sr_serial_dev_inst *serial; diff --git a/hardware/uni-t-dmm/api.c b/hardware/uni-t-dmm/api.c index 2ec99ca1..40c928c7 100644 --- a/hardware/uni-t-dmm/api.c +++ b/hardware/uni-t-dmm/api.c @@ -181,7 +181,7 @@ static GSList *scan(GSList *options, int dmm) struct drv_context *drvc; struct sr_usb_dev_inst *usb; struct sr_config *src; - struct sr_probe *probe; + struct sr_channel *probe; const char *conn; drvc = udmms[dmm].di->priv; diff --git a/hardware/uni-t-ut32x/api.c b/hardware/uni-t-ut32x/api.c index 3a0327bb..67fecd32 100644 --- a/hardware/uni-t-ut32x/api.c +++ b/hardware/uni-t-ut32x/api.c @@ -53,7 +53,7 @@ static GSList *scan(GSList *options) struct drv_context *drvc; struct dev_context *devc; struct sr_dev_inst *sdi; - struct sr_probe *probe; + struct sr_channel *probe; struct sr_config *src; GSList *usb_devices, *devices, *l; int i; diff --git a/hardware/victor-dmm/api.c b/hardware/victor-dmm/api.c index f7944973..5d772e89 100644 --- a/hardware/victor-dmm/api.c +++ b/hardware/victor-dmm/api.c @@ -56,7 +56,7 @@ static GSList *scan(GSList *options) struct drv_context *drvc; struct dev_context *devc; struct sr_dev_inst *sdi; - struct sr_probe *probe; + struct sr_channel *probe; struct libusb_device_descriptor des; libusb_device **devlist; GSList *devices; diff --git a/hardware/zeroplus-logic-cube/api.c b/hardware/zeroplus-logic-cube/api.c index 63b2efd9..f30551e8 100644 --- a/hardware/zeroplus-logic-cube/api.c +++ b/hardware/zeroplus-logic-cube/api.c @@ -127,7 +127,7 @@ static int dev_close(struct sr_dev_inst *sdi); static int configure_probes(const struct sr_dev_inst *sdi) { struct dev_context *devc; - const struct sr_probe *probe; + const struct sr_channel *probe; const GSList *l; int probe_bit, stage, i; char *tc; @@ -143,7 +143,7 @@ static int configure_probes(const struct sr_dev_inst *sdi) stage = -1; for (l = sdi->probes; l; l = l->next) { - probe = (struct sr_probe *)l->data; + probe = (struct sr_channel *)l->data; if (probe->enabled == FALSE) continue; probe_bit = 1 << (probe->index); @@ -170,7 +170,7 @@ static int configure_probes(const struct sr_dev_inst *sdi) { struct dev_context *devc; const GSList *l; - const struct sr_probe *probe; + const struct sr_channel *probe; char *tc; int type; @@ -178,7 +178,7 @@ static int configure_probes(const struct sr_dev_inst *sdi) devc = sdi->priv; for (l = sdi->probes; l; l = l->next) { - probe = (struct sr_probe *)l->data; + probe = (struct sr_channel *)l->data; if (probe->enabled == FALSE) continue; @@ -247,7 +247,7 @@ static int init(struct sr_context *sr_ctx) static GSList *scan(GSList *options) { struct sr_dev_inst *sdi; - struct sr_probe *probe; + struct sr_channel *probe; struct drv_context *drvc; struct dev_context *devc; const struct zp_model *prof; diff --git a/input/binary.c b/input/binary.c index dfeedee7..59b027ee 100644 --- a/input/binary.c +++ b/input/binary.c @@ -45,7 +45,7 @@ static int format_match(const char *filename) static int init(struct sr_input *in, const char *filename) { - struct sr_probe *probe; + struct sr_channel *probe; int num_probes, i; char name[SR_MAX_PROBENAME_LEN + 1]; char *param; diff --git a/input/chronovu_la8.c b/input/chronovu_la8.c index 9f129be4..620b5aa3 100644 --- a/input/chronovu_la8.c +++ b/input/chronovu_la8.c @@ -96,7 +96,7 @@ static int format_match(const char *filename) static int init(struct sr_input *in, const char *filename) { - struct sr_probe *probe; + struct sr_channel *probe; int num_probes, i; char name[SR_MAX_PROBENAME_LEN + 1]; char *param; diff --git a/input/csv.c b/input/csv.c index 65c6b3f9..3b394d0b 100644 --- a/input/csv.c +++ b/input/csv.c @@ -432,7 +432,7 @@ static int init(struct sr_input *in, const char *filename) GIOStatus status; gsize i, term_pos; char probe_name[SR_MAX_PROBENAME_LEN + 1]; - struct sr_probe *probe; + struct sr_channel *probe; char **columns; gsize num_columns; char *ptr; diff --git a/input/vcd.c b/input/vcd.c index 66af8664..6f947977 100644 --- a/input/vcd.c +++ b/input/vcd.c @@ -287,7 +287,7 @@ static int format_match(const char *filename) static int init(struct sr_input *in, const char *filename) { - struct sr_probe *probe; + struct sr_channel *probe; int num_probes, i; char name[SR_MAX_PROBENAME_LEN + 1]; char *param; diff --git a/input/wav.c b/input/wav.c index 0106a586..5b3e3c2a 100644 --- a/input/wav.c +++ b/input/wav.c @@ -85,7 +85,7 @@ static int format_match(const char *filename) static int init(struct sr_input *in, const char *filename) { - struct sr_probe *probe; + struct sr_channel *probe; struct context *ctx; char buf[40], probename[8]; int i; diff --git a/libsigrok-internal.h b/libsigrok-internal.h index 3d71f597..687e0327 100644 --- a/libsigrok-internal.h +++ b/libsigrok-internal.h @@ -232,7 +232,7 @@ enum { SR_PROBE_SET_TRIGGER = 1 << 1, }; -SR_PRIV struct sr_probe *sr_probe_new(int index, int type, +SR_PRIV struct sr_channel *sr_probe_new(int index, int type, gboolean enabled, const char *name); /* Generic device instances */ diff --git a/libsigrok.h b/libsigrok.h index 382f502b..34c61334 100644 --- a/libsigrok.h +++ b/libsigrok.h @@ -605,15 +605,15 @@ enum { SR_PROBE_ANALOG, }; -/** Information on single probe. */ -struct sr_probe { - /** Number of probes, starting at 0. */ +/** Information on single channel. */ +struct sr_channel { + /** Number of channels, starting at 0. */ int index; - /** Probe type (SR_PROBE_LOGIC, ...) */ + /** Channel type (SR_PROBE_LOGIC, ...) */ int type; - /** Is this probe enabled? */ + /** Is this channel enabled? */ gboolean enabled; - /** Name of probe. */ + /** Name of channel. */ char *name; /** Trigger string, format like used by sigrok-cli */ char *trigger; @@ -623,7 +623,7 @@ struct sr_probe { struct sr_channel_group { /** Name of the channel group. */ char *name; - /** List of sr_probe structs of the channels belonging to this group. */ + /** List of sr_channel structs of the channels belonging to this group. */ GSList *channels; /** Private data for driver use. */ void *priv; @@ -995,7 +995,7 @@ struct sr_dev_driver { /** Probe status change. * @see sr_dev_probe_enable(), sr_dev_trigger_set(). */ int (*config_probe_set) (const struct sr_dev_inst *sdi, - struct sr_probe *probe, unsigned int changes); + struct sr_channel *probe, unsigned int changes); /** Apply configuration settings to the device hardware. * @see sr_config_commit().*/ int (*config_commit) (const struct sr_dev_inst *sdi); diff --git a/output/analog.c b/output/analog.c index 8141525d..ca3a2a0b 100644 --- a/output/analog.c +++ b/output/analog.c @@ -34,7 +34,7 @@ struct context { static int init(struct sr_output *o) { struct context *ctx; - struct sr_probe *probe; + struct sr_channel *probe; GSList *l; sr_spew("Initializing output module."); @@ -210,7 +210,7 @@ static int receive(struct sr_output *o, const struct sr_dev_inst *sdi, const struct sr_datafeed_packet *packet, GString **out) { const struct sr_datafeed_analog *analog; - struct sr_probe *probe; + struct sr_channel *probe; GSList *l; const float *fdata; int i, p; diff --git a/output/chronovu_la8.c b/output/chronovu_la8.c index e16f6174..0d050fc0 100644 --- a/output/chronovu_la8.c +++ b/output/chronovu_la8.c @@ -84,7 +84,7 @@ static uint8_t samplerate_to_divcount(uint64_t samplerate) static int init(struct sr_output *o) { struct context *ctx; - struct sr_probe *probe; + struct sr_channel *probe; GSList *l; GVariant *gvar; diff --git a/output/csv.c b/output/csv.c index 28eedd6e..ab6217df 100644 --- a/output/csv.c +++ b/output/csv.c @@ -50,7 +50,7 @@ struct context { static int init(struct sr_output *o) { struct context *ctx; - struct sr_probe *probe; + struct sr_channel *probe; GSList *l; GVariant *gvar; int num_probes; diff --git a/output/gnuplot.c b/output/gnuplot.c index cadd4fa3..8976263a 100644 --- a/output/gnuplot.c +++ b/output/gnuplot.c @@ -51,7 +51,7 @@ static const char *gnuplot_header_comment = "\ static int init(struct sr_output *o) { struct context *ctx; - struct sr_probe *probe; + struct sr_channel *probe; GSList *l; GVariant *gvar; uint64_t samplerate; diff --git a/output/ols.c b/output/ols.c index 9f9cc957..19c4d993 100644 --- a/output/ols.c +++ b/output/ols.c @@ -56,7 +56,7 @@ static int init(struct sr_output *o) static GString *gen_header(const struct sr_dev_inst *sdi, struct context *ctx) { - struct sr_probe *probe; + struct sr_channel *probe; GSList *l; GString *s; GVariant *gvar; diff --git a/output/text/text.c b/output/text/text.c index 47d0542b..54350b88 100644 --- a/output/text/text.c +++ b/output/text/text.c @@ -74,7 +74,7 @@ SR_PRIV void flush_linebufs(struct context *ctx, uint8_t *outbuf) SR_PRIV int init(struct sr_output *o, int default_spl, enum outputmode mode) { struct context *ctx; - struct sr_probe *probe; + struct sr_channel *probe; GSList *l; GVariant *gvar; uint64_t samplerate; diff --git a/output/vcd.c b/output/vcd.c index 79145c1a..7df34521 100644 --- a/output/vcd.c +++ b/output/vcd.c @@ -45,7 +45,7 @@ static const char *const vcd_header_comment = static int init(struct sr_output *o) { struct context *ctx; - struct sr_probe *probe; + struct sr_channel *probe; GSList *l; GVariant *gvar; int num_probes, i; diff --git a/session_file.c b/session_file.c index 11adb47f..84163a30 100644 --- a/session_file.c +++ b/session_file.c @@ -113,7 +113,7 @@ SR_API int sr_session_load(const char *filename) struct zip_file *zf; struct zip_stat zs; struct sr_dev_inst *sdi; - struct sr_probe *probe; + struct sr_channel *probe; int ret, probenum, devcnt, i, j; uint64_t tmp_u64, total_probes, enabled_probes, p; char **sections, **keys, *metafile, *val; @@ -234,7 +234,7 @@ SR_API int sr_session_load(const char *filename) SR_API int sr_session_save(const char *filename, const struct sr_dev_inst *sdi, unsigned char *buf, int unitsize, int units) { - struct sr_probe *probe; + struct sr_channel *probe; GSList *l; GVariant *gvar; uint64_t samplerate; diff --git a/strutil.c b/strutil.c index 0438c5ec..356f6f83 100644 --- a/strutil.c +++ b/strutil.c @@ -381,7 +381,7 @@ SR_API char **sr_parse_triggerstring(const struct sr_dev_inst *sdi, { GSList *l; GVariant *gvar; - struct sr_probe *probe; + struct sr_channel *probe; int max_probes, probenum, i; char **tokens, **triggerlist, *trigger, *tc; const char *trigger_types; @@ -406,7 +406,7 @@ SR_API char **sr_parse_triggerstring(const struct sr_dev_inst *sdi, for (i = 0; tokens[i]; i++) { probenum = -1; for (l = sdi->probes; l; l = l->next) { - probe = (struct sr_probe *)l->data; + probe = (struct sr_channel *)l->data; if (probe->enabled && !strncmp(probe->name, tokens[i], strlen(probe->name))) { diff --git a/tests/lib.c b/tests/lib.c index faffc3a9..09b697e8 100644 --- a/tests/lib.c +++ b/tests/lib.c @@ -213,7 +213,7 @@ 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) { - struct sr_probe *probe; + struct sr_channel *probe; GArray *probes; GSList *l;