]> sigrok.org Git - libsigrokdecode.git/blobdiff - decoders/i2c/pd.py
configure.ac: explicitly require pkg-config related macro
[libsigrokdecode.git] / decoders / i2c / pd.py
index 0e7f769e16f16eda276de9809f01fe43106b3983..b633397f563f6ae5b34327d1738b5c15fe65a026 100644 (file)
@@ -18,7 +18,6 @@
 ##
 
 # TODO: Look into arbitration, collision detection, clock synchronisation, etc.
-# TODO: Implement support for 10bit slave addresses.
 # TODO: Implement support for inverting SDA/SCL levels (0->1 and 1->0).
 # TODO: Implement support for detecting various bus errors.
 
@@ -108,6 +107,9 @@ class Decoder(srd.Decoder):
     )
 
     def __init__(self):
+        self.reset()
+
+    def reset(self):
         self.samplerate = None
         self.ss = self.es = self.ss_byte = -1
         self.bitcount = 0
@@ -253,8 +255,6 @@ class Decoder(srd.Decoder):
         if not self.samplerate:
             raise SamplerateError('Cannot decode without samplerate.')
 
-        self.wait({})
-
         while True:
             # State machine.
             if self.state == 'FIND START':