]> sigrok.org Git - libsigrokdecode.git/blobdiff - decoders/tlc5620/pd.py
avr_isp: Add more parts
[libsigrokdecode.git] / decoders / tlc5620 / pd.py
index af16ee5f3d17e8d8b90398332c2c31ef0fce6ad5..8ff30d760308043fa4dd15f3c92863bfec52d6e6 100644 (file)
@@ -18,6 +18,9 @@
 ##
 
 import sigrokdecode as srd
+from common.srdhelper import SrdIntEnum
+
+Pin = SrdIntEnum.from_str('Pin', 'CLK DATA LOAD LDAC')
 
 dacs = {
     0: 'DACA',
@@ -34,7 +37,7 @@ class Decoder(srd.Decoder):
     desc = 'Texas Instruments TLC5620 8-bit quad DAC.'
     license = 'gplv2+'
     inputs = ['logic']
-    outputs = ['tlc5620']
+    outputs = []
     tags = ['IC', 'Analog/digital']
     channels = (
         {'id': 'clk', 'name': 'CLK', 'desc': 'Serial interface clock'},
@@ -197,7 +200,7 @@ class Decoder(srd.Decoder):
             #   a) Falling edge on CLK, and/or
             #   b) Falling edge on LOAD, and/or
             #   b) Falling edge on LDAC
-            pins = self.wait([{0: 'f'}, {2: 'f'}, {3: 'f'}])
+            pins = self.wait([{Pin.CLK: 'f'}, {Pin.LOAD: 'f'}, {Pin.LDAC: 'f'}])
             self.ldac = pins[3]
 
             # Handle those conditions (one or more) that matched this time.