X-Git-Url: https://sigrok.org/gitweb/?p=libsigrokdecode.git;a=blobdiff_plain;f=decoders%2Fi2cfilter%2Fpd.py;h=f1ac6a40211c9f4a3e2ababc63737a4b6975e7f6;hp=09c12f1f69182fd9af3f6cc547db50a61136f85b;hb=12851357e784b893e24880efc6cd22a0cbcc64ce;hpb=c515eed7ef7a04a42b5b34abd308e08d6942835e diff --git a/decoders/i2cfilter/pd.py b/decoders/i2cfilter/pd.py index 09c12f1..f1ac6a4 100644 --- a/decoders/i2cfilter/pd.py +++ b/decoders/i2cfilter/pd.py @@ -23,7 +23,7 @@ import sigrokdecode as srd class Decoder(srd.Decoder): - api_version = 1 + api_version = 2 id = 'i2cfilter' name = 'I²C filter' longname = 'I²C filter' @@ -31,13 +31,12 @@ class Decoder(srd.Decoder): license = 'gplv3+' inputs = ['i2c'] 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'] - } - annotations = [] + 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')} + ) def __init__(self, **kwargs): self.state = None