]> sigrok.org Git - libsigrokdecode.git/blobdiff - decoders/z80/pd.py
Probes, optional probes and annotations now take a tuple.
[libsigrokdecode.git] / decoders / z80 / pd.py
index 130b147de718711c737bf00c744a30f5836855c7..f07b76c931e6ad6ed28ca9d1d64b496ae9115ff8 100644 (file)
@@ -72,32 +72,36 @@ class Decoder(srd.Decoder):
     license  = 'gplv2+'
     inputs   = ['logic']
     outputs  = ['z80']
     license  = 'gplv2+'
     inputs   = ['logic']
     outputs  = ['z80']
-    probes = [
-        {'id': 'd%d' % i, 'name': 'D%d' % i, 'desc': 'Data bus line %d' % i}
-            for i in range(8)
-    ] + [
+    probes = tuple({
+            'id': 'd%d' % i,
+            'name': 'D%d' % i,
+            'desc': 'Data bus line %d' % i
+            } for i in range(8)
+    ) + (
         {'id': 'm1', 'name': '/M1', 'desc': 'Machine cycle 1'},
         {'id': 'rd', 'name': '/RD', 'desc': 'Memory or I/O read'},
         {'id': 'wr', 'name': '/WR', 'desc': 'Memory or I/O write'},
         {'id': 'm1', 'name': '/M1', 'desc': 'Machine cycle 1'},
         {'id': 'rd', 'name': '/RD', 'desc': 'Memory or I/O read'},
         {'id': 'wr', 'name': '/WR', 'desc': 'Memory or I/O write'},
-    ]
-    optional_probes = [
+    )
+    optional_probes = (
         {'id': 'mreq', 'name': '/MREQ', 'desc': 'Memory request'},
         {'id': 'iorq', 'name': '/IORQ', 'desc': 'I/O request'},
         {'id': 'mreq', 'name': '/MREQ', 'desc': 'Memory request'},
         {'id': 'iorq', 'name': '/IORQ', 'desc': 'I/O request'},
-    ] + [
-        {'id': 'a%d' % i, 'name': 'A%d' % i, 'desc': 'Address bus line %d' % i}
-            for i in range(16)
-    ]
-    annotations = [
-        ['addr',  'Memory or I/O address'],
-        ['memrd', 'Byte read from memory'],
-        ['memwr', 'Byte written to memory'],
-        ['iord',  'Byte read from I/O port'],
-        ['iowr',  'Byte written to I/O port'],
-        ['instr', 'Z80 CPU instruction'],
-        ['rop',   'Value of input operand'],
-        ['wop',   'Value of output operand'],
-        ['warn',  'Warning message'],
-    ]
+    ) + tuple({
+        'id': 'a%d' % i,
+        'name': 'A%d' % i,
+        'desc': 'Address bus line %d' % i
+        } for i in range(16)
+    )
+    annotations = (
+        ('addr',  'Memory or I/O address'),
+        ('memrd', 'Byte read from memory'),
+        ('memwr', 'Byte written to memory'),
+        ('iord',  'Byte read from I/O port'),
+        ('iowr',  'Byte written to I/O port'),
+        ('instr', 'Z80 CPU instruction'),
+        ('rop',   'Value of input operand'),
+        ('wop',   'Value of output operand'),
+        ('warn',  'Warning message'),
+    )
     annotation_rows = (
         ('addrbus', 'Address bus', (Ann.ADDR,)),
         ('databus', 'Data bus', (Ann.MEMRD, Ann.MEMWR, Ann.IORD, Ann.IOWR)),
     annotation_rows = (
         ('addrbus', 'Address bus', (Ann.ADDR,)),
         ('databus', 'Data bus', (Ann.MEMRD, Ann.MEMWR, Ann.IORD, Ann.IOWR)),