From: Uwe Hermann Date: Fri, 16 Jun 2017 14:09:00 +0000 (+0200) Subject: lpc: Convert to PD API version 3. X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=a46b6ad55225c4e3fbd67b709382cb0799d86e45;p=libsigrokdecode.git lpc: Convert to PD API version 3. --- 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: