X-Git-Url: https://sigrok.org/gitweb/?p=libsigrokdecode.git;a=blobdiff_plain;f=decoders%2Fi2cfilter%2F__init__.py;h=9a0b256756941c91d62427cfd8a27ffcbbf59505;hp=6c5f1ec0e2bfe8d211b97066caf177cad40c6148;hb=24c74fd30fb161837c5f8b01baf3c0fe2dfa4ed5;hpb=61c2bd366eba64b50009c604c382c547f6cfdd88 diff --git a/decoders/i2cfilter/__init__.py b/decoders/i2cfilter/__init__.py index 6c5f1ec..9a0b256 100644 --- a/decoders/i2cfilter/__init__.py +++ b/decoders/i2cfilter/__init__.py @@ -18,19 +18,21 @@ ## ''' -Takes input from the I2C protocol decoder and filters out traffic from/to -a single address on the I2C bus. +Generic I2C filtering protocol decoder. -It then outputs the filtered data one byte at a time as OUTPUT_PROTO up the -protocol decoder stack. No annotations are output. +Takes input from the I2C protocol decoder and removes all traffic +except that from/to the specified slave address and/or direction. -The I2C address to filter out should be passed in as an option 'address', as -an integer. A specific read or write operation can be selected with the -'direction' option, which should be 'read' or 'write'. +It then outputs the filtered data again as OUTPUT_PROTO of type/format 'i2c' +(up the protocol decoder stack). No annotations are output. + +The I2C slave address to filter out should be passed in as an option +'address', as an integer. A specific read or write operation can be selected +with the 'direction' option, which should be 'read', 'write', or 'both'. Both of these are optional; if no options are specified the entire payload of the I2C session will be output. ''' -from .i2cfilter import * +from .pd import *