summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUwe Hermann <uwe@hermann-uwe.de>2017-06-16 16:09:00 +0200
committerUwe Hermann <uwe@hermann-uwe.de>2017-06-16 16:09:00 +0200
commita46b6ad55225c4e3fbd67b709382cb0799d86e45 (patch)
tree29d974cf7cf1902fa9d906fea1f509e9420e6a07
parent80307e8aaab4e1269a25f00cbfb2249377855bf7 (diff)
downloadlibsigrokdecode-a46b6ad55225c4e3fbd67b709382cb0799d86e45.tar.gz
libsigrokdecode-a46b6ad55225c4e3fbd67b709382cb0799d86e45.zip
lpc: Convert to PD API version 3.
-rw-r--r--decoders/lpc/pd.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/decoders/lpc/pd.py b/decoders/lpc/pd.py
index d0dadaa..5e838cf 100644
--- a/decoders/lpc/pd.py
+++ b/decoders/lpc/pd.py
@@ -95,7 +95,7 @@ fields = {
}
class Decoder(srd.Decoder):
- api_version = 2
+ api_version = 3
id = 'lpc'
name = 'LPC'
longname = 'Low-Pin-Count'
@@ -312,8 +312,10 @@ class Decoder(srd.Decoder):
self.tarcount = 0
self.state = 'IDLE'
- def decode(self, ss, es, data):
- for (self.samplenum, pins) in data:
+ def decode(self):
+ while True:
+ # TODO: Come up with more appropriate self.wait() conditions.
+ pins = self.wait({'skip': 1})
# If none of the pins changed, there's nothing to do.
if self.oldpins == pins: