summaryrefslogtreecommitdiff
path: root/decoders/edid
diff options
context:
space:
mode:
authorUwe Hermann <uwe@hermann-uwe.de>2012-06-28 21:43:12 +0200
committerUwe Hermann <uwe@hermann-uwe.de>2012-07-04 01:03:13 +0200
commit48eee789a15ebd4c26d469a29dd79e7971f031fe (patch)
tree0ce5b787b9a753228b9243a31a169d52824ce09b /decoders/edid
parent44f7ba18ee64fc89d0f69619076ff28a8bc6b31a (diff)
downloadlibsigrokdecode-48eee789a15ebd4c26d469a29dd79e7971f031fe.tar.gz
libsigrokdecode-48eee789a15ebd4c26d469a29dd79e7971f031fe.zip
srd: i2cfilter: Output actual I2C packets.
Change this PD from an I2C->databytes converter/filter to an actual pure I2C filter in the sense that both input and output is a valid I2C protocol stream. Also, change the EDID decoder accordingly, to use the new i2cfilter output.
Diffstat (limited to 'decoders/edid')
-rw-r--r--decoders/edid/edid.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/decoders/edid/edid.py b/decoders/edid/edid.py
index 21ab008..a03fe67 100644
--- a/decoders/edid/edid.py
+++ b/decoders/edid/edid.py
@@ -105,8 +105,12 @@ class Decoder(srd.Decoder):
pass
def decode(self, ss, es, data):
- if type(data) != int:
- raise Exception('malformed ddc2 input: expected 1 byte')
+ cmd, data = data
+
+ # We only care about actual data bytes that are read (for now).
+ if cmd != 'DATA READ':
+ return
+
self.cnt += 1
self.sn.append([ss, es])
self.cache.append(data)