summaryrefslogtreecommitdiff
path: root/decoders/ddc.py
diff options
context:
space:
mode:
authorUwe Hermann <uwe@hermann-uwe.de>2012-01-12 22:49:41 +0100
committerUwe Hermann <uwe@hermann-uwe.de>2012-01-12 22:49:41 +0100
commit2b9837d9fc5f9b4eca52327527e18db4bfb730ff (patch)
tree7be1a6c40202b1cd1c88afc8d588b354765f7559 /decoders/ddc.py
parent9a12a6e7af3d7091d8e35dd1c731402cb80a01b0 (diff)
downloadlibsigrokdecode-2b9837d9fc5f9b4eca52327527e18db4bfb730ff.tar.gz
libsigrokdecode-2b9837d9fc5f9b4eca52327527e18db4bfb730ff.zip
srd: decoders: Rename obsolete timeoffset/duration.
Diffstat (limited to 'decoders/ddc.py')
-rw-r--r--decoders/ddc.py7
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]])