X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;f=decoders%2Fedid%2Fpd.py;h=8af10aee7e65dba082d0c8753f92176a52cabe4a;hb=35e92b7bc6f40232144a7e6c9875ef02dbc6faa5;hp=760acf35e492f1e1d15ba306efcc0ab473e63ddd;hpb=50bd5d259677faf87bb3408e111d0e833d7ba9b4;p=libsigrokdecode.git diff --git a/decoders/edid/pd.py b/decoders/edid/pd.py index 760acf3..8af10ae 100644 --- a/decoders/edid/pd.py +++ b/decoders/edid/pd.py @@ -17,8 +17,6 @@ ## along with this program; if not, see . ## -# EDID protocol decoder - # TODO: # - EDID < 1.3 # - add short annotations @@ -70,12 +68,12 @@ xy_ratio = [ (16, 9), ] -# Annotation types +# Annotation classes ANN_FIELDS = 0 ANN_SECTIONS = 1 class Decoder(srd.Decoder): - api_version = 1 + api_version = 2 id = 'edid' name = 'EDID' longname = 'Extended Display Identification Data' @@ -83,13 +81,10 @@ class Decoder(srd.Decoder): license = 'gplv3+' inputs = ['i2c'] outputs = ['edid'] - probes = [] - optional_probes = [] - options = {} - annotations = [ - ['EDID fields', 'EDID structure fields'], - ['EDID sections', 'EDID structure sections'], - ] + annotations = ( + ('fields', 'EDID structure fields'), + ('sections', 'EDID structure sections'), + ) def __init__(self, **kwargs): self.state = None @@ -100,11 +95,8 @@ class Decoder(srd.Decoder): # Received data self.cache = [] - def start(self, metadata): - self.out_ann = self.add(srd.OUTPUT_ANN, 'edid') - - def report(self): - pass + def start(self): + self.out_ann = self.register(srd.OUTPUT_ANN) def decode(self, ss, es, data): cmd, data = data