diff options
Diffstat (limited to 'decoders')
-rw-r--r-- | decoders/i2c.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/decoders/i2c.py b/decoders/i2c.py index 16e7491..583c4d0 100644 --- a/decoders/i2c.py +++ b/decoders/i2c.py @@ -126,6 +126,8 @@ # 'signals': [{'SCL': }]} # +import sigrok + # States FIND_START = 0 FIND_ADDRESS = 1 @@ -142,7 +144,7 @@ def sampleiter(data, unitsize): for i in range(0, len(data), unitsize): yield(Sample(data[i:i+unitsize])) -class Decoder(): +class Decoder(sigrok.Decoder): id = 'i2c' name = 'I2C' longname = 'Inter-Integrated Circuit (I2C) bus' @@ -348,9 +350,6 @@ class Decoder(): self.oldsda = sda if out != []: - sigrok.put(out) - -import sigrok + self.put(out) -sigrok.register(Decoder) |