]> sigrok.org Git - libsigrok.git/commitdiff
ols: fixed demux mode disable noise filter
authorMatt Ranostay <redacted>
Sat, 7 Sep 2013 05:27:46 +0000 (22:27 -0700)
committerBert Vermeulen <redacted>
Sat, 7 Sep 2013 18:17:16 +0000 (20:17 +0200)
Demux flag wasn't getting set off if one non-demux sample was ran
beforehand.

Signed-off-by: Matt Ranostay <redacted>
hardware/openbench-logic-sniffer/protocol.c

index d4e04e438458a92139e91e825f180907bf18b702..bd9e55bffde4ac1b7f12c897b1bf989a0452d99f 100644 (file)
@@ -302,10 +302,13 @@ SR_PRIV int ols_set_samplerate(const struct sr_dev_inst *sdi,
                return SR_ERR_SAMPLERATE;
 
        if (samplerate > CLOCK_RATE) {
+               sr_info("Enabling demux mode.");
                devc->flag_reg |= FLAG_DEMUX;
+               devc->flag_reg &= ~FLAG_FILTER;
                devc->max_probes = NUM_PROBES / 2;
                devc->cur_samplerate_divider = (CLOCK_RATE * 2 / samplerate) - 1;
        } else {
+               sr_info("Disabling demux mode.");
                devc->flag_reg &= ~FLAG_DEMUX;
                devc->flag_reg |= FLAG_FILTER;
                devc->max_probes = NUM_PROBES;