]> sigrok.org Git - libsigrok.git/commitdiff
deprecate SR_DI_SAMPLERATES
authorBert Vermeulen <redacted>
Fri, 25 Jan 2013 01:39:58 +0000 (02:39 +0100)
committerBert Vermeulen <redacted>
Fri, 25 Jan 2013 01:39:58 +0000 (02:39 +0100)
This is replaced by a call to config_list() with id SR_CONF_SAMPLERATE.

hardware/alsa/api.c
hardware/asix-sigma/asix-sigma.c
hardware/chronovu-la8/api.c
hardware/chronovu-la8/protocol.c
hardware/demo/demo.c
hardware/fx2lafw/fx2lafw.c
hardware/link-mso19/api.c
hardware/openbench-logic-sniffer/api.c
hardware/uni-t-dmm/api.c
hardware/zeroplus-logic-cube/zeroplus.c
libsigrok.h

index 594b95e85bf4c749462f9f2a7b30eacbea5398a3..fdea5f7e13275d5160c61e42669bcbb90558e9d5 100644 (file)
@@ -154,13 +154,6 @@ static int config_get(int id, const void **data, const struct sr_dev_inst *sdi)
        case SR_DI_CUR_SAMPLERATE:
                *data = &devc->cur_samplerate;
                break;
-       case SR_DI_SAMPLERATES:
-               if (!devc->supp_rates.list) {
-                       sr_err("Instance did not contain a samplerate list.");
-                       return SR_ERR_ARG;
-               }
-               *data = &devc->supp_rates;
-               break;
        default:
                return SR_ERR_ARG;
        }
index 28727b81adec36dbdf90feddf7c2e1174a7718db..e340e5408eb0b7a13c3a5d282ecb228dd2e9e26e 100644 (file)
@@ -795,9 +795,6 @@ static int config_get(int id, const void **data, const struct sr_dev_inst *sdi)
        case SR_DI_HWCAPS:
                *data = hwcaps;
                break;
-       case SR_DI_SAMPLERATES:
-               *data = &samplerates;
-               break;
        case SR_DI_TRIGGER_TYPES:
                *data = (char *)TRIGGER_TYPES;
                break;
index c1d55c5b0122887e2e22ff00d481d5350ebdc85f..ddda873394d08a2fbf572be4a7f8684e4c903764 100644 (file)
@@ -296,11 +296,6 @@ static int config_get(int id, const void **data, const struct sr_dev_inst *sdi)
        case SR_DI_HWCAPS:
                *data = hwcaps;
                break;
-       case SR_DI_SAMPLERATES:
-               fill_supported_samplerates_if_needed();
-               *data = &samplerates;
-               sr_spew("%s: Returning samplerates.", __func__);
-               break;
        case SR_DI_TRIGGER_TYPES:
                *data = (char *)TRIGGER_TYPES;
                sr_spew("%s: Returning trigger types: %s.", __func__,
index 7a450cf478d20a7da06a726b67f37c09cc9c4e40..35a0342c30eb34b9ca6a36da6a0b35a06e2b9f3b 100644 (file)
@@ -30,7 +30,7 @@ SR_PRIV const char *probe_names[NUM_PROBES + 1] = {
        NULL,
 };
 
-/* This will be initialized via hw_info_get()/SR_DI_SAMPLERATES. */
+/* This will be initialized via config_list()/SR_CONF_SAMPLERATE. */
 SR_PRIV uint64_t supported_samplerates[255 + 1] = { 0 };
 
 /*
index c346dd3e83ddb2df421c25213e73354fec85a2dc..6c211cd7cb8152c07dc280b999cc73d790ac9851 100644 (file)
@@ -234,9 +234,6 @@ static int config_get(int id, const void **data, const struct sr_dev_inst *sdi)
        case SR_DI_HWCAPS:
                *data = hwcaps;
                break;
-       case SR_DI_SAMPLERATES:
-               *data = &samplerates;
-               break;
        case SR_DI_CUR_SAMPLERATE:
                *data = &cur_samplerate;
                break;
index a76ffd577653cc6bd3bb193607d17f6ecf01c5d1..1717f9d0d86ed59aabe8eeaf689ad4f1e9e41e06 100644 (file)
@@ -610,9 +610,6 @@ static int config_get(int id, const void **data, const struct sr_dev_inst *sdi)
        case SR_DI_HWCAPS:
                *data = hwcaps;
                break;
-       case SR_DI_SAMPLERATES:
-               *data = &samplerates;
-               break;
        case SR_DI_TRIGGER_TYPES:
                *data = TRIGGER_TYPES;
                break;
index 6c23bbbe5a982bc86cb2ca55d8fc0660f28a7135..98fc9b7819e683786ea94394e5baaee682f6f026 100644 (file)
@@ -306,9 +306,6 @@ static int config_get(int id, const void **data, const struct sr_dev_inst *sdi)
        case SR_DI_HWCAPS:
                *data = hwcaps;
                break;
-       case SR_DI_SAMPLERATES:
-               *data = &samplerates;
-               break;
        case SR_DI_TRIGGER_TYPES:
                *data = (char *)TRIGGER_TYPES;
                break;
index 22afead9d38a7a446419294fcdc42879cab7d219..daf2311c78911ac8b64c982d792a6c7fa39e9695 100644 (file)
@@ -261,9 +261,6 @@ static int config_get(int id, const void **data, const struct sr_dev_inst *sdi)
        case SR_DI_HWCAPS:
                *data = hwcaps;
                break;
-       case SR_DI_SAMPLERATES:
-               *data = &samplerates;
-               break;
        case SR_DI_TRIGGER_TYPES:
                *data = (char *)TRIGGER_TYPES;
                break;
index a0c4e267ed20ba7252b8b85986ea3d861c51cb00..b019f0f24ed1a83627945d94b3584aa3a825c8d7 100644 (file)
@@ -200,12 +200,6 @@ static int config_get(int id, const void **data, const struct sr_dev_inst *sdi)
                *data = hwcaps;
                sr_spew("%s: Returning hwcaps.", __func__);
                break;
-       case SR_DI_SAMPLERATES:
-               /* TODO: Get rid of this. */
-               *data = NULL;
-               sr_spew("%s: Returning samplerates.", __func__);
-               return SR_ERR_ARG;
-               break;
        case SR_DI_CUR_SAMPLERATE:
                /* TODO: Get rid of this. */
                *data = NULL;
index ac47f085c153259a2e7ff7220b70ec31ac756732..b8f9fb1a7a8d1ca98c7144218e732d91a8f64b0c 100644 (file)
@@ -537,10 +537,6 @@ static int config_get(int id, const void **data, const struct sr_dev_inst *sdi)
        case SR_DI_HWCAPS:
                *data = hwcaps;
                break;
-       case SR_DI_SAMPLERATES:
-               *data = &samplerates;
-               sr_spew("zp: %s: Returning samplerates.", __func__);
-               break;
        case SR_DI_TRIGGER_TYPES:
                *data = TRIGGER_TYPES;
                sr_spew("zp: %s: Returning triggertypes: %s.", __func__, TRIGGER_TYPES);
index b4d929ef33ccc87adef650f0ef2bc56d5321a488..a9c4cd487abfb7215c03f7df3f443d5b8187091d 100644 (file)
@@ -551,8 +551,6 @@ enum {
        SR_DI_HWOPTS = 10000,
        /** A list of capabilities supported by the device. */
        SR_DI_HWCAPS,
-       /** Samplerates supported by this device (struct sr_samplerates). */
-       SR_DI_SAMPLERATES,
        /** Types of logic trigger supported, out of "01crf" (char *). */
        SR_DI_TRIGGER_TYPES,
        /** The currently set samplerate in Hz (uint64_t). */