]> sigrok.org Git - libsigrokdecode.git/commitdiff
jtag: Use list comprehensions.
authorUwe Hermann <redacted>
Wed, 19 Feb 2014 18:12:56 +0000 (19:12 +0100)
committerUwe Hermann <redacted>
Sun, 23 Feb 2014 17:58:16 +0000 (18:58 +0100)
decoders/jtag/pd.py

index 26ddbac5fd9a7152e6287b370a4962c321689aae..8eb81c08d2ea294317f293c2926d65e6b3157e52 100644 (file)
@@ -53,12 +53,6 @@ jtag_states = [
         'SHIFT-IR', 'EXIT1-IR', 'EXIT2-IR',
 ]
 
         'SHIFT-IR', 'EXIT1-IR', 'EXIT2-IR',
 ]
 
-def get_annotation_classes():
-    l = []
-    for s in jtag_states:
-        l.append([s.lower(), s])
-    return l
-
 class Decoder(srd.Decoder):
     api_version = 1
     id = 'jtag'
 class Decoder(srd.Decoder):
     api_version = 1
     id = 'jtag'
@@ -80,7 +74,7 @@ class Decoder(srd.Decoder):
         {'id': 'rtck', 'name': 'RTCK',  'desc': 'Return clock signal'},
     ]
     options = {}
         {'id': 'rtck', 'name': 'RTCK',  'desc': 'Return clock signal'},
     ]
     options = {}
-    annotations = get_annotation_classes()
+    annotations = [[s.lower(), s] for s in jtag_states]
 
     def __init__(self, **kwargs):
         # self.state = 'TEST-LOGIC-RESET'
 
     def __init__(self, **kwargs):
         # self.state = 'TEST-LOGIC-RESET'