summaryrefslogtreecommitdiff
path: root/decoders/parallel/pd.py
diff options
context:
space:
mode:
Diffstat (limited to 'decoders/parallel/pd.py')
-rw-r--r--decoders/parallel/pd.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/decoders/parallel/pd.py b/decoders/parallel/pd.py
index 140b7b8..4c09d86 100644
--- a/decoders/parallel/pd.py
+++ b/decoders/parallel/pd.py
@@ -176,10 +176,11 @@ class Decoder(srd.Decoder):
for i in range(1, len(self.optional_channels)):
if self.has_channel(i):
conds.append({i: 'e'})
- while True:
- self.handle_bits(self.wait(conds)[1:])
else:
# Sample on the rising or falling CLK edge (depends on config).
- while True:
- pins = self.wait({0: self.options['clock_edge'][0]})
- self.handle_bits(pins[1:])
+ edge = self.options['clock_edge'][0]
+ conds = [{0: edge}]
+
+ while True:
+ pins = self.wait(conds)
+ self.handle_bits(pins[1:])