]> sigrok.org Git - libsigrokdecode.git/blobdiff - decoders/i2cfilter/pd.py
Change PD options to be a tuple of dictionaries.
[libsigrokdecode.git] / decoders / i2cfilter / pd.py
index 09c12f1f69182fd9af3f6cc547db50a61136f85b..91269c0862b186b7dc07c6960a328d84b355aab1 100644 (file)
@@ -33,10 +33,12 @@ class Decoder(srd.Decoder):
     outputs = ['i2c']
     probes = []
     optional_probes = []
-    options = {
-        'address': ['Address to filter out of the I²C stream', 0],
-        'direction': ['Direction to filter (read/write/both)', 'both']
-    }
+    options = (
+        {'id': 'address', 'desc': 'Address to filter out of the I²C stream',
+            'default': 0},
+        {'id': 'direction', 'desc': 'Direction to filter', 'default': 'both',
+            'values': ('read', 'write', 'both')}
+    )
     annotations = []
 
     def __init__(self, **kwargs):