X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=decoders%2Fmxc6225xu%2Fpd.py;h=2f09488d2e2d5746e69139b1f84505e61f721291;hb=04ff49263b0a462250d2301e6d4d17db5904a8d3;hp=94dff2779d82eae8aa425739fb774fc261819a5a;hpb=9f2f42c064e8a7100cee13460a7a3638f468f56a;p=libsigrokdecode.git diff --git a/decoders/mxc6225xu/pd.py b/decoders/mxc6225xu/pd.py index 94dff27..2f09488 100644 --- a/decoders/mxc6225xu/pd.py +++ b/decoders/mxc6225xu/pd.py @@ -60,7 +60,7 @@ status = { } class Decoder(srd.Decoder): - api_version = 1 + api_version = 2 id = 'mxc6225xu' name = 'MXC6225XU' longname = 'MEMSIC MXC6225XU' @@ -68,20 +68,14 @@ class Decoder(srd.Decoder): license = 'gplv2+' inputs = ['i2c'] outputs = ['mxc6225xu'] - probes = [] - optional_probes = [ - {'id': 'int', 'name': 'INT', 'desc': 'DTOS interrupt output pin'}, - ] - options = {} - annotations = [ - ['text', 'Human-readable text'], - ] + annotations = ( + ('text', 'Human-readable text'), + ) def __init__(self, **kwargs): self.state = 'IDLE' def start(self): - # self.out_proto = self.register(srd.OUTPUT_PYTHON) self.out_ann = self.register(srd.OUTPUT_ANN) def putx(self, data): @@ -219,6 +213,3 @@ class Decoder(srd.Decoder): self.state = 'IDLE' else: pass # TODO? - else: - raise Exception('Invalid state: %s' % self.state) -