-
- for (self.samplenum, pins) in data:
- # We are only interested in transitions.
- if self.oldpin == pins:
- continue
-
- self.oldpin, (clk, sig) = pins, pins
-
- if self.oldclk is None and self.oldsig is None:
- self.oldclk, self.oldsig = clk, sig
+ while True:
+ # Wait for a transition on CLK and/or SIG.
+ clk, sig = self.wait([{0: 'e'}, {1: 'e'}])