]> sigrok.org Git - libsigrok.git/commitdiff
dreamsourcelab-dslogic: Fixed trigger-stages field in trig_glb
authorJoel Holdsworth <redacted>
Sun, 17 Sep 2017 23:59:44 +0000 (17:59 -0600)
committerUwe Hermann <redacted>
Mon, 18 Sep 2017 22:31:11 +0000 (00:31 +0200)
src/hardware/dreamsourcelab-dslogic/protocol.c

index ec022caa63f2d4110822fd99c2cc54294631918b..42722f435977722d7579abcd53ec1c7f11294b9a 100644 (file)
@@ -354,8 +354,6 @@ static void set_trigger(const struct sr_dev_inst *sdi, struct fpga_config *cfg)
 
        cfg->ch_en = enabled_channel_mask(sdi);
 
-       cfg->trig_glb = num_enabled_channels << 4;
-
        for (i = 0; i < NUM_TRIGGER_STAGES; i++) {
                cfg->trig_mask0[i] = 0xffff;
                cfg->trig_mask1[i] = 0xffff;
@@ -420,7 +418,7 @@ static void set_trigger(const struct sr_dev_inst *sdi, struct fpga_config *cfg)
                }
        }
 
-       cfg->trig_glb |= num_trigger_stages;
+       cfg->trig_glb = (num_enabled_channels << 4) | (num_trigger_stages - 1);
 }
 
 static int fpga_configure(const struct sr_dev_inst *sdi)