diff options
author | Bert Vermeulen <bert@biot.com> | 2012-01-31 00:48:07 +0100 |
---|---|---|
committer | Bert Vermeulen <bert@biot.com> | 2012-01-31 00:48:07 +0100 |
commit | 2a706c20b73ea466a16c7f5ae6a8b0d44e470053 (patch) | |
tree | f9a08b1f57ba2f4d65d4b1b1087a4f4f7238b72f /decoders/edid | |
parent | 6fff00eee1dd62477cd2708df480b985ef416a67 (diff) | |
download | libsigrokdecode-2a706c20b73ea466a16c7f5ae6a8b0d44e470053.tar.gz libsigrokdecode-2a706c20b73ea466a16c7f5ae6a8b0d44e470053.zip |
edid: properly deal with leading I2C crud + small fixes
Diffstat (limited to 'decoders/edid')
-rw-r--r-- | decoders/edid/edid.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/decoders/edid/edid.py b/decoders/edid/edid.py index b575f46..6d53bf1 100644 --- a/decoders/edid/edid.py +++ b/decoders/edid/edid.py @@ -107,6 +107,8 @@ class Decoder(srd.Decoder): self.cnt += 1 self.sn.append( [ss, es] ) self.cache.append(data) + # debug +# self.put(ss, es, self.out_ann, [0, ["%d: [%.2x]" % (self.cnt, data)]]) if self.state is None: # Wait for the EDID header @@ -115,6 +117,7 @@ class Decoder(srd.Decoder): # Throw away any garbage before the header self.sn = self.sn[-8:] self.cache = self.cache[-8:] + self.cnt = 8 self.state = 'edid' self.put(ss, es, self.out_ann, [0, ["EDID header"]]) elif self.state == 'edid': @@ -401,7 +404,7 @@ class Decoder(srd.Decoder): + (posneg[sync2 & 0x01]) + ')' elif sync == 0x03: features += 'digital separate (' - features += 'Vsync polarity ' + (posneg[sync2 >> 1]) + features += 'Vsync polarity ' + (posneg[(sync2 & 0x02) >> 1]) features += ', Hsync polarity ' + (posneg[sync2 & 0x01]) features += ')' features += ', ' |