X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=decoders%2Fedid%2Fedid.py;h=a03fe67c9644cbfbdf5b668eb7b4b4d403e89216;hb=92d1aba34bbe661b388e874fda0a41f477d3e30d;hp=b4b5f844698b581d8e0c72de44b2c43d046d4995;hpb=09059016e02db5d83b4862a3adcf8ddf101f6991;p=libsigrokdecode.git diff --git a/decoders/edid/edid.py b/decoders/edid/edid.py index b4b5f84..a03fe67 100644 --- a/decoders/edid/edid.py +++ b/decoders/edid/edid.py @@ -78,8 +78,8 @@ class Decoder(srd.Decoder): api_version = 1 id = 'edid' name = 'EDID' - longname = 'Extended display identification data' - desc = 'A data structure describing the capabilities of a display device.' + longname = 'Extended Display Identification Data' + desc = 'Data structure describing display device capabilities.' license = 'gplv3+' inputs = ['ddc2'] outputs = ['edid'] @@ -101,9 +101,16 @@ class Decoder(srd.Decoder): def start(self, metadata): self.out_ann = self.add(srd.OUTPUT_ANN, 'edid') + def report(self): + 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)