diff options
author | Uwe Hermann <uwe@hermann-uwe.de> | 2017-06-16 16:22:57 +0200 |
---|---|---|
committer | Uwe Hermann <uwe@hermann-uwe.de> | 2017-06-16 16:22:57 +0200 |
commit | de594dd1322a839636b086c9d9f21bfc12297d1f (patch) | |
tree | 053a46a9d6e8cc1196672309a7c7e12a711de60f | |
parent | 6e333d9ef8495fd93b47ea856b0dbbdb5d33309e (diff) | |
download | libsigrokdecode-de594dd1322a839636b086c9d9f21bfc12297d1f.tar.gz libsigrokdecode-de594dd1322a839636b086c9d9f21bfc12297d1f.zip |
dsi: Convert to PD API version 3.
-rw-r--r-- | decoders/dsi/pd.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/decoders/dsi/pd.py b/decoders/dsi/pd.py index d049b9c..35a1225 100644 --- a/decoders/dsi/pd.py +++ b/decoders/dsi/pd.py @@ -23,7 +23,7 @@ class SamplerateError(Exception): pass class Decoder(srd.Decoder): - api_version = 2 + api_version = 3 id = 'dsi' name = 'DSI' longname = 'Digital Serial Interface' @@ -103,12 +103,12 @@ class Decoder(srd.Decoder): self.edges, self.bits, self.ss_es_bits = [], [], [] self.state = 'IDLE' - def decode(self, ss, es, data): + def decode(self): if not self.samplerate: raise SamplerateError('Cannot decode without samplerate.') bit = 0 - for (self.samplenum, pins) in data: - self.dsi = pins[0] + while True: + (self.dsi,) = self.wait({'skip': 1}) if self.options['polarity'] == 'active-high': self.dsi ^= 1 # Invert. |