]> sigrok.org Git - libsigrok.git/commitdiff
Rename sr_probe_new() to sr_channel_new().
authorUwe Hermann <redacted>
Mon, 24 Mar 2014 20:36:04 +0000 (21:36 +0100)
committerUwe Hermann <redacted>
Tue, 25 Mar 2014 19:58:54 +0000 (20:58 +0100)
This fixes parts of bug #259.

45 files changed:
device.c
hardware/agilent-dmm/api.c
hardware/alsa/protocol.c
hardware/appa-55ii/api.c
hardware/asix-sigma/asix-sigma.c
hardware/atten-pps3xxx/api.c
hardware/brymen-bm86x/api.c
hardware/brymen-dmm/api.c
hardware/cem-dt-885x/api.c
hardware/center-3xx/api.c
hardware/chronovu-la8/api.c
hardware/colead-slm/api.c
hardware/conrad-digi-35-cpu/api.c
hardware/demo/demo.c
hardware/fluke-dmm/api.c
hardware/fx2lafw/api.c
hardware/gmc-mh-1x-2x/api.c
hardware/hameg-hmo/protocol.c
hardware/hantek-dso/api.c
hardware/ikalogic-scanalogic2/api.c
hardware/ikalogic-scanaplus/api.c
hardware/kecheng-kc-330b/api.c
hardware/lascar-el-usb/protocol.c
hardware/link-mso19/api.c
hardware/mic-985xx/api.c
hardware/norma-dmm/api.c
hardware/openbench-logic-sniffer/api.c
hardware/openbench-logic-sniffer/protocol.c
hardware/rigol-ds/api.c
hardware/saleae-logic16/api.c
hardware/serial-dmm/api.c
hardware/sysclk-lwla/api.c
hardware/teleinfo/api.c
hardware/tondaj-sl-814/api.c
hardware/uni-t-dmm/api.c
hardware/uni-t-ut32x/api.c
hardware/victor-dmm/api.c
hardware/zeroplus-logic-cube/api.c
input/binary.c
input/chronovu_la8.c
input/csv.c
input/vcd.c
input/wav.c
libsigrok-internal.h
session_file.c

index b539eceea65f1013ba32d0f02e59eaf2170ec2a9..04adcccf081d768f45d6cd9ecfafbd09b8ddbb65 100644 (file)
--- a/device.c
+++ b/device.c
@@ -48,7 +48,7 @@
  *
  *  @return NULL (failure) or new struct sr_channel*.
  */
-SR_PRIV struct sr_channel *sr_probe_new(int index, int type,
+SR_PRIV struct sr_channel *sr_channel_new(int index, int type,
                gboolean enabled, const char *name)
 {
        struct sr_channel *ch;
index c358640da3687eee9f9cc75baae1522946659928..bbe4c71f08b4f06616c00ae0014f3231846a8946 100644 (file)
@@ -141,7 +141,7 @@ static GSList *scan(GSList *options)
                        sdi->conn = serial;
                        sdi->priv = devc;
                        sdi->driver = di;
-                       if (!(ch = sr_probe_new(0, SR_PROBE_ANALOG, TRUE, "P1")))
+                       if (!(ch = sr_channel_new(0, SR_PROBE_ANALOG, TRUE, "P1")))
                                return NULL;
                        sdi->channels = g_slist_append(sdi->channels, ch);
                        drvc->instances = g_slist_append(drvc->instances, sdi);
index d06a10efad7926e243a9eded08dae805e49035fd..987e7a7e68bf510ee7006f7069388ba1b6774e08 100644 (file)
@@ -159,7 +159,7 @@ static void alsa_scan_handle_dev(GSList **devices,
 
        for (i = 0; i < devc->num_channels; i++) {
                snprintf(p_name, sizeof(p_name), "Ch_%d", i);
-               if (!(ch = sr_probe_new(i, SR_PROBE_ANALOG, TRUE, p_name)))
+               if (!(ch = sr_channel_new(i, SR_PROBE_ANALOG, TRUE, p_name)))
                        goto scan_error_cleanup;
                sdi->channels = g_slist_append(sdi->channels, ch);
        }
index 667b1c97cb36747a93b3b0fe2b179145ef38ffdc..8bbe45a0872c64e670ecefbf454fb1b28fb23759 100644 (file)
@@ -111,10 +111,10 @@ static GSList *scan(GSList *options)
        sdi->priv = devc;
        sdi->driver = di;
 
-       if (!(ch = sr_probe_new(0, SR_PROBE_ANALOG, TRUE, "T1")))
+       if (!(ch = sr_channel_new(0, SR_PROBE_ANALOG, TRUE, "T1")))
                goto scan_cleanup;
        sdi->channels = g_slist_append(sdi->channels, ch);
-       if (!(ch = sr_probe_new(0, SR_PROBE_ANALOG, TRUE, "T2")))
+       if (!(ch = sr_channel_new(0, SR_PROBE_ANALOG, TRUE, "T2")))
                goto scan_cleanup;
        sdi->channels = g_slist_append(sdi->channels, ch);
 
index 932de635683fcf52468334f1bea9e291ab981ee4..d32e91287e24447f89def9e6cb1c0d8887072b58 100644 (file)
@@ -464,7 +464,7 @@ static GSList *scan(GSList *options)
        sdi->driver = di;
 
        for (i = 0; channel_names[i]; i++) {
-               if (!(ch = sr_probe_new(i, SR_PROBE_LOGIC, TRUE,
+               if (!(ch = sr_channel_new(i, SR_PROBE_LOGIC, TRUE,
                                channel_names[i])))
                        return NULL;
                sdi->channels = g_slist_append(sdi->channels, ch);
index 6dc62511dc4bed0ec9cb9ba51185e699b62101c8..e74c40de179dd3acdb9a19d6d5667ce6c7c43228 100644 (file)
@@ -167,7 +167,7 @@ static GSList *scan(GSList *options, int modelid)
        sdi->conn = serial;
        for (i = 0; i < MAX_CHANNELS; i++) {
                snprintf(channel, 10, "CH%d", i + 1);
-               ch = sr_probe_new(i, SR_PROBE_ANALOG, TRUE, channel);
+               ch = sr_channel_new(i, SR_PROBE_ANALOG, TRUE, channel);
                sdi->channels = g_slist_append(sdi->channels, ch);
                cg = g_malloc(sizeof(struct sr_channel_group));
                cg->name = g_strdup(channel);
index 22a4862af4da0d5dcffbd0719ae8a5b8a6269ce9..1c7aaa2f13321ee5b3c133efb8ebfd39d0c0b5e3 100644 (file)
@@ -86,10 +86,10 @@ static GSList *scan(GSList *options)
 
                sdi->priv = devc;
                sdi->driver = di;
-               if (!(ch = sr_probe_new(0, SR_PROBE_ANALOG, TRUE, "P1")))
+               if (!(ch = sr_channel_new(0, SR_PROBE_ANALOG, TRUE, "P1")))
                        return NULL;
                sdi->channels = g_slist_append(sdi->channels, ch);
-               if (!(ch = sr_probe_new(0, SR_PROBE_ANALOG, TRUE, "P2")))
+               if (!(ch = sr_channel_new(0, SR_PROBE_ANALOG, TRUE, "P2")))
                        return NULL;
                sdi->channels = g_slist_append(sdi->channels, ch);
 
index fced965499972e2fd2a0183705b25a37d68837d0..52b49a18a55888cf5d4ed6ad4558cf8053022a08 100644 (file)
@@ -89,7 +89,7 @@ static GSList *brymen_scan(const char *conn, const char *serialcomm)
        sdi->priv = devc;
        sdi->driver = di;
 
-       if (!(ch = sr_probe_new(0, SR_PROBE_ANALOG, TRUE, "P1")))
+       if (!(ch = sr_channel_new(0, SR_PROBE_ANALOG, TRUE, "P1")))
                goto scan_cleanup;
 
        sdi->channels = g_slist_append(sdi->channels, ch);
index 6a5b327566e3a332c4673f370b68df7f4f26f1ec..7170c6f7f168da8dccbaddd64b389437c816fad5 100644 (file)
@@ -126,7 +126,7 @@ static GSList *scan(GSList *options)
                        sdi->inst_type = SR_INST_SERIAL;
                        sdi->priv = devc;
                        sdi->driver = di;
-                       if (!(ch = sr_probe_new(0, SR_PROBE_ANALOG, TRUE, "SPL")))
+                       if (!(ch = sr_channel_new(0, SR_PROBE_ANALOG, TRUE, "SPL")))
                                return NULL;
                        sdi->channels = g_slist_append(sdi->channels, ch);
                        drvc->instances = g_slist_append(drvc->instances, sdi);
index e2b9900472c7acf16e497630ff0a01a216b9c674..68fa1d5509632e363c063041091f86d0c3af8e93 100644 (file)
@@ -103,7 +103,7 @@ static GSList *center_scan(const char *conn, const char *serialcomm, int idx)
        sdi->driver = center_devs[idx].di;
 
        for (i = 0; i <  center_devs[idx].num_channels; i++) {
-               if (!(ch = sr_probe_new(i, SR_PROBE_ANALOG,
+               if (!(ch = sr_channel_new(i, SR_PROBE_ANALOG,
                                           TRUE, channel_names[i])))
                        goto scan_cleanup;
                sdi->channels = g_slist_append(sdi->channels, ch);
index 9d07955941cc674dfb94ac3db487948219f9a193..75757c24d41cd2046c71dfda8a6928d142fc8ad3 100644 (file)
@@ -154,7 +154,7 @@ static GSList *scan(GSList *options)
        sdi->priv = devc;
 
        for (i = 0; chronovu_la8_channel_names[i]; i++) {
-               if (!(ch = sr_probe_new(i, SR_PROBE_LOGIC, TRUE,
+               if (!(ch = sr_channel_new(i, SR_PROBE_LOGIC, TRUE,
                                           chronovu_la8_channel_names[i])))
                        return NULL;
                sdi->channels = g_slist_append(sdi->channels, ch);
index a73fe299df1678b390b02c025c43b818d426655e..cd3b8ce88ba997308a18e4ee3063e9222c298fd3 100644 (file)
@@ -97,7 +97,7 @@ static GSList *scan(GSList *options)
        sdi->inst_type = SR_INST_SERIAL;
        sdi->priv = devc;
        sdi->driver = di;
-       if (!(ch = sr_probe_new(0, SR_PROBE_ANALOG, TRUE, "P1")))
+       if (!(ch = sr_channel_new(0, SR_PROBE_ANALOG, TRUE, "P1")))
                return NULL;
        sdi->channels = g_slist_append(sdi->channels, ch);
        drvc->instances = g_slist_append(drvc->instances, sdi);
index 9d5f9d0d49e27b24c7ff6123ddb8bd515e06f1d2..7a21fb7752bb7f86142fa13977816461c81e21d3 100644 (file)
@@ -101,7 +101,7 @@ static GSList *scan(GSList *options)
        sdi->conn = serial;
        sdi->priv = NULL;
        sdi->driver = di;
-       if (!(ch = sr_probe_new(0, SR_PROBE_ANALOG, TRUE, "CH1")))
+       if (!(ch = sr_channel_new(0, SR_PROBE_ANALOG, TRUE, "CH1")))
                return NULL;
        sdi->channels = g_slist_append(sdi->channels, ch);
 
index 3c6585dd0086d81fad2a7e5957a5c2357a8ff171..3573d50e2afd392f8c6fd6b7f38da0a86800960f 100644 (file)
@@ -309,7 +309,7 @@ static GSList *scan(GSList *options)
        cg->priv = NULL;
        for (i = 0; i < num_logic_channels; i++) {
                sprintf(channel_name, "D%d", i);
-               if (!(ch = sr_probe_new(i, SR_PROBE_LOGIC, TRUE, channel_name)))
+               if (!(ch = sr_channel_new(i, SR_PROBE_LOGIC, TRUE, channel_name)))
                        return NULL;
                sdi->channels = g_slist_append(sdi->channels, ch);
                cg->channels = g_slist_append(cg->channels, ch);
@@ -321,7 +321,7 @@ static GSList *scan(GSList *options)
        pattern = 0;
        for (i = 0; i < num_analog_channels; i++) {
                sprintf(channel_name, "A%d", i);
-               if (!(ch = sr_probe_new(i + num_logic_channels,
+               if (!(ch = sr_channel_new(i + num_logic_channels,
                                SR_PROBE_ANALOG, TRUE, channel_name)))
                        return NULL;
                sdi->channels = g_slist_append(sdi->channels, ch);
index 83aaad4c17381e9c734e5a5f707476a8748ebbb2..f2453aa2bf4439dcd3f9cb5ee7d0b256d1ccb27a 100644 (file)
@@ -135,7 +135,7 @@ static GSList *fluke_scan(const char *conn, const char *serialcomm)
                                sdi->conn = serial;
                                sdi->priv = devc;
                                sdi->driver = di;
-                               if (!(ch = sr_probe_new(0, SR_PROBE_ANALOG, TRUE, "P1")))
+                               if (!(ch = sr_channel_new(0, SR_PROBE_ANALOG, TRUE, "P1")))
                                        return NULL;
                                sdi->channels = g_slist_append(sdi->channels, ch);
                                drvc->instances = g_slist_append(drvc->instances, sdi);
index b11a2e1a93ea4fd47ef8f0adce761c14a0570d18..eabf6bd7cd0334322c4c683a342cd19f4d6d8127 100644 (file)
@@ -197,7 +197,7 @@ static GSList *scan(GSList *options)
                /* Fill in channellist according to this device's profile. */
                num_logic_channels = prof->dev_caps & DEV_CAPS_16BIT ? 16 : 8;
                for (j = 0; j < num_logic_channels; j++) {
-                       if (!(ch = sr_probe_new(j, SR_PROBE_LOGIC, TRUE,
+                       if (!(ch = sr_channel_new(j, SR_PROBE_LOGIC, TRUE,
                                        channel_names[j])))
                                return NULL;
                        sdi->channels = g_slist_append(sdi->channels, ch);
index 98d200e7c8940dddc350803a59844a65ce2a5fc9..2f05993e3a01aacd8321c53d74e86533e5245f49 100644 (file)
@@ -240,7 +240,7 @@ static GSList *scan_1x_2x_rs232(GSList *options)
                sdi->conn = serial;
                sdi->priv = devc;
                sdi->driver = &gmc_mh_1x_2x_rs232_driver_info;
-               if (!(ch = sr_probe_new(0, SR_PROBE_ANALOG, TRUE, "P1")))
+               if (!(ch = sr_channel_new(0, SR_PROBE_ANALOG, TRUE, "P1")))
                        return NULL;
                sdi->channels = g_slist_append(sdi->channels, ch);
                drvc->instances = g_slist_append(drvc->instances, sdi);
@@ -343,7 +343,7 @@ static GSList *scan_2x_bd232(GSList *options)
                        sdi->conn = serial;
                        sdi->priv = devc;
                        sdi->driver = &gmc_mh_2x_bd232_driver_info;
-                       if (!(ch = sr_probe_new(0, SR_PROBE_ANALOG, TRUE, "P1")))
+                       if (!(ch = sr_channel_new(0, SR_PROBE_ANALOG, TRUE, "P1")))
                                goto exit_err;
                        sdi->channels = g_slist_append(sdi->channels, ch);
                        drvc->instances = g_slist_append(drvc->instances, sdi);
index eedaf7975b139d8c41e59c403c3f855a4c78c376..6348da18a520f10d56af2a03743efd3aa81be961 100644 (file)
@@ -614,7 +614,7 @@ SR_PRIV int hmo_init_device(struct sr_dev_inst *sdi)
 
        /* Add analog channels. */
        for (i = 0; i < scope_models[model_index].analog_channels; i++) {
-               if (!(ch = sr_probe_new(i, SR_PROBE_ANALOG, TRUE,
+               if (!(ch = sr_channel_new(i, SR_PROBE_ANALOG, TRUE,
                           (*scope_models[model_index].analog_names)[i])))
                        return SR_ERR_MALLOC;
                sdi->channels = g_slist_append(sdi->channels, ch);
@@ -637,7 +637,7 @@ SR_PRIV int hmo_init_device(struct sr_dev_inst *sdi)
 
        /* Add digital channels. */
        for (i = 0; i < scope_models[model_index].digital_channels; i++) {
-               if (!(ch = sr_probe_new(i, SR_PROBE_LOGIC, TRUE,
+               if (!(ch = sr_channel_new(i, SR_PROBE_LOGIC, TRUE,
                           (*scope_models[model_index].digital_names)[i])))
                        return SR_ERR_MALLOC;
                sdi->channels = g_slist_append(sdi->channels, ch);
index c4c1464ac98f1a7024c9d5bb81ef8927f08678a6..924516056ea865c561e1e550891c8d23ecbd08ed 100644 (file)
@@ -176,7 +176,7 @@ static struct sr_dev_inst *dso_dev_new(int index, const struct dso_profile *prof
         * a trigger source internal to the device.
         */
        for (i = 0; channel_names[i]; i++) {
-               if (!(ch = sr_probe_new(i, SR_PROBE_ANALOG, TRUE,
+               if (!(ch = sr_channel_new(i, SR_PROBE_ANALOG, TRUE,
                                channel_names[i])))
                        return NULL;
                sdi->channels = g_slist_append(sdi->channels, ch);
index 0443bc9f7908dbf46af8ec4299152da9eca35674..9ff4a2857bcdb1935129a9c5e6300649bc3fee62 100644 (file)
@@ -137,7 +137,7 @@ static GSList *scan(GSList *options)
                sdi->conn = usb;
 
                for (i = 0; channel_names[i]; i++) {
-                       ch = sr_probe_new(i, SR_PROBE_LOGIC, TRUE,
+                       ch = sr_channel_new(i, SR_PROBE_LOGIC, TRUE,
                                channel_names[i]);
                        sdi->channels = g_slist_append(sdi->channels, ch);
                        devc->channels[i] = ch;
index 07ef3df335b43d7bf86fdcdc5f0fe1e6836220ef..369aed470b11c475a7366b4bd7347c7d631331a9 100644 (file)
@@ -133,7 +133,7 @@ static GSList *scan(GSList *options)
        sdi->priv = devc;
 
        for (i = 0; channel_names[i]; i++) {
-               if (!(ch = sr_probe_new(i, SR_PROBE_LOGIC, TRUE,
+               if (!(ch = sr_channel_new(i, SR_PROBE_LOGIC, TRUE,
                                           channel_names[i])))
                        return NULL;
                sdi->channels = g_slist_append(sdi->channels, ch);
index fcb54381e01b9da030bdfe2ac0b0d65e8e965b38..21d202f56e690e9943efe5e1f153ab322baf3933 100644 (file)
@@ -135,7 +135,7 @@ static GSList *scan(GSList *options)
                        sdi->driver = di;
                        sdi->inst_type = SR_INST_USB;
                        sdi->conn = l->data;
-                       if (!(ch = sr_probe_new(0, SR_PROBE_ANALOG, TRUE, "SPL")))
+                       if (!(ch = sr_channel_new(0, SR_PROBE_ANALOG, TRUE, "SPL")))
                                return NULL;
                        sdi->channels = g_slist_append(sdi->channels, ch);
 
index eeb22199f36fdfe2dd74e17afed64fa6b5548d2c..5347e1eb8604c9c7315f9ae66a267274a061891c 100644 (file)
@@ -330,18 +330,18 @@ static struct sr_dev_inst *lascar_identify(unsigned char *config)
 
                if (profile->logformat == LOG_TEMP_RH) {
                        /* Model this as two channels: temperature and humidity. */
-                       if (!(ch = sr_probe_new(0, SR_PROBE_ANALOG, TRUE, "Temp")))
+                       if (!(ch = sr_channel_new(0, SR_PROBE_ANALOG, TRUE, "Temp")))
                                return NULL;
                        sdi->channels = g_slist_append(NULL, ch);
-                       if (!(ch = sr_probe_new(0, SR_PROBE_ANALOG, TRUE, "Hum")))
+                       if (!(ch = sr_channel_new(0, SR_PROBE_ANALOG, TRUE, "Hum")))
                                return NULL;
                        sdi->channels = g_slist_append(sdi->channels, ch);
                } else if (profile->logformat == LOG_CO) {
-                       if (!(ch = sr_probe_new(0, SR_PROBE_ANALOG, TRUE, "CO")))
+                       if (!(ch = sr_channel_new(0, SR_PROBE_ANALOG, TRUE, "CO")))
                                return NULL;
                        sdi->channels = g_slist_append(NULL, ch);
                } else {
-                       if (!(ch = sr_probe_new(0, SR_PROBE_ANALOG, TRUE, "P1")))
+                       if (!(ch = sr_channel_new(0, SR_PROBE_ANALOG, TRUE, "P1")))
                                return NULL;
                        sdi->channels = g_slist_append(NULL, ch);
                }
index f1b28e93bca7313a1145dc89d7b2a24606bbf151..9e0273aec6b0e80b4aa17c3fa8156016137f93f6 100644 (file)
@@ -219,7 +219,7 @@ static GSList *scan(GSList *options)
                for (i = 0; i < NUM_PROBES; i++) {
                        struct sr_channel *ch;
                        ptype = (i == 0) ? SR_PROBE_ANALOG : SR_PROBE_LOGIC;
-                       if (!(ch = sr_probe_new(i, ptype, TRUE,
+                       if (!(ch = sr_channel_new(i, ptype, TRUE,
                                                   mso19_channel_names[i])))
                                return 0;
                        sdi->channels = g_slist_append(sdi->channels, ch);
index 257d0d18584ae2d8f7f88e88feaf90b8d5817d48..09cd7d60de0e3b38e159d4b2f41c89c98549063b 100644 (file)
@@ -101,12 +101,12 @@ static GSList *mic_scan(const char *conn, const char *serialcomm, int idx)
        sdi->priv = devc;
        sdi->driver = mic_devs[idx].di;
 
-       if (!(ch = sr_probe_new(0, SR_PROBE_ANALOG, TRUE, "Temperature")))
+       if (!(ch = sr_channel_new(0, SR_PROBE_ANALOG, TRUE, "Temperature")))
                goto scan_cleanup;
        sdi->channels = g_slist_append(sdi->channels, ch);
 
        if (mic_devs[idx].has_humidity) {
-               if (!(ch = sr_probe_new(1, SR_PROBE_ANALOG, TRUE, "Humidity")))
+               if (!(ch = sr_channel_new(1, SR_PROBE_ANALOG, TRUE, "Humidity")))
                        goto scan_cleanup;
                sdi->channels = g_slist_append(sdi->channels, ch);
        }
index 652e7bef312453684b51edba73639292748537a4..7a98f9589f39eeade446246481375468fedad4d9 100644 (file)
@@ -128,7 +128,7 @@ static GSList *scan(GSList *options)
                        sdi->conn = serial;
                        sdi->priv = devc;
                        sdi->driver = di;
-                       if (!(ch = sr_probe_new(0, SR_PROBE_ANALOG, TRUE,
+                       if (!(ch = sr_channel_new(0, SR_PROBE_ANALOG, TRUE,
                                "P1")))
                                return NULL;
                        sdi->channels = g_slist_append(sdi->channels, ch);
index 258897118161ee9cd26d0488d5beb574734a34e5..8284db1530765c1467b680de8fd7f3f3a530949a 100644 (file)
@@ -177,7 +177,7 @@ static GSList *scan(GSList *options)
                                "Sump", "Logic Analyzer", "v1.0");
                sdi->driver = di;
                for (i = 0; i < 32; i++) {
-                       if (!(ch = sr_probe_new(i, SR_PROBE_LOGIC, TRUE,
+                       if (!(ch = sr_channel_new(i, SR_PROBE_LOGIC, TRUE,
                                        ols_channel_names[i])))
                                return 0;
                        sdi->channels = g_slist_append(sdi->channels, ch);
index 28b1353ebee0b0057552052ca398dfcc6ade6b0d..89f68429e2afb1624206bc0bfb7db3beaa089d80 100644 (file)
@@ -203,7 +203,7 @@ SR_PRIV struct sr_dev_inst *get_metadata(struct sr_serial_dev_inst *serial)
                        case 0x00:
                                /* Number of usable channels */
                                for (ui = 0; ui < tmp_int; ui++) {
-                                       if (!(ch = sr_probe_new(ui, SR_PROBE_LOGIC, TRUE,
+                                       if (!(ch = sr_channel_new(ui, SR_PROBE_LOGIC, TRUE,
                                                        ols_channel_names[ui])))
                                                return 0;
                                        sdi->channels = g_slist_append(sdi->channels, ch);
@@ -241,7 +241,7 @@ SR_PRIV struct sr_dev_inst *get_metadata(struct sr_serial_dev_inst *serial)
                        case 0x00:
                                /* Number of usable channels */
                                for (ui = 0; ui < tmp_c; ui++) {
-                                       if (!(ch = sr_probe_new(ui, SR_PROBE_LOGIC, TRUE,
+                                       if (!(ch = sr_channel_new(ui, SR_PROBE_LOGIC, TRUE,
                                                        ols_channel_names[ui])))
                                                return 0;
                                        sdi->channels = g_slist_append(sdi->channels, ch);
index ce78840b959c8ec03707e12e2c8684f0ad9cbbab..0ed76e52ec377a789fb13d3753f969a707716bb0 100644 (file)
@@ -335,7 +335,7 @@ static struct sr_dev_inst *probe_device(struct sr_scpi_dev_inst *scpi)
        for (i = 0; i < model->analog_channels; i++) {
                if (!(channel_name = g_strdup_printf("CH%d", i + 1)))
                        return NULL;
-               ch = sr_probe_new(i, SR_PROBE_ANALOG, TRUE, channel_name);
+               ch = sr_channel_new(i, SR_PROBE_ANALOG, TRUE, channel_name);
                sdi->channels = g_slist_append(sdi->channels, ch);
                devc->analog_groups[i].name = channel_name;
                devc->analog_groups[i].channels = g_slist_append(NULL, ch);
@@ -347,7 +347,7 @@ static struct sr_dev_inst *probe_device(struct sr_scpi_dev_inst *scpi)
                for (i = 0; i < 16; i++) {
                        if (!(channel_name = g_strdup_printf("D%d", i)))
                                return NULL;
-                       ch = sr_probe_new(i, SR_PROBE_LOGIC, TRUE, channel_name);
+                       ch = sr_channel_new(i, SR_PROBE_LOGIC, TRUE, channel_name);
                        g_free(channel_name);
                        if (!ch)
                                return NULL;
index 438d91a4501137067d9c5f4d8250e8210522818e..3759b8251e216def8ecafc381fb06e09b8af82d9 100644 (file)
@@ -195,7 +195,7 @@ static GSList *scan(GSList *options)
                sdi->driver = di;
 
                for (j = 0; channel_names[j]; j++) {
-                       if (!(ch = sr_probe_new(j, SR_PROBE_LOGIC, TRUE,
+                       if (!(ch = sr_channel_new(j, SR_PROBE_LOGIC, TRUE,
                                                   channel_names[j])))
                                return NULL;
                        sdi->channels = g_slist_append(sdi->channels, ch);
index 09e0ffbcb3bd0a2342fa475697779ef235924e7f..f69fe4be79f2388050cdc3f40b71e67fbf74779d 100644 (file)
@@ -405,7 +405,7 @@ static GSList *sdmm_scan(const char *conn, const char *serialcomm, int dmm)
 
        sdi->priv = devc;
        sdi->driver = dmms[dmm].di;
-       if (!(ch = sr_probe_new(0, SR_PROBE_ANALOG, TRUE, "P1")))
+       if (!(ch = sr_channel_new(0, SR_PROBE_ANALOG, TRUE, "P1")))
                goto scan_cleanup;
        sdi->channels = g_slist_append(sdi->channels, ch);
        drvc->instances = g_slist_append(drvc->instances, sdi);
index 3cff652ac5bf90da6ad7f7e0b6a1ff9cf4a52f4d..ac1932a4d11d7e5d788657e296e9391417a9030d 100644 (file)
@@ -85,7 +85,7 @@ static GSList *gen_channel_list(int num_channels)
                /* The LWLA series simply number channels from CH1 to CHxx. */
                g_snprintf(name, sizeof(name), "CH%d", i);
 
-               ch = sr_probe_new(i - 1, SR_PROBE_LOGIC, TRUE, name);
+               ch = sr_channel_new(i - 1, SR_PROBE_LOGIC, TRUE, name);
                list = g_slist_prepend(list, ch);
        }
 
index 9ba99129801693fd81373781310a582444e92211..a81af6e929a8394f9d4f7744bb53536f6b3bd88c 100644 (file)
@@ -107,54 +107,54 @@ static GSList *scan(GSList *options)
        sdi->priv = devc;
        sdi->driver = di;
 
-       if (!(ch = sr_probe_new(0, SR_PROBE_ANALOG, TRUE, "P")))
+       if (!(ch = sr_channel_new(0, SR_PROBE_ANALOG, TRUE, "P")))
                goto scan_cleanup;
        sdi->channels = g_slist_append(sdi->channels, ch);
 
        if (devc->optarif == OPTARIF_BASE) {
-               if (!(ch = sr_probe_new(0, SR_PROBE_ANALOG, TRUE, "BASE")))
+               if (!(ch = sr_channel_new(0, SR_PROBE_ANALOG, TRUE, "BASE")))
                        goto scan_cleanup;
                sdi->channels = g_slist_append(sdi->channels, ch);
        } else if (devc->optarif == OPTARIF_HC) {
-               if (!(ch = sr_probe_new(0, SR_PROBE_ANALOG, TRUE, "HP")))
+               if (!(ch = sr_channel_new(0, SR_PROBE_ANALOG, TRUE, "HP")))
                        goto scan_cleanup;
                sdi->channels = g_slist_append(sdi->channels, ch);
-               if (!(ch = sr_probe_new(0, SR_PROBE_ANALOG, TRUE, "HC")))
+               if (!(ch = sr_channel_new(0, SR_PROBE_ANALOG, TRUE, "HC")))
                        goto scan_cleanup;
                sdi->channels = g_slist_append(sdi->channels, ch);
        } else if (devc->optarif == OPTARIF_EJP) {
-               if (!(ch = sr_probe_new(0, SR_PROBE_ANALOG, TRUE, "HN")))
+               if (!(ch = sr_channel_new(0, SR_PROBE_ANALOG, TRUE, "HN")))
                        goto scan_cleanup;
                sdi->channels = g_slist_append(sdi->channels, ch);
-               if (!(ch = sr_probe_new(0, SR_PROBE_ANALOG, TRUE, "HPM")))
+               if (!(ch = sr_channel_new(0, SR_PROBE_ANALOG, TRUE, "HPM")))
                        goto scan_cleanup;
                sdi->channels = g_slist_append(sdi->channels, ch);
        } else if (devc->optarif == OPTARIF_BBR) {
-               if (!(ch = sr_probe_new(0, SR_PROBE_ANALOG, TRUE, "HPJB")))
+               if (!(ch = sr_channel_new(0, SR_PROBE_ANALOG, TRUE, "HPJB")))
                        goto scan_cleanup;
                sdi->channels = g_slist_append(sdi->channels, ch);
-               if (!(ch = sr_probe_new(0, SR_PROBE_ANALOG, TRUE, "HPJW")))
+               if (!(ch = sr_channel_new(0, SR_PROBE_ANALOG, TRUE, "HPJW")))
                        goto scan_cleanup;
                sdi->channels = g_slist_append(sdi->channels, ch);
-               if (!(ch = sr_probe_new(0, SR_PROBE_ANALOG, TRUE, "HPJR")))
+               if (!(ch = sr_channel_new(0, SR_PROBE_ANALOG, TRUE, "HPJR")))
                        goto scan_cleanup;
                sdi->channels = g_slist_append(sdi->channels, ch);
-               if (!(ch = sr_probe_new(0, SR_PROBE_ANALOG, TRUE, "HCJB")))
+               if (!(ch = sr_channel_new(0, SR_PROBE_ANALOG, TRUE, "HCJB")))
                        goto scan_cleanup;
                sdi->channels = g_slist_append(sdi->channels, ch);
-               if (!(ch = sr_probe_new(0, SR_PROBE_ANALOG, TRUE, "HCJW")))
+               if (!(ch = sr_channel_new(0, SR_PROBE_ANALOG, TRUE, "HCJW")))
                        goto scan_cleanup;
                sdi->channels = g_slist_append(sdi->channels, ch);
-               if (!(ch = sr_probe_new(0, SR_PROBE_ANALOG, TRUE, "HCJR")))
+               if (!(ch = sr_channel_new(0, SR_PROBE_ANALOG, TRUE, "HCJR")))
                        goto scan_cleanup;
                sdi->channels = g_slist_append(sdi->channels, ch);
        }
 
-       if (!(ch = sr_probe_new(0, SR_PROBE_ANALOG, TRUE, "IINST")))
+       if (!(ch = sr_channel_new(0, SR_PROBE_ANALOG, TRUE, "IINST")))
                goto scan_cleanup;
        sdi->channels = g_slist_append(sdi->channels, ch);
 
-       if (!(ch = sr_probe_new(0, SR_PROBE_ANALOG, TRUE, "PAPP")))
+       if (!(ch = sr_channel_new(0, SR_PROBE_ANALOG, TRUE, "PAPP")))
                goto scan_cleanup;
        sdi->channels = g_slist_append(sdi->channels, ch);
 
index abe88ba4317629d74a25073b0ce5b727e6e07b88..d2f6ccebf6c05c68d40bbadfb106638c82839a03 100644 (file)
@@ -106,7 +106,7 @@ static GSList *scan(GSList *options)
 
        sdi->priv = devc;
        sdi->driver = di;
-       ch = sr_probe_new(0, SR_PROBE_ANALOG, TRUE, "P1");
+       ch = sr_channel_new(0, SR_PROBE_ANALOG, TRUE, "P1");
        if (!ch) {
                sr_err("Failed to create channel.");
                return NULL;
index be6c5e2af085b34de3e21e9039b97da3f1b78560..7aed4e1386d94e9b98dcba4766e07e26bdf95d2f 100644 (file)
@@ -221,7 +221,7 @@ static GSList *scan(GSList *options, int dmm)
                }
                sdi->priv = devc;
                sdi->driver = udmms[dmm].di;
-               if (!(ch = sr_probe_new(0, SR_PROBE_ANALOG, TRUE, "P1")))
+               if (!(ch = sr_channel_new(0, SR_PROBE_ANALOG, TRUE, "P1")))
                        return NULL;
                sdi->channels = g_slist_append(sdi->channels, ch);
 
index 352853d8d34cf6efc71c69a70149b1b0eb68bff2..cc09a4bcc002eb0695f5a1ae5d20776b8f84bccc 100644 (file)
@@ -86,7 +86,7 @@ static GSList *scan(GSList *options)
                        sdi->inst_type = SR_INST_USB;
                        sdi->conn = l->data;
                        for (i = 0; i < 3; i++) {
-                               if (!(ch = sr_probe_new(i, SR_PROBE_ANALOG, TRUE,
+                               if (!(ch = sr_channel_new(i, SR_PROBE_ANALOG, TRUE,
                                                channels[i]))) {
                                        sr_dbg("Channel malloc failed.");
                                        return NULL;
index 6da326f635e8edae5708df51b7bc8a038c802146..55c074d9c55f80dec21e0f9607a88e446097dd6d 100644 (file)
@@ -88,7 +88,7 @@ static GSList *scan(GSList *options)
                        return NULL;
                sdi->priv = devc;
 
-               if (!(ch = sr_probe_new(0, SR_PROBE_ANALOG, TRUE, "P1")))
+               if (!(ch = sr_channel_new(0, SR_PROBE_ANALOG, TRUE, "P1")))
                        return NULL;
                sdi->channels = g_slist_append(NULL, ch);
 
index 69e1441158ea4428934b27aad13e2a00e735e373..4bc25a977e4b644b62fb9f38f024180f49e95c0a 100644 (file)
@@ -316,7 +316,7 @@ static GSList *scan(GSList *options)
 
                /* Fill in channellist according to this device's profile. */
                for (j = 0; j < devc->num_channels; j++) {
-                       if (!(ch = sr_probe_new(j, SR_PROBE_LOGIC, TRUE,
+                       if (!(ch = sr_channel_new(j, SR_PROBE_LOGIC, TRUE,
                                        channel_names[j])))
                                return NULL;
                        sdi->channels = g_slist_append(sdi->channels, ch);
index 3f3f288a81fec43c3670d843f9338d8ec6110f0a..50d1f9588264c6f44bad9c2de73126051a13a0cf 100644 (file)
@@ -83,7 +83,7 @@ static int init(struct sr_input *in, const char *filename)
        for (i = 0; i < num_channels; i++) {
                snprintf(name, SR_MAX_PROBENAME_LEN, "%d", i);
                /* TODO: Check return value. */
-               if (!(ch = sr_probe_new(i, SR_PROBE_LOGIC, TRUE, name)))
+               if (!(ch = sr_channel_new(i, SR_PROBE_LOGIC, TRUE, name)))
                        return SR_ERR;
                in->sdi->channels = g_slist_append(in->sdi->channels, ch);
        }
index 43004401e697c5a6b2073cc26e0ed1342bd06d30..d340ece8d578b2f501536dfeffd119096df2e12e 100644 (file)
@@ -122,7 +122,7 @@ static int init(struct sr_input *in, const char *filename)
        for (i = 0; i < num_channels; i++) {
                snprintf(name, SR_MAX_PROBENAME_LEN, "%d", i);
                /* TODO: Check return value. */
-               if (!(ch = sr_probe_new(i, SR_PROBE_LOGIC, TRUE, name)))
+               if (!(ch = sr_channel_new(i, SR_PROBE_LOGIC, TRUE, name)))
                        return SR_ERR;
                in->sdi->channels = g_slist_append(in->sdi->channels, ch);
        }
index a7eee4b24ee7eac32069a8ad9ac25ad315da9392..2af4eeb158bf5066bb7da0a933eb5146cef1562c 100644 (file)
@@ -682,7 +682,7 @@ static int init(struct sr_input *in, const char *filename)
                else
                        snprintf(channel_name, sizeof(channel_name), "%zu", i);
 
-               ch = sr_probe_new(i, SR_PROBE_LOGIC, TRUE, channel_name);
+               ch = sr_channel_new(i, SR_PROBE_LOGIC, TRUE, channel_name);
 
                if (!ch) {
                        sr_err("Channel creation failed.");
index 88bc2ff67f1824e6824991231736329dc1aa0241..2b68fc507af038f66668eccb26d6a62a883cf1e5 100644 (file)
@@ -344,7 +344,7 @@ static int init(struct sr_input *in, const char *filename)
        for (i = 0; i < num_channels; i++) {
                snprintf(name, SR_MAX_PROBENAME_LEN, "%d", i);
 
-               if (!(ch = sr_probe_new(i, SR_PROBE_LOGIC, TRUE, name))) {
+               if (!(ch = sr_channel_new(i, SR_PROBE_LOGIC, TRUE, name))) {
                        release_context(ctx);
                        return SR_ERR;
                }
index 4987fc4afa5d8fd0fad0759125dcabb798ab68c7..7f5f97bf1ea1ad075d9b3543f66838a8ca153e48 100644 (file)
@@ -114,7 +114,7 @@ static int init(struct sr_input *in, const char *filename)
 
        for (i = 0; i < ctx->num_channels; i++) {
                snprintf(channelname, 8, "CH%d", i + 1);
-               if (!(ch = sr_probe_new(0, SR_PROBE_ANALOG, TRUE, channelname)))
+               if (!(ch = sr_channel_new(0, SR_PROBE_ANALOG, TRUE, channelname)))
                        return SR_ERR;
                in->sdi->channels = g_slist_append(in->sdi->channels, ch);
        }
index 687e0327f9d62a0ed53ad8dc641a86d8ac588f8d..123a23f78bb8d6a6cd3bb5d5255211048bd6ee4e 100644 (file)
@@ -232,7 +232,7 @@ enum {
        SR_PROBE_SET_TRIGGER = 1 << 1,
 };
 
-SR_PRIV struct sr_channel *sr_probe_new(int index, int type,
+SR_PRIV struct sr_channel *sr_channel_new(int index, int type,
                gboolean enabled, const char *name);
 
 /* Generic device instances */
index da11321c09ceba009afd9e00cbc87efd2b14c882..8413d509b7ab7798979212833897acef1c076a8b 100644 (file)
@@ -186,7 +186,7 @@ SR_API int sr_session_load(const char *filename)
                                                        g_variant_new_uint64(total_channels), sdi, NULL);
                                        for (p = 0; p < total_channels; p++) {
                                                snprintf(channelname, SR_MAX_PROBENAME_LEN, "%" PRIu64, p);
-                                               if (!(ch = sr_probe_new(p, SR_PROBE_LOGIC, TRUE,
+                                               if (!(ch = sr_channel_new(p, SR_PROBE_LOGIC, TRUE,
                                                                channelname)))
                                                        return SR_ERR;
                                                sdi->channels = g_slist_append(sdi->channels, ch);