]> sigrok.org Git - libsigrokdecode.git/blobdiff - decoders/sdcard_spi/pd.py
All PDs: Drop some unneeded comments.
[libsigrokdecode.git] / decoders / sdcard_spi / pd.py
index f92be0d550d31cfd4d1ed8c407c19201f82845cd..0850c305831e2c15e468901691d472b4ce568a4c 100644 (file)
@@ -69,11 +69,12 @@ cmd_name = {
     51: 'SEND_SCR',
 }
 
-def ann_cmd_list():
+def cmd_list():
     l = []
     for i in range(63 + 1):
-        l.append(['cmd%d' % i, 'CMD%d' % i])
-    return l
+        l.append(('cmd%d' % i, 'CMD%d' % i))
+
+    return tuple(l)
 
 class Decoder(srd.Decoder):
     api_version = 1
@@ -84,19 +85,16 @@ class Decoder(srd.Decoder):
     license = 'gplv2+'
     inputs = ['spi']
     outputs = ['sdcard_spi']
-    probes = []
-    optional_probes = []
-    options = {}
-    annotations = ann_cmd_list() + [
-        ['cmd-desc', 'Command description'],
-        ['r1', 'R1 reply'],
-        ['r1b', 'R1B reply'],
-        ['r2', 'R2 reply'],
-        ['r3', 'R3 reply'],
-        ['r7', 'R7 reply'],
-        ['bits', 'Bits'],
-        ['bit-warnings', 'Bit warnings'],
-    ]
+    annotations = cmd_list() + (
+        ('cmd-desc', 'Command description'),
+        ('r1', 'R1 reply'),
+        ('r1b', 'R1B reply'),
+        ('r2', 'R2 reply'),
+        ('r3', 'R3 reply'),
+        ('r7', 'R7 reply'),
+        ('bits', 'Bits'),
+        ('bit-warnings', 'Bit warnings'),
+    )
     annotation_rows = (
         ('bits', 'Bits', (70, 71)),
         ('cmd-reply', 'Commands/replies',
@@ -118,7 +116,6 @@ class Decoder(srd.Decoder):
         self.cmd_str = ''
 
     def start(self):
-        # self.out_python = self.register(srd.OUTPUT_PYTHON)
         self.out_ann = self.register(srd.OUTPUT_ANN)
 
     def putx(self, data):