diff options
author | Uwe Hermann <uwe@hermann-uwe.de> | 2012-01-12 22:49:41 +0100 |
---|---|---|
committer | Uwe Hermann <uwe@hermann-uwe.de> | 2012-01-12 22:49:41 +0100 |
commit | 2b9837d9fc5f9b4eca52327527e18db4bfb730ff (patch) | |
tree | 7be1a6c40202b1cd1c88afc8d588b354765f7559 /decoders/ddc.py | |
parent | 9a12a6e7af3d7091d8e35dd1c731402cb80a01b0 (diff) | |
download | libsigrokdecode-2b9837d9fc5f9b4eca52327527e18db4bfb730ff.tar.gz libsigrokdecode-2b9837d9fc5f9b4eca52327527e18db4bfb730ff.zip |
srd: decoders: Rename obsolete timeoffset/duration.
Diffstat (limited to 'decoders/ddc.py')
-rw-r--r-- | decoders/ddc.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/decoders/ddc.py b/decoders/ddc.py index cdeae6d..9b5bc5f 100644 --- a/decoders/ddc.py +++ b/decoders/ddc.py @@ -52,9 +52,9 @@ class Decoder(srd.Decoder): def start(self, metadata): self.out_ann = self.add(srd.OUTPUT_ANN, 'ddc') - def decode(self, start_sample, end_sample, i2c_data): + def decode(self, ss, es, data): try: - cmd, data, ack_bit = i2c_data + cmd, data, ack_bit = data except Exception as e: raise Exception('malformed I2C input: %s' % str(e)) from e @@ -74,6 +74,5 @@ class Decoder(srd.Decoder): if cmd == 'DATA_READ': # There shouldn't be anything but data reads on this # address, so ignore everything else. - self.put(start_sample, end_sample, self.out_ann, - [0, ['0x%.2x' % data]]) + self.put(ss, es, self.out_ann, [0, ['0x%.2x' % data]]) |