From: Bert Vermeulen Date: Sat, 12 Feb 2011 02:24:23 +0000 (+0100) Subject: demo: forgot second part of samplerate support X-Git-Tag: libsigrok-0.1.0~332 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=4bfbf9fce71f91b3e7b7e968d436f7c436fc9648;p=libsigrok.git demo: forgot second part of samplerate support --- diff --git a/hardware/demo/demo.c b/hardware/demo/demo.c index 1eec6a20..281d9da4 100644 --- a/hardware/demo/demo.c +++ b/hardware/demo/demo.c @@ -55,12 +55,20 @@ struct databag { static int capabilities[] = { SR_HWCAP_LOGIC_ANALYZER, + SR_HWCAP_SAMPLERATE, SR_HWCAP_PATTERN_MODE, SR_HWCAP_LIMIT_SAMPLES, SR_HWCAP_LIMIT_MSEC, SR_HWCAP_CONTINUOUS, }; +static struct sr_samplerates samplerates = { + 1, + GHZ(1), + 1, + NULL, +}; + static const char *patternmodes[] = { "random", "incremental", @@ -142,6 +150,9 @@ static void *hw_get_device_info(int device_index, int device_info_id) case SR_DI_NUM_PROBES: info = GINT_TO_POINTER(NUM_PROBES); break; + case SR_DI_SAMPLERATES: + info = &samplerates; + break; case SR_DI_CUR_SAMPLERATE: info = &cur_samplerate; break;