summaryrefslogtreecommitdiff
path: root/decoders/i2cfilter
diff options
context:
space:
mode:
authorBert Vermeulen <bert@biot.com>2012-02-28 14:33:45 +0100
committerBert Vermeulen <bert@biot.com>2012-02-28 14:34:53 +0100
commit1b75abfdd3e00ef590c9d1905863f6f2cb5a8632 (patch)
tree025b2717965bfd449c7a6a2d2b1304882ea5abf3 /decoders/i2cfilter
parent5154cadf4a143f6157a54aa4d2097dffe78c0f29 (diff)
downloadlibsigrokdecode-1b75abfdd3e00ef590c9d1905863f6f2cb5a8632.tar.gz
libsigrokdecode-1b75abfdd3e00ef590c9d1905863f6f2cb5a8632.zip
srd: I2C: change format to have ACK/NACK bits as separate events
Diffstat (limited to 'decoders/i2cfilter')
-rw-r--r--decoders/i2cfilter/i2cfilter.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/decoders/i2cfilter/i2cfilter.py b/decoders/i2cfilter/i2cfilter.py
index 6c1f4c8..939e667 100644
--- a/decoders/i2cfilter/i2cfilter.py
+++ b/decoders/i2cfilter/i2cfilter.py
@@ -45,7 +45,7 @@ class Decoder(srd.Decoder):
def decode(self, ss, es, data):
try:
- cmd, data, ack_bit = data
+ cmd, data = data
except Exception as e:
raise Exception('Malformed I2C input: %s' % str(e)) from e
@@ -57,6 +57,9 @@ class Decoder(srd.Decoder):
if cmd == 'STOP':
self.state = None
return
+ if cmd in ('ACK', 'NACK'):
+ # Don't care, we just want data.
+ return
if self.state == 'start':
# Start of a transfer, see if we want this one.