drivers: fix mask generation when using cond
authorFlorent Kermarrec <florent@enjoy-digital.fr>
Fri, 16 Jan 2015 22:50:33 +0000 (23:50 +0100)
committerFlorent Kermarrec <florent@enjoy-digital.fr>
Fri, 16 Jan 2015 22:50:33 +0000 (23:50 +0100)
miscope/host/drivers.py

index a3d6563360381c48dc9ebbe05f72166e890bf9d6..44084646f0f816f8c98fbcc9b32c6fb4ed30d483 100644 (file)
@@ -71,7 +71,7 @@ class MiLaDriver():
                if cond is not None:
                        for k, v in cond.items():
                                trigger |= getattr(self, k+"_o")*v
-                               mask |= getattr(self, k+"_m")*v
+                               mask |= getattr(self, k+"_m")
                t = getattr(self, "mila_trigger_port{d}_trig".format(d=int(port)))
                m = getattr(self, "mila_trigger_port{d}_mask".format(d=int(port)))
                t.write(trigger)