summaryrefslogtreecommitdiff
path: root/decoders/ps2
diff options
context:
space:
mode:
Diffstat (limited to 'decoders/ps2')
-rw-r--r--decoders/ps2/pd.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/decoders/ps2/pd.py b/decoders/ps2/pd.py
index 194b0b1..a9d0a98 100644
--- a/decoders/ps2/pd.py
+++ b/decoders/ps2/pd.py
@@ -116,6 +116,11 @@ class Decoder(srd.Decoder):
def decode(self):
while True:
- # Sample data bits on falling clock edge.
- clock_pin, data_pin = self.wait({0: 'f'})
+ # Sample data bits on the falling clock edge (assume the device
+ # is the transmitter). Expect the data byte transmission to end
+ # at the rising clock edge. Cope with the absence of host activity.
+ _, data_pin = self.wait({0: 'f'})
self.handle_bits(data_pin)
+ if self.bitcount == 1 + 8 + 1 + 1:
+ _, data_pin = self.wait({0: 'r'})
+ self.handle_bits(data_pin)