X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;f=decoders%2Fi2cfilter%2Fpd.py;h=664bbcd97286adfd97670332feb1c515529d0ec0;hb=7efd37c004833a4f1758bc99623850d89722636d;hp=9c9c43aff8d5240994cfffd42331725e6f9b8183;hpb=24c74fd30fb161837c5f8b01baf3c0fe2dfa4ed5;p=libsigrokdecode.git diff --git a/decoders/i2cfilter/pd.py b/decoders/i2cfilter/pd.py index 9c9c43a..664bbcd 100644 --- a/decoders/i2cfilter/pd.py +++ b/decoders/i2cfilter/pd.py @@ -1,5 +1,5 @@ ## -## This file is part of the sigrok project. +## This file is part of the libsigrokdecode project. ## ## Copyright (C) 2012 Bert Vermeulen ## Copyright (C) 2012 Uwe Hermann @@ -47,16 +47,13 @@ class Decoder(srd.Decoder): self.curdirection = None self.packets = [] # Local cache of I2C packets - def start(self, metadata): - self.out_proto = self.add(srd.OUTPUT_PROTO, 'i2c') + def start(self): + self.out_proto = self.register(srd.OUTPUT_PYTHON, proto_id='i2c') if self.options['address'] not in range(0, 127 + 1): raise Exception('Invalid slave (must be 0..127).') if self.options['direction'] not in ('both', 'read', 'write'): raise Exception('Invalid direction (valid: read/write/both).') - def report(self): - pass - # Grab I2C packets into a local cache, until an I2C STOP condition # packet comes along. At some point before that STOP condition, there # will have been an ADDRESS READ or ADDRESS WRITE which contains the