X-Git-Url: http://sigrok.org/gitweb/?p=libsigrokdecode.git;a=blobdiff_plain;f=decoders%2Ftlc5620%2Fpd.py;h=2a407d1687cc288a15349544a94107af5f1518fe;hp=6fe8ae10d651c836a83b9dd13e4424a51307a902;hb=HEAD;hpb=10aeb8ea8b183394cebc0033f048f49f4262b57d diff --git a/decoders/tlc5620/pd.py b/decoders/tlc5620/pd.py index 6fe8ae1..8ff30d7 100644 --- a/decoders/tlc5620/pd.py +++ b/decoders/tlc5620/pd.py @@ -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,8 @@ 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'}, {'id': 'data', 'name': 'DATA', 'desc': 'Serial interface data'}, @@ -196,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.