]> sigrok.org Git - libsigrok.git/commitdiff
Get rid of obsolete SR_DI_NUM_PROBES and SR_DI_PROBE_NAMES.
authorBert Vermeulen <redacted>
Tue, 15 Jan 2013 16:20:57 +0000 (17:20 +0100)
committerBert Vermeulen <redacted>
Tue, 15 Jan 2013 16:42:23 +0000 (17:42 +0100)
Frontends should use the probe list in the device's sr_dev_inst
to get this information.

19 files changed:
hardware/agilent-dmm/api.c
hardware/alsa/api.c
hardware/asix-sigma/asix-sigma.c
hardware/chronovu-la8/api.c
hardware/colead-slm/api.c
hardware/demo/demo.c
hardware/fluke-dmm/api.c
hardware/fx2lafw/fx2lafw.c
hardware/hantek-dso/api.c
hardware/lascar-el-usb/api.c
hardware/link-mso19/api.c
hardware/openbench-logic-sniffer/api.c
hardware/rigol-ds1xx2/api.c
hardware/serial-dmm/api.c
hardware/tondaj-sl-814/api.c
hardware/uni-t-dmm/api.c
hardware/victor-dmm/api.c
hardware/zeroplus-logic-cube/zeroplus.c
libsigrok.h

index de89422a7a4d9a4af0759037f2c120b72194cf57..31c2fe110784dfc616a7620d3351206b920e2cae 100644 (file)
@@ -41,11 +41,6 @@ static const int hwcaps[] = {
        0,
 };
 
-static const char *probe_names[] = {
-       "Probe",
-       NULL,
-};
-
 extern const struct agdmm_job agdmm_jobs_u123x[];
 extern const struct agdmm_recv agdmm_recvs_u123x[];
 extern const struct agdmm_job agdmm_jobs_u125x[];
@@ -265,12 +260,6 @@ static int hw_info_get(int info_id, const void **data,
        case SR_DI_HWCAPS:
                *data = hwcaps;
                break;
-       case SR_DI_NUM_PROBES:
-               *data = GINT_TO_POINTER(1);
-               break;
-       case SR_DI_PROBE_NAMES:
-               *data = probe_names;
-               break;
        default:
                return SR_ERR_ARG;
        }
index 42f3210469a49a67c263ff534f3246ffb46691d0..2f854d6cc86e0dde767e0a163b169d2d2d374acf 100644 (file)
@@ -34,11 +34,6 @@ static const int hwcaps[] = {
        0,
 };
 
-static const char *probe_names[] = {
-       "Channel 0", "Channel 1",
-       NULL,
-};
-
 SR_PRIV struct sr_dev_driver alsa_driver_info;
 static struct sr_dev_driver *di = &alsa_driver_info;
 
@@ -157,12 +152,6 @@ static int hw_info_get(int info_id, const void **data,
        case SR_DI_HWCAPS:
                *data = hwcaps;
                break;
-       case SR_DI_NUM_PROBES:
-               *data = &devc->num_probes;
-               break;
-       case SR_DI_PROBE_NAMES:
-               *data = probe_names;
-               break;
        case SR_DI_CUR_SAMPLERATE:
                *data = &devc->cur_samplerate;
                break;
index 8ff2e159101a79386603f6e7c1a1a83895c3ccb7..9e8c3c86dd21f0fdad633b0ffd3dc74f69d08aaa 100644 (file)
@@ -796,12 +796,6 @@ static int hw_info_get(int info_id, const void **data,
        case SR_DI_HWCAPS:
                *data = hwcaps;
                break;
-       case SR_DI_NUM_PROBES:
-               *data = GINT_TO_POINTER(NUM_PROBES);
-               break;
-       case SR_DI_PROBE_NAMES:
-               *data = probe_names;
-               break;
        case SR_DI_SAMPLERATES:
                *data = &samplerates;
                break;
index c7a5ba83c8084bdba1acb82ba467b1b9dd4a0031..0df9a7bc92eb633e9485c0459812f64be94ddf75 100644 (file)
@@ -297,15 +297,6 @@ static int hw_info_get(int info_id, const void **data,
        case SR_DI_HWCAPS:
                *data = hwcaps;
                break;
-       case SR_DI_NUM_PROBES:
-               *data = GINT_TO_POINTER(NUM_PROBES);
-               sr_spew("%s: Returning number of probes: %d.", __func__,
-                       NUM_PROBES);
-               break;
-       case SR_DI_PROBE_NAMES:
-               *data = probe_names;
-               sr_spew("%s: Returning probenames.", __func__);
-               break;
        case SR_DI_SAMPLERATES:
                fill_supported_samplerates_if_needed();
                *data = &samplerates;
index c4346ba6fe9fb9778523cb16dec692ebb98f81d0..627793852dcaea1e5b95f286628a11a5cb7fdfc5 100644 (file)
@@ -44,11 +44,6 @@ static const int hwcaps[] = {
        0,
 };
 
-static const char *probe_names[] = {
-       "P1",
-       NULL,
-};
-
 SR_PRIV struct sr_dev_driver colead_slm_driver_info;
 static struct sr_dev_driver *di = &colead_slm_driver_info;
 
@@ -209,12 +204,6 @@ static int hw_info_get(int info_id, const void **data,
        case SR_DI_HWCAPS:
                *data = hwcaps;
                break;
-       case SR_DI_NUM_PROBES:
-               *data = GINT_TO_POINTER(1);
-               break;
-       case SR_DI_PROBE_NAMES:
-               *data = probe_names;
-               break;
        default:
                return SR_ERR_ARG;
        }
index b02e668c01b020327a08b024c30c3e9fe4b81f94..5d7c006aab3ae1843234fc62f19d7c304aadade0 100644 (file)
@@ -235,12 +235,6 @@ static int hw_info_get(int info_id, const void **data,
        case SR_DI_HWCAPS:
                *data = hwcaps;
                break;
-       case SR_DI_NUM_PROBES:
-               *data = GINT_TO_POINTER(NUM_PROBES);
-               break;
-       case SR_DI_PROBE_NAMES:
-               *data = probe_names;
-               break;
        case SR_DI_SAMPLERATES:
                *data = &samplerates;
                break;
index 7264de2502c612ecbaff6a125ae3dfa8f293453f..93869a4813d3a07fb7a85d8822f86d251111c05d 100644 (file)
@@ -41,11 +41,6 @@ static const int hwcaps[] = {
        0,
 };
 
-static const char *probe_names[] = {
-       "Probe",
-       NULL,
-};
-
 SR_PRIV struct sr_dev_driver flukedmm_driver_info;
 static struct sr_dev_driver *di = &flukedmm_driver_info;
 
@@ -299,12 +294,6 @@ static int hw_info_get(int info_id, const void **data,
        case SR_DI_HWCAPS:
                *data = hwcaps;
                break;
-       case SR_DI_NUM_PROBES:
-               *data = GINT_TO_POINTER(1);
-               break;
-       case SR_DI_PROBE_NAMES:
-               *data = probe_names;
-               break;
        default:
                return SR_ERR_ARG;
        }
index 19f079b8d69775e527610b8cec1e1bb04c0076d5..9eae9508fd7af9500fc9b45645bbdaf92ed848e7 100644 (file)
@@ -612,18 +612,6 @@ static int hw_info_get(int info_id, const void **data,
        case SR_DI_HWCAPS:
                *data = hwcaps;
                break;
-       case SR_DI_NUM_PROBES:
-               if (sdi) {
-                       devc = sdi->priv;
-                       *data = GINT_TO_POINTER(
-                               (devc->profile->dev_caps & DEV_CAPS_16BIT) ?
-                               16 : 8);
-               } else
-                       return SR_ERR;
-               break;
-       case SR_DI_PROBE_NAMES:
-               *data = probe_names;
-               break;
        case SR_DI_SAMPLERATES:
                *data = &samplerates;
                break;
index 19ddd86e40a4d0f9df746892d9c2324aef31fb1a..aec6651ff7677a0b82933f3cff04faa5cc8b732e 100644 (file)
@@ -428,12 +428,6 @@ static int hw_info_get(int info_id, const void **data,
        case SR_DI_HWCAPS:
                *data = hwcaps;
                break;
-       case SR_DI_NUM_PROBES:
-               *data = GINT_TO_POINTER(NUM_PROBES);
-               break;
-       case SR_DI_PROBE_NAMES:
-               *data = probe_names;
-               break;
        case SR_DI_BUFFERSIZES:
                *data = buffersizes;
                break;
index 3ae8ba5315523236692563caabb72a31aea639a9..210480cc727fc95a2dc5ea31f9c97bec3373bc57 100644 (file)
@@ -40,11 +40,6 @@ static const int hwcaps[] = {
        0
 };
 
-static const char *probe_names[] = {
-       "P1",
-       NULL,
-};
-
 /* Properly close and free all devices. */
 static int clear_instances(void)
 {
@@ -231,12 +226,6 @@ static int hw_info_get(int info_id, const void **data,
        case SR_DI_HWCAPS:
                *data = hwcaps;
                break;
-       case SR_DI_NUM_PROBES:
-               *data = GINT_TO_POINTER(1);
-               break;
-       case SR_DI_PROBE_NAMES:
-               *data = probe_names;
-               break;
        default:
                sr_err("Unknown info_id: %d.", info_id);
                return SR_ERR_ARG;
index 0ae1eb630174ef960a07b76245bbaf397d834438..5dd040a60d9e25d4835315bb8ab6125349ec3abb 100644 (file)
@@ -307,12 +307,6 @@ static int hw_info_get(int info_id, const void **data,
        case SR_DI_HWCAPS:
                *data = hwcaps;
                break;
-       case SR_DI_NUM_PROBES:
-               *data = GINT_TO_POINTER(1);
-               break;
-       case SR_DI_PROBE_NAMES:
-               *data = mso19_probe_names;
-               break;
        case SR_DI_SAMPLERATES:
                *data = &samplerates;
                break;
index c9ca8f0a28eb8d734fd1474e689117024d7d4641..fbcafda8c71f591bbf5a39ef23d5891e77d8c439 100644 (file)
@@ -262,12 +262,6 @@ static int hw_info_get(int info_id, const void **data,
        case SR_DI_HWCAPS:
                *data = hwcaps;
                break;
-       case SR_DI_NUM_PROBES:
-               *data = GINT_TO_POINTER(1);
-               break;
-       case SR_DI_PROBE_NAMES:
-               *data = ols_probe_names;
-               break;
        case SR_DI_SAMPLERATES:
                *data = &samplerates;
                break;
index 4023ecca1ef4d2a4bd705d442f5af799cf87736c..1590f060b6db5c359c837f9233a9839a9784315c 100644 (file)
@@ -40,11 +40,6 @@ static const int hwcaps[] = {
        0,
 };
 
-static const char *probe_names[] = {
-       "CH1", "CH2",
-       NULL,
-};
-
 static const struct sr_rational timebases[] = {
        /* nanoseconds */
        { 2, 1000000000 },
@@ -339,12 +334,6 @@ static int hw_info_get(int info_id, const void **data,
        case SR_DI_HWCAPS:
                *data = hwcaps;
                break;
-       case SR_DI_NUM_PROBES:
-               *data = GINT_TO_POINTER(NUM_PROBES);
-               break;
-       case SR_DI_PROBE_NAMES:
-               *data = probe_names;
-               break;
        case SR_DI_TIMEBASES:
                *data = timebases;
                break;
index aa86f3b522f86e30bb8a98d4d65405aea0017152..eee148912f6a611b630447cedbeea9814912a2bf 100644 (file)
@@ -43,11 +43,6 @@ static const int hwcaps[] = {
        0,
 };
 
-static const char *probe_names[] = {
-       "Probe",
-       NULL,
-};
-
 SR_PRIV struct sr_dev_driver digitek_dt4000zc_driver_info;
 SR_PRIV struct sr_dev_driver tekpower_tp4000zc_driver_info;
 SR_PRIV struct sr_dev_driver metex_me31_driver_info;
@@ -390,12 +385,6 @@ static int hw_info_get(int info_id, const void **data,
        case SR_DI_HWCAPS:
                *data = hwcaps;
                break;
-       case SR_DI_NUM_PROBES:
-               *data = GINT_TO_POINTER(1);
-               break;
-       case SR_DI_PROBE_NAMES:
-               *data = probe_names;
-               break;
        default:
                return SR_ERR_ARG;
        }
index 5c72c6a29221a8424f6a5f5814c62bf440cb3360..28e9bc853e5ca947a2dc91205bde661ccaef820f 100644 (file)
@@ -39,11 +39,6 @@ static const int hwcaps[] = {
        0,
 };
 
-static const char *probe_names[] = {
-       "P1",
-       NULL,
-};
-
 SR_PRIV struct sr_dev_driver tondaj_sl_814_driver_info;
 static struct sr_dev_driver *di = &tondaj_sl_814_driver_info;
 
@@ -144,7 +139,7 @@ static GSList *hw_scan(GSList *options)
 
        sdi->priv = devc;
        sdi->driver = di;
-       probe = sr_probe_new(0, SR_PROBE_ANALOG, TRUE, probe_names[0]);
+       probe = sr_probe_new(0, SR_PROBE_ANALOG, TRUE, "P1");
        if (!probe) {
                sr_err("Failed to create probe.");
                return NULL;
@@ -212,12 +207,6 @@ static int hw_info_get(int info_id, const void **data,
        case SR_DI_HWCAPS:
                *data = hwcaps;
                break;
-       case SR_DI_NUM_PROBES:
-               *data = GINT_TO_POINTER(1);
-               break;
-       case SR_DI_PROBE_NAMES:
-               *data = probe_names;
-               break;
        default:
                sr_err("Unknown info_id: %d.", info_id);
                return SR_ERR_ARG;
index b4beb5041e15a19509440e5bdaea079060af38f1..e0d366618dcf3fe0797f7e55fb2c016413e3f48c 100644 (file)
@@ -32,11 +32,6 @@ static const int hwcaps[] = {
        0,
 };
 
-static const char *probe_names[] = {
-       "Probe",
-       NULL,
-};
-
 SR_PRIV struct sr_dev_driver uni_t_ut61d_driver_info;
 SR_PRIV struct sr_dev_driver voltcraft_vc820_driver_info;
 
@@ -178,14 +173,6 @@ static int hw_info_get(int info_id, const void **data,
                *data = hwcaps;
                sr_spew("%s: Returning hwcaps.", __func__);
                break;
-       case SR_DI_NUM_PROBES:
-               *data = GINT_TO_POINTER(1);
-               sr_spew("%s: Returning number of probes.", __func__);
-               break;
-       case SR_DI_PROBE_NAMES:
-               *data = probe_names;
-               sr_spew("%s: Returning probe names.", __func__);
-               break;
        case SR_DI_SAMPLERATES:
                /* TODO: Get rid of this. */
                *data = NULL;
index 63ae5fb7365c6577098033e87ba7714bc155c75c..496b51b758bba1c51664ce9afc46da04b92c7855 100644 (file)
@@ -44,11 +44,6 @@ static const int hwcaps[] = {
        0
 };
 
-static const char *probe_names[] = {
-       "P1",
-       NULL,
-};
-
 /* Properly close and free all devices. */
 static int clear_instances(void)
 {
@@ -258,12 +253,6 @@ static int hw_info_get(int info_id, const void **data,
        case SR_DI_HWCAPS:
                *data = hwcaps;
                break;
-       case SR_DI_NUM_PROBES:
-               *data = GINT_TO_POINTER(1);
-               break;
-       case SR_DI_PROBE_NAMES:
-               *data = probe_names;
-               break;
        default:
                sr_err("Unknown info_id: %d.", info_id);
                return SR_ERR_ARG;
index 6dd20701885012370baa4fdbe5bc7ac6399b482f..f2fcac63c182a54ba38b1c4ca60c7d631b20c0b3 100644 (file)
@@ -538,19 +538,6 @@ static int hw_info_get(int info_id, const void **data,
        case SR_DI_HWCAPS:
                *data = hwcaps;
                break;
-       case SR_DI_NUM_PROBES:
-               if (sdi) {
-                       devc = sdi->priv;
-                       *data = GINT_TO_POINTER(devc->num_channels);
-                       sr_spew("zp: %s: Returning number of channels: %d.",
-                                       __func__, devc->num_channels);
-               } else
-                       return SR_ERR;
-               break;
-       case SR_DI_PROBE_NAMES:
-               *data = probe_names;
-               sr_spew("zp: %s: Returning probenames.", __func__);
-               break;
        case SR_DI_SAMPLERATES:
                *data = &samplerates;
                sr_spew("zp: %s: Returning samplerates.", __func__);
index bf0b32e74e383b5038101ad4666773e2f464d236..c2ad17f7a67560415be806120cd571d36f11eccb 100644 (file)
@@ -567,10 +567,6 @@ enum {
        SR_DI_HWOPTS = 10000,
        /** A list of capabilities supported by the device. */
        SR_DI_HWCAPS,
-       /** The number of probes connected to this device. */
-       SR_DI_NUM_PROBES,
-       /** The probe names on this device. */
-       SR_DI_PROBE_NAMES,
        /** Samplerates supported by this device (struct sr_samplerates). */
        SR_DI_SAMPLERATES,
        /** Types of logic trigger supported, out of "01crf" (char *). */