From 1b75abfdd3e00ef590c9d1905863f6f2cb5a8632 Mon Sep 17 00:00:00 2001 From: Bert Vermeulen Date: Tue, 28 Feb 2012 14:33:45 +0100 Subject: srd: I2C: change format to have ACK/NACK bits as separate events --- decoders/i2cfilter/i2cfilter.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'decoders/i2cfilter') 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. -- cgit v1.2.3-70-g09d2