summaryrefslogtreecommitdiff
path: root/decoders/tlc5620
diff options
context:
space:
mode:
authorUwe Hermann <uwe@hermann-uwe.de>2020-01-10 21:31:24 +0100
committerUwe Hermann <uwe@hermann-uwe.de>2020-01-10 21:48:18 +0100
commit32eae3386b49b6d03c6f424517d21b0c64ce9b35 (patch)
treef30988318f619b36f05ec1be6a46cc094e12cd63 /decoders/tlc5620
parentcd4a074dcfa09713de7a0ae6259d9a18eab3582f (diff)
downloadlibsigrokdecode-32eae3386b49b6d03c6f424517d21b0c64ce9b35.tar.gz
libsigrokdecode-32eae3386b49b6d03c6f424517d21b0c64ce9b35.zip
tlc5620: Use SrdIntEnum for pins.
Diffstat (limited to 'decoders/tlc5620')
-rw-r--r--decoders/tlc5620/pd.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/decoders/tlc5620/pd.py b/decoders/tlc5620/pd.py
index 4d02792..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',
@@ -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.