]> sigrok.org Git - libsigrok.git/commitdiff
Deprecate SR_DI_CUR_SAMPLERATE.
authorBert Vermeulen <redacted>
Fri, 25 Jan 2013 02:17:36 +0000 (03:17 +0100)
committerBert Vermeulen <redacted>
Fri, 25 Jan 2013 02:17:36 +0000 (03:17 +0100)
This is replaced by SR_CONF_SAMPLERATE.

19 files changed:
hardware/alsa/api.c
hardware/asix-sigma/asix-sigma.c
hardware/chronovu-la8/api.c
hardware/demo/demo.c
hardware/fx2lafw/fx2lafw.c
hardware/hantek-dso/api.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
output/chronovu_la8.c
output/csv.c
output/gnuplot.c
output/ols.c
output/text/text.c
output/vcd.c
session_driver.c
session_file.c

index fdea5f7e13275d5160c61e42669bcbb90558e9d5..86ab6a7c9bee0aa35c8f1b7d62016372e7f8c72b 100644 (file)
@@ -151,7 +151,7 @@ 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_CUR_SAMPLERATE:
+       case SR_CONF_SAMPLERATE:
                *data = &devc->cur_samplerate;
                break;
        default:
index e340e5408eb0b7a13c3a5d282ecb228dd2e9e26e..7da0d97b2ba120218b153c7ccfaca4a2c1d20f34 100644 (file)
@@ -798,7 +798,7 @@ static int config_get(int id, const void **data, const struct sr_dev_inst *sdi)
        case SR_DI_TRIGGER_TYPES:
                *data = (char *)TRIGGER_TYPES;
                break;
-       case SR_DI_CUR_SAMPLERATE:
+       case SR_CONF_SAMPLERATE:
                if (sdi) {
                        devc = sdi->priv;
                        *data = &devc->cur_samplerate;
index ddda873394d08a2fbf572be4a7f8684e4c903764..4c349e5786f68554d2f855a5fa71d46e2ce39dff 100644 (file)
@@ -301,7 +301,7 @@ static int config_get(int id, const void **data, const struct sr_dev_inst *sdi)
                sr_spew("%s: Returning trigger types: %s.", __func__,
                        TRIGGER_TYPES);
                break;
-       case SR_DI_CUR_SAMPLERATE:
+       case SR_CONF_SAMPLERATE:
                if (sdi) {
                        devc = sdi->priv;
                        *data = &devc->cur_samplerate;
index 6c211cd7cb8152c07dc280b999cc73d790ac9851..7fc00fb71be318c30baf38a6207b6f42d134b4c6 100644 (file)
@@ -234,7 +234,7 @@ 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_CUR_SAMPLERATE:
+       case SR_CONF_SAMPLERATE:
                *data = &cur_samplerate;
                break;
        case SR_DI_PATTERNS:
index 1717f9d0d86ed59aabe8eeaf689ad4f1e9e41e06..4b442530fb28f733c31ce385af90ddc6d1403941 100644 (file)
@@ -613,7 +613,7 @@ static int config_get(int id, const void **data, const struct sr_dev_inst *sdi)
        case SR_DI_TRIGGER_TYPES:
                *data = TRIGGER_TYPES;
                break;
-       case SR_DI_CUR_SAMPLERATE:
+       case SR_CONF_SAMPLERATE:
                if (sdi) {
                        devc = sdi->priv;
                        *data = &devc->cur_samplerate;
index 0df6a5b85078cf0bf68b64fd42131525d7dc4478..e4d9f6f77c90955bdd6521f1448ace4bab66dd27 100644 (file)
@@ -451,7 +451,7 @@ static int config_get(int id, const void **data, const struct sr_dev_inst *sdi)
                *data = coupling;
                break;
        /* TODO remove this */
-       case SR_DI_CUR_SAMPLERATE:
+       case SR_CONF_SAMPLERATE:
                *data = &tmp;
                break;
        default:
index 98fc9b7819e683786ea94394e5baaee682f6f026..cde523ecf6569e2ee4bbeb6c7189e1cd8ab054bc 100644 (file)
@@ -309,7 +309,7 @@ static int config_get(int id, const void **data, const struct sr_dev_inst *sdi)
        case SR_DI_TRIGGER_TYPES:
                *data = (char *)TRIGGER_TYPES;
                break;
-       case SR_DI_CUR_SAMPLERATE:
+       case SR_CONF_SAMPLERATE:
                if (sdi) {
                        devc = sdi->priv;
                        *data = &devc->cur_rate;
index daf2311c78911ac8b64c982d792a6c7fa39e9695..845dd254b6005e44a6e130d3893a9a613efd24c7 100644 (file)
@@ -264,7 +264,7 @@ static int config_get(int id, const void **data, const struct sr_dev_inst *sdi)
        case SR_DI_TRIGGER_TYPES:
                *data = (char *)TRIGGER_TYPES;
                break;
-       case SR_DI_CUR_SAMPLERATE:
+       case SR_CONF_SAMPLERATE:
                if (sdi) {
                        devc = sdi->priv;
                        *data = &devc->cur_samplerate;
index b019f0f24ed1a83627945d94b3584aa3a825c8d7..7c4c6b89cd3cf5a8d109621971706b85c8911067 100644 (file)
@@ -200,7 +200,7 @@ 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_CUR_SAMPLERATE:
+       case SR_CONF_SAMPLERATE:
                /* TODO: Get rid of this. */
                *data = NULL;
                sr_spew("%s: Returning current samplerate.", __func__);
index b8f9fb1a7a8d1ca98c7144218e732d91a8f64b0c..ec34d306cb21d4de4c4779e45c12dfb9c040d635 100644 (file)
@@ -541,7 +541,7 @@ static int config_get(int id, const void **data, const struct sr_dev_inst *sdi)
                *data = TRIGGER_TYPES;
                sr_spew("zp: %s: Returning triggertypes: %s.", __func__, TRIGGER_TYPES);
                break;
-       case SR_DI_CUR_SAMPLERATE:
+       case SR_CONF_SAMPLERATE:
                if (sdi) {
                        devc = sdi->priv;
                        *data = &devc->cur_samplerate;
index a9c4cd487abfb7215c03f7df3f443d5b8187091d..d8b90f989e97ba9cf349c2d41b840ea1d989ede6 100644 (file)
@@ -553,8 +553,6 @@ enum {
        SR_DI_HWCAPS,
        /** Types of logic trigger supported, out of "01crf" (char *). */
        SR_DI_TRIGGER_TYPES,
-       /** The currently set samplerate in Hz (uint64_t). */
-       SR_DI_CUR_SAMPLERATE,
        /** Supported patterns (in pattern generator mode). */
        SR_DI_PATTERNS,
        /** Supported buffer sizes. */
index 5e5984d7c8297a97a7995aab267f6d142d1c3b2f..6074f053e81dd245f624f334b514324216023d2a 100644 (file)
@@ -129,7 +129,7 @@ static int init(struct sr_output *o)
        ctx->unitsize = (ctx->num_enabled_probes + 7) / 8;
 
        if (sr_dev_has_hwcap(o->sdi, SR_CONF_SAMPLERATE)) {
-               o->sdi->driver->config_get(SR_DI_CUR_SAMPLERATE,
+               o->sdi->driver->config_get(SR_CONF_SAMPLERATE,
                                (const void **)&samplerate, o->sdi);
                ctx->samplerate = *samplerate;
        } else
index a671c292990d11ad35724651488e98392b637092..10798a7362ce70ce1a2436f00ec9b4c2d548a187 100644 (file)
@@ -100,7 +100,7 @@ static int init(struct sr_output *o)
        num_probes = g_slist_length(o->sdi->probes);
 
        if (sr_dev_has_hwcap(o->sdi, SR_CONF_SAMPLERATE)) {
-               o->sdi->driver->config_get(SR_DI_CUR_SAMPLERATE,
+               o->sdi->driver->config_get(SR_CONF_SAMPLERATE,
                                (const void **)&samplerate, o->sdi);
                ctx->samplerate = *samplerate;
        } else
index 13c7adb7cf50e29285c3a49f509fcf02d619c73e..f70625a9fd42cdf47b6bd57f1013df0eb53ffce0 100644 (file)
@@ -110,7 +110,7 @@ static int init(struct sr_output *o)
        num_probes = g_slist_length(o->sdi->probes);
        comment[0] = '\0';
        if (sr_dev_has_hwcap(o->sdi, SR_CONF_SAMPLERATE)) {
-               o->sdi->driver->config_get(SR_DI_CUR_SAMPLERATE,
+               o->sdi->driver->config_get(SR_CONF_SAMPLERATE,
                                (const void **)&samplerate, o->sdi);
                if (!(frequency_s = sr_samplerate_string(*samplerate))) {
                        sr_err("%s: sr_samplerate_string failed", __func__);
index f5eaad45099cd3ab4a6c203c12371b89a0c723f5..40e48f915e4a92008cb04ac2b76c64754bc01216 100644 (file)
@@ -70,7 +70,7 @@ static int init(struct sr_output *o)
        ctx->unitsize = (num_enabled_probes + 7) / 8;
 
        if (o->sdi->driver && sr_dev_has_hwcap(o->sdi, SR_CONF_SAMPLERATE))
-               o->sdi->driver->config_get(SR_DI_CUR_SAMPLERATE,
+               o->sdi->driver->config_get(SR_CONF_SAMPLERATE,
                                (const void **)&samplerate, o->sdi);
        else {
                tmp = 0;
index 7c442ad8ab886a11b7683fe389e6c2a3eeb596ac..8bbe3b51d3b2fed7e32bc701613e83adb89fefdf 100644 (file)
@@ -124,7 +124,7 @@ SR_PRIV int init(struct sr_output *o, int default_spl, enum outputmode mode)
        snprintf(ctx->header, 511, "%s\n", PACKAGE_STRING);
        num_probes = g_slist_length(o->sdi->probes);
        if (o->sdi->driver || sr_dev_has_hwcap(o->sdi, SR_CONF_SAMPLERATE)) {
-               ret = o->sdi->driver->config_get(SR_DI_CUR_SAMPLERATE,
+               ret = o->sdi->driver->config_get(SR_CONF_SAMPLERATE,
                                (const void **)&samplerate, o->sdi);
                if (ret != SR_OK)
                        goto err;
index 39030c78cc5bf9aabb1f689631933c32edb6086e..39759d648f82be07de4c20ad167dd611ef60a5c8 100644 (file)
@@ -95,7 +95,7 @@ static int init(struct sr_output *o)
                        PACKAGE, PACKAGE_VERSION);
 
        if (o->sdi->driver && sr_dev_has_hwcap(o->sdi, SR_CONF_SAMPLERATE)) {
-               o->sdi->driver->config_get(SR_DI_CUR_SAMPLERATE,
+               o->sdi->driver->config_get(SR_CONF_SAMPLERATE,
                                (const void **)&samplerate, o->sdi);
                ctx->samplerate = *samplerate;
                if (!((samplerate_s = sr_samplerate_string(ctx->samplerate)))) {
index 52949722c87d8dcd1ad04c241fcd4db0ce648341..e4f6a9f424dfcdfdbe82d8a6642e44d9f55f92e8 100644 (file)
@@ -156,7 +156,7 @@ 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_CUR_SAMPLERATE:
+       case SR_CONF_SAMPLERATE:
                if (sdi) {
                        vdev = sdi->priv;
                        *data = &vdev->samplerate;
index 3168acbac9293fb07f9beaa2b8d7af1d0ee0cdbe..53e6d1e6bb0f7d8af90859ae139087cfbd4f1d1b 100644 (file)
@@ -254,7 +254,7 @@ SR_API int sr_session_save(const char *filename, const struct sr_dev_inst *sdi,
        fprintf(meta, "unitsize = %d\n", unitsize);
        fprintf(meta, "total probes = %d\n", g_slist_length(sdi->probes));
        if (sr_dev_has_hwcap(sdi, SR_CONF_SAMPLERATE)) {
-               if (sr_info_get(sdi->driver, SR_DI_CUR_SAMPLERATE,
+               if (sr_info_get(sdi->driver, SR_CONF_SAMPLERATE,
                                (const void **)&samplerate, sdi) == SR_OK) {
                        s = sr_samplerate_string(*samplerate);
                        fprintf(meta, "samplerate = %s\n", s);