demo: forgot second part of samplerate support
This commit is contained in:
parent
e5d1717e6d
commit
4bfbf9fce7
|
@ -55,12 +55,20 @@ struct databag {
|
||||||
|
|
||||||
static int capabilities[] = {
|
static int capabilities[] = {
|
||||||
SR_HWCAP_LOGIC_ANALYZER,
|
SR_HWCAP_LOGIC_ANALYZER,
|
||||||
|
SR_HWCAP_SAMPLERATE,
|
||||||
SR_HWCAP_PATTERN_MODE,
|
SR_HWCAP_PATTERN_MODE,
|
||||||
SR_HWCAP_LIMIT_SAMPLES,
|
SR_HWCAP_LIMIT_SAMPLES,
|
||||||
SR_HWCAP_LIMIT_MSEC,
|
SR_HWCAP_LIMIT_MSEC,
|
||||||
SR_HWCAP_CONTINUOUS,
|
SR_HWCAP_CONTINUOUS,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static struct sr_samplerates samplerates = {
|
||||||
|
1,
|
||||||
|
GHZ(1),
|
||||||
|
1,
|
||||||
|
NULL,
|
||||||
|
};
|
||||||
|
|
||||||
static const char *patternmodes[] = {
|
static const char *patternmodes[] = {
|
||||||
"random",
|
"random",
|
||||||
"incremental",
|
"incremental",
|
||||||
|
@ -142,6 +150,9 @@ static void *hw_get_device_info(int device_index, int device_info_id)
|
||||||
case SR_DI_NUM_PROBES:
|
case SR_DI_NUM_PROBES:
|
||||||
info = GINT_TO_POINTER(NUM_PROBES);
|
info = GINT_TO_POINTER(NUM_PROBES);
|
||||||
break;
|
break;
|
||||||
|
case SR_DI_SAMPLERATES:
|
||||||
|
info = &samplerates;
|
||||||
|
break;
|
||||||
case SR_DI_CUR_SAMPLERATE:
|
case SR_DI_CUR_SAMPLERATE:
|
||||||
info = &cur_samplerate;
|
info = &cur_samplerate;
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue