X-Git-Url: https://sigrok.org/gitweb/?p=libsigrokdecode.git;a=blobdiff_plain;f=decoders%2Fi2cdemux%2Fpd.py;h=3904643f4947c827727ec882a8037f412251f3a9;hp=bb47f230a66f0ec834a7381fb87ee4baaf3a5d81;hb=0169f19c53e195df2f96c4df731ad3214c59e20a;hpb=24c74fd30fb161837c5f8b01baf3c0fe2dfa4ed5 diff --git a/decoders/i2cdemux/pd.py b/decoders/i2cdemux/pd.py index bb47f23..3904643 100644 --- a/decoders/i2cdemux/pd.py +++ b/decoders/i2cdemux/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 Uwe Hermann ## @@ -42,12 +42,9 @@ class Decoder(srd.Decoder): self.stream = -1 # Current output stream self.streamcount = 0 # Number of created output streams - def start(self, metadata): + def start(self): self.out_proto = [] - 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 @@ -68,8 +65,8 @@ class Decoder(srd.Decoder): # We're never seen this slave, add a new stream. self.slaves.append(databyte) - self.out_proto.append(self.add(srd.OUTPUT_PROTO, - 'i2c-%s' % hex(databyte))) + self.out_proto.append(self.register(srd.OUTPUT_PYTHON, + proto_id='i2c-%s' % hex(databyte))) self.stream = self.streamcount self.streamcount += 1 elif cmd == 'STOP':