]> sigrok.org Git - libsigrok.git/commitdiff
demo: support setting sample rate
authorBert Vermeulen <redacted>
Fri, 4 Feb 2011 05:28:49 +0000 (06:28 +0100)
committerBert Vermeulen <redacted>
Fri, 4 Feb 2011 05:29:41 +0000 (06:29 +0100)
hardware/demo/demo.c

index f36024c8c3d1fa351146739c68728fd2fbfaec95..fda8091bbced50fe915ce8834d502c34751633dc 100644 (file)
@@ -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;