From: Bert Vermeulen Date: Fri, 25 Jan 2013 01:39:58 +0000 (+0100) Subject: deprecate SR_DI_SAMPLERATES X-Git-Tag: dsupstream~319 X-Git-Url: http://sigrok.org/gitweb/?p=libsigrok.git;a=commitdiff_plain;h=fbec8bd2f3ead02358df65240c2cf786c8267f54 deprecate SR_DI_SAMPLERATES This is replaced by a call to config_list() with id SR_CONF_SAMPLERATE. --- diff --git a/hardware/alsa/api.c b/hardware/alsa/api.c index 594b95e8..fdea5f7e 100644 --- a/hardware/alsa/api.c +++ b/hardware/alsa/api.c @@ -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; } diff --git a/hardware/asix-sigma/asix-sigma.c b/hardware/asix-sigma/asix-sigma.c index 28727b81..e340e540 100644 --- a/hardware/asix-sigma/asix-sigma.c +++ b/hardware/asix-sigma/asix-sigma.c @@ -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; diff --git a/hardware/chronovu-la8/api.c b/hardware/chronovu-la8/api.c index c1d55c5b..ddda8733 100644 --- a/hardware/chronovu-la8/api.c +++ b/hardware/chronovu-la8/api.c @@ -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__, diff --git a/hardware/chronovu-la8/protocol.c b/hardware/chronovu-la8/protocol.c index 7a450cf4..35a0342c 100644 --- a/hardware/chronovu-la8/protocol.c +++ b/hardware/chronovu-la8/protocol.c @@ -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 }; /* diff --git a/hardware/demo/demo.c b/hardware/demo/demo.c index c346dd3e..6c211cd7 100644 --- a/hardware/demo/demo.c +++ b/hardware/demo/demo.c @@ -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; diff --git a/hardware/fx2lafw/fx2lafw.c b/hardware/fx2lafw/fx2lafw.c index a76ffd57..1717f9d0 100644 --- a/hardware/fx2lafw/fx2lafw.c +++ b/hardware/fx2lafw/fx2lafw.c @@ -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; diff --git a/hardware/link-mso19/api.c b/hardware/link-mso19/api.c index 6c23bbbe..98fc9b78 100644 --- a/hardware/link-mso19/api.c +++ b/hardware/link-mso19/api.c @@ -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; diff --git a/hardware/openbench-logic-sniffer/api.c b/hardware/openbench-logic-sniffer/api.c index 22afead9..daf2311c 100644 --- a/hardware/openbench-logic-sniffer/api.c +++ b/hardware/openbench-logic-sniffer/api.c @@ -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; diff --git a/hardware/uni-t-dmm/api.c b/hardware/uni-t-dmm/api.c index a0c4e267..b019f0f2 100644 --- a/hardware/uni-t-dmm/api.c +++ b/hardware/uni-t-dmm/api.c @@ -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; diff --git a/hardware/zeroplus-logic-cube/zeroplus.c b/hardware/zeroplus-logic-cube/zeroplus.c index ac47f085..b8f9fb1a 100644 --- a/hardware/zeroplus-logic-cube/zeroplus.c +++ b/hardware/zeroplus-logic-cube/zeroplus.c @@ -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); diff --git a/libsigrok.h b/libsigrok.h index b4d929ef..a9c4cd48 100644 --- a/libsigrok.h +++ b/libsigrok.h @@ -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). */