]> sigrok.org Git - libsigrokdecode.git/commitdiff
lpc: Convert to PD API version 3.
authorUwe Hermann <redacted>
Fri, 16 Jun 2017 14:09:00 +0000 (16:09 +0200)
committerUwe Hermann <redacted>
Fri, 16 Jun 2017 14:09:00 +0000 (16:09 +0200)
decoders/lpc/pd.py

index d0dadaa43a04b629c8f822e96b4d6d939a8a807f..5e838cf0e336febbcb52afa1f68baaf08dcba4e1 100644 (file)
@@ -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: