]> sigrok.org Git - libsigrokdecode.git/blobdiff - decoders/rtc8564/rtc8564.py
srd: I2C: change format to have ACK/NACK bits as separate events
[libsigrokdecode.git] / decoders / rtc8564 / rtc8564.py
index 97b08087da2280c874dccee5fddec43b4e5658be..d2838e3d5c7df0abec66971cf9c7db082b84ce1c 100644 (file)
@@ -18,9 +18,7 @@
 ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
 ##
 
-#
-# Epson RTC-8564 JE/NB decoder
-#
+# Epson RTC-8564 JE/NB protocol decoder
 
 import sigrokdecode as srd
 
@@ -47,14 +45,14 @@ class Decoder(srd.Decoder):
     inputs = ['i2c']
     outputs = ['rtc8564']
     probes = []
-    extra_probes = [
+    optional_probes = [
         {'id': 'clkout', 'name': 'CLKOUT', 'desc': 'TODO.'},
         {'id': 'clkoe', 'name': 'CLKOE', 'desc': 'TODO.'},
         {'id': 'int', 'name': 'INT#', 'desc': 'TODO.'},
     ]
     options = {}
     annotations = [
-        ['TODO', 'TODO'], 
+        ['TODO', 'TODO'],
     ]
 
     def __init__(self, **kwargs):
@@ -156,7 +154,7 @@ class Decoder(srd.Decoder):
         pass
 
     def decode(self, ss, es, data):
-        cmd, databyte, ack = data
+        cmd, databyte = data
 
         # Store the start/end samples of this I2C packet.
         self.ss, self.es = ss, es
@@ -207,7 +205,7 @@ class Decoder(srd.Decoder):
                 self.state = READ_RTC_REGS2
                 return
             else:
-               pass # TODO
+                pass # TODO
         elif self.state == READ_RTC_REGS2:
             if cmd == 'DATA READ':
                 handle_reg = getattr(self, 'handle_reg_0x%02x' % self.reg)