deprecate SR_DI_SAMPLERATES

This is replaced by a call to config_list() with id SR_CONF_SAMPLERATE.
This commit is contained in:
Bert Vermeulen 2013-01-25 02:39:58 +01:00
parent a1c743fc51
commit fbec8bd2f3
11 changed files with 1 additions and 40 deletions

View 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;
}

View 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;

View 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__,

View 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 };
/*

View 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;

View 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;

View 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;

View 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;

View 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;

View 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);

View 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). */