]> sigrok.org Git - libsigrokdecode.git/blobdiff - decoders/ds1307/pd.py
All PDs: Bump api_version to 2.
[libsigrokdecode.git] / decoders / ds1307 / pd.py
index 01aaf6bc46a371e601d11f059978e6dd2e6f673f..68943d475e006c4f38f363006416b433f6ee591e 100644 (file)
@@ -19,8 +19,6 @@
 ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
 ##
 
-# Dallas DS1307 RTC protocol decoder
-
 import sigrokdecode as srd
 
 days_of_week = [
@@ -38,7 +36,7 @@ def bcd2int(b):
     return (b & 0x0f) + ((b >> 4) * 10)
 
 class Decoder(srd.Decoder):
-    api_version = 1
+    api_version = 2
     id = 'ds1307'
     name = 'DS1307'
     longname = 'Dallas DS1307'
@@ -46,12 +44,9 @@ class Decoder(srd.Decoder):
     license = 'gplv2+'
     inputs = ['i2c']
     outputs = ['ds1307']
-    probes = []
-    optional_probes = []
-    options = {}
-    annotations = [
-        ['Text', 'Human-readable text'],
-    ]
+    annotations = (
+        ('text', 'Human-readable text'),
+    )
 
     def __init__(self, **kwargs):
         self.state = 'IDLE'