From: Bert Vermeulen Date: Fri, 4 Feb 2011 05:28:49 +0000 (+0100) Subject: demo: support setting sample rate X-Git-Tag: libsigrok-0.1.0~348 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=d81d29333e255a236b029860683f4bfadd1c15e3;p=libsigrok.git demo: support setting sample rate --- diff --git a/hardware/demo/demo.c b/hardware/demo/demo.c index f36024c8..fda8091b 100644 --- a/hardware/demo/demo.c +++ b/hardware/demo/demo.c @@ -176,7 +176,11 @@ static int hw_set_configuration(int device_index, int capability, void *value) device_index = device_index; if (capability == SR_HWCAP_PROBECONFIG) { - /* Nothing to do. */ + /* Nothing to do, but must be supported */ + ret = SR_OK; + } else if (capability == SR_HWCAP_SAMPLERATE) { + tmp_u64 = value; + cur_samplerate = *tmp_u64; ret = SR_OK; } else if (capability == SR_HWCAP_LIMIT_SAMPLES) { tmp_u64 = value;