deprecate SR_DI_SAMPLERATES
This is replaced by a call to config_list() with id SR_CONF_SAMPLERATE.
This commit is contained in:
parent
a1c743fc51
commit
fbec8bd2f3
|
@ -154,13 +154,6 @@ static int config_get(int id, const void **data, const struct sr_dev_inst *sdi)
|
||||||
case SR_DI_CUR_SAMPLERATE:
|
case SR_DI_CUR_SAMPLERATE:
|
||||||
*data = &devc->cur_samplerate;
|
*data = &devc->cur_samplerate;
|
||||||
break;
|
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:
|
default:
|
||||||
return SR_ERR_ARG;
|
return SR_ERR_ARG;
|
||||||
}
|
}
|
||||||
|
|
|
@ -795,9 +795,6 @@ static int config_get(int id, const void **data, const struct sr_dev_inst *sdi)
|
||||||
case SR_DI_HWCAPS:
|
case SR_DI_HWCAPS:
|
||||||
*data = hwcaps;
|
*data = hwcaps;
|
||||||
break;
|
break;
|
||||||
case SR_DI_SAMPLERATES:
|
|
||||||
*data = &samplerates;
|
|
||||||
break;
|
|
||||||
case SR_DI_TRIGGER_TYPES:
|
case SR_DI_TRIGGER_TYPES:
|
||||||
*data = (char *)TRIGGER_TYPES;
|
*data = (char *)TRIGGER_TYPES;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -296,11 +296,6 @@ static int config_get(int id, const void **data, const struct sr_dev_inst *sdi)
|
||||||
case SR_DI_HWCAPS:
|
case SR_DI_HWCAPS:
|
||||||
*data = hwcaps;
|
*data = hwcaps;
|
||||||
break;
|
break;
|
||||||
case SR_DI_SAMPLERATES:
|
|
||||||
fill_supported_samplerates_if_needed();
|
|
||||||
*data = &samplerates;
|
|
||||||
sr_spew("%s: Returning samplerates.", __func__);
|
|
||||||
break;
|
|
||||||
case SR_DI_TRIGGER_TYPES:
|
case SR_DI_TRIGGER_TYPES:
|
||||||
*data = (char *)TRIGGER_TYPES;
|
*data = (char *)TRIGGER_TYPES;
|
||||||
sr_spew("%s: Returning trigger types: %s.", __func__,
|
sr_spew("%s: Returning trigger types: %s.", __func__,
|
||||||
|
|
|
@ -30,7 +30,7 @@ SR_PRIV const char *probe_names[NUM_PROBES + 1] = {
|
||||||
NULL,
|
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 };
|
SR_PRIV uint64_t supported_samplerates[255 + 1] = { 0 };
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -234,9 +234,6 @@ static int config_get(int id, const void **data, const struct sr_dev_inst *sdi)
|
||||||
case SR_DI_HWCAPS:
|
case SR_DI_HWCAPS:
|
||||||
*data = hwcaps;
|
*data = hwcaps;
|
||||||
break;
|
break;
|
||||||
case SR_DI_SAMPLERATES:
|
|
||||||
*data = &samplerates;
|
|
||||||
break;
|
|
||||||
case SR_DI_CUR_SAMPLERATE:
|
case SR_DI_CUR_SAMPLERATE:
|
||||||
*data = &cur_samplerate;
|
*data = &cur_samplerate;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -610,9 +610,6 @@ static int config_get(int id, const void **data, const struct sr_dev_inst *sdi)
|
||||||
case SR_DI_HWCAPS:
|
case SR_DI_HWCAPS:
|
||||||
*data = hwcaps;
|
*data = hwcaps;
|
||||||
break;
|
break;
|
||||||
case SR_DI_SAMPLERATES:
|
|
||||||
*data = &samplerates;
|
|
||||||
break;
|
|
||||||
case SR_DI_TRIGGER_TYPES:
|
case SR_DI_TRIGGER_TYPES:
|
||||||
*data = TRIGGER_TYPES;
|
*data = TRIGGER_TYPES;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -306,9 +306,6 @@ static int config_get(int id, const void **data, const struct sr_dev_inst *sdi)
|
||||||
case SR_DI_HWCAPS:
|
case SR_DI_HWCAPS:
|
||||||
*data = hwcaps;
|
*data = hwcaps;
|
||||||
break;
|
break;
|
||||||
case SR_DI_SAMPLERATES:
|
|
||||||
*data = &samplerates;
|
|
||||||
break;
|
|
||||||
case SR_DI_TRIGGER_TYPES:
|
case SR_DI_TRIGGER_TYPES:
|
||||||
*data = (char *)TRIGGER_TYPES;
|
*data = (char *)TRIGGER_TYPES;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -261,9 +261,6 @@ static int config_get(int id, const void **data, const struct sr_dev_inst *sdi)
|
||||||
case SR_DI_HWCAPS:
|
case SR_DI_HWCAPS:
|
||||||
*data = hwcaps;
|
*data = hwcaps;
|
||||||
break;
|
break;
|
||||||
case SR_DI_SAMPLERATES:
|
|
||||||
*data = &samplerates;
|
|
||||||
break;
|
|
||||||
case SR_DI_TRIGGER_TYPES:
|
case SR_DI_TRIGGER_TYPES:
|
||||||
*data = (char *)TRIGGER_TYPES;
|
*data = (char *)TRIGGER_TYPES;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -200,12 +200,6 @@ static int config_get(int id, const void **data, const struct sr_dev_inst *sdi)
|
||||||
*data = hwcaps;
|
*data = hwcaps;
|
||||||
sr_spew("%s: Returning hwcaps.", __func__);
|
sr_spew("%s: Returning hwcaps.", __func__);
|
||||||
break;
|
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:
|
case SR_DI_CUR_SAMPLERATE:
|
||||||
/* TODO: Get rid of this. */
|
/* TODO: Get rid of this. */
|
||||||
*data = NULL;
|
*data = NULL;
|
||||||
|
|
|
@ -537,10 +537,6 @@ static int config_get(int id, const void **data, const struct sr_dev_inst *sdi)
|
||||||
case SR_DI_HWCAPS:
|
case SR_DI_HWCAPS:
|
||||||
*data = hwcaps;
|
*data = hwcaps;
|
||||||
break;
|
break;
|
||||||
case SR_DI_SAMPLERATES:
|
|
||||||
*data = &samplerates;
|
|
||||||
sr_spew("zp: %s: Returning samplerates.", __func__);
|
|
||||||
break;
|
|
||||||
case SR_DI_TRIGGER_TYPES:
|
case SR_DI_TRIGGER_TYPES:
|
||||||
*data = TRIGGER_TYPES;
|
*data = TRIGGER_TYPES;
|
||||||
sr_spew("zp: %s: Returning triggertypes: %s.", __func__, TRIGGER_TYPES);
|
sr_spew("zp: %s: Returning triggertypes: %s.", __func__, TRIGGER_TYPES);
|
||||||
|
|
|
@ -551,8 +551,6 @@ enum {
|
||||||
SR_DI_HWOPTS = 10000,
|
SR_DI_HWOPTS = 10000,
|
||||||
/** A list of capabilities supported by the device. */
|
/** A list of capabilities supported by the device. */
|
||||||
SR_DI_HWCAPS,
|
SR_DI_HWCAPS,
|
||||||
/** Samplerates supported by this device (struct sr_samplerates). */
|
|
||||||
SR_DI_SAMPLERATES,
|
|
||||||
/** Types of logic trigger supported, out of "01crf" (char *). */
|
/** Types of logic trigger supported, out of "01crf" (char *). */
|
||||||
SR_DI_TRIGGER_TYPES,
|
SR_DI_TRIGGER_TYPES,
|
||||||
/** The currently set samplerate in Hz (uint64_t). */
|
/** The currently set samplerate in Hz (uint64_t). */
|
||||||
|
|
Loading…
Reference in New Issue