X-Git-Url: https://sigrok.org/gitweb/?p=libsigrokdecode.git;a=blobdiff_plain;f=decoders%2Fi2cfilter%2F__init__.py;fp=decoders%2Fi2cfilter%2F__init__.py;h=6c5f1ec0e2bfe8d211b97066caf177cad40c6148;hp=0000000000000000000000000000000000000000;hb=61c2bd366eba64b50009c604c382c547f6cfdd88;hpb=12b5e28ecccaaff12a4339867b5bbcd533b1e1fc diff --git a/decoders/i2cfilter/__init__.py b/decoders/i2cfilter/__init__.py new file mode 100644 index 0000000..6c5f1ec --- /dev/null +++ b/decoders/i2cfilter/__init__.py @@ -0,0 +1,36 @@ +## +## This file is part of the sigrok project. +## +## Copyright (C) 2012 Bert Vermeulen +## +## This program is free software; you can redistribute it and/or modify +## it under the terms of the GNU General Public License as published by +## the Free Software Foundation; either version 3 of the License, or +## (at your option) any later version. +## +## This program is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with this program; if not, see . +## + +''' +Takes input from the I2C protocol decoder and filters out traffic from/to +a single address on the I2C bus. + +It then outputs the filtered data one byte at a time as OUTPUT_PROTO up the +protocol decoder stack. No annotations are output. + +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'. + +Both of these are optional; if no options are specified the entire payload +of the I2C session will be output. +''' + +from .i2cfilter import * +