X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=decoders%2Fmxc6225xu%2Fpd.py;h=46c6c09dc95e5e1871c00c254734d450f15c6248;hb=58e7e508ded52194ed06a23a48f169779f4c7708;hp=3ae6f8e998663789c670eb1b41b2e4282264fcc9;hpb=50bd5d259677faf87bb3408e111d0e833d7ba9b4;p=libsigrokdecode.git diff --git a/decoders/mxc6225xu/pd.py b/decoders/mxc6225xu/pd.py index 3ae6f8e..46c6c09 100644 --- a/decoders/mxc6225xu/pd.py +++ b/decoders/mxc6225xu/pd.py @@ -18,8 +18,6 @@ ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ## -# MEMSIC MXC6225XU protocol decoder - import sigrokdecode as srd # Definitions of various bits in MXC6225XU registers. @@ -76,18 +74,15 @@ class Decoder(srd.Decoder): ] options = {} annotations = [ - ['Text', 'Human-readable text'], + ['text', 'Human-readable text'], ] def __init__(self, **kwargs): self.state = 'IDLE' - def start(self, metadata): - # self.out_proto = self.add(srd.OUTPUT_PROTO, 'mxc6225xu') - self.out_ann = self.add(srd.OUTPUT_ANN, 'mxc6225xu') - - def report(self): - pass + def start(self): + # self.out_python = self.register(srd.OUTPUT_PYTHON) + self.out_ann = self.register(srd.OUTPUT_ANN) def putx(self, data): self.put(self.ss, self.es, self.out_ann, data) @@ -167,12 +162,12 @@ class Decoder(srd.Decoder): def decode(self, ss, es, data): cmd, databyte = data - # Store the start/end samples of this I2C packet. + # Store the start/end samples of this I²C packet. self.ss, self.es = ss, es # State machine. if self.state == 'IDLE': - # Wait for an I2C START condition. + # Wait for an I²C START condition. if cmd != 'START': return self.state = 'GET SLAVE ADDR'