]> sigrok.org Git - libsigrok.git/blobdiff - hardware/openbench-logic-sniffer/api.c
ols: Moved FLAG_FILTER to demux check
[libsigrok.git] / hardware / openbench-logic-sniffer / api.c
index 77082257454e4dac3c059d20341cb94ae8b34750..7302860863a50dd899c997195e34f90de3ef4d9f 100644 (file)
@@ -34,6 +34,7 @@ static const int32_t hwcaps[] = {
        SR_CONF_LIMIT_SAMPLES,
        SR_CONF_EXTERNAL_CLOCK,
        SR_CONF_PATTERN_MODE,
+       SR_CONF_SWAP,
        SR_CONF_RLE,
 };
 
@@ -325,6 +326,17 @@ static int config_set(int id, GVariant *data, const struct sr_dev_inst *sdi)
                        ret = SR_ERR;
                }
                break;
+       case SR_CONF_SWAP:
+               if (g_variant_get_boolean(data)) {
+                       sr_info("Enabling channel swapping.");
+                       devc->flag_reg |= FLAG_SWAP_PROBES;
+               } else {
+                       sr_info("Disabling channel swapping.");
+                       devc->flag_reg &= ~FLAG_SWAP_PROBES;
+               }
+               ret = SR_OK;
+               break;
+
        case SR_CONF_RLE:
                if (g_variant_get_boolean(data)) {
                        sr_info("Enabling RLE.");
@@ -493,7 +505,6 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi,
 
        /* The flag register wants them here, and 1 means "disable channel". */
        devc->flag_reg |= ~(changrp_mask << 2) & 0x3c;
-       devc->flag_reg |= FLAG_FILTER;
        devc->rle_count = 0;
        data = (devc->flag_reg << 24) | ((devc->flag_reg << 8) & 0xff0000);
        if (send_longcommand(serial, CMD_SET_FLAGS, data) != SR_OK)