X-Git-Url: https://sigrok.org/gitweb/?p=libsigrokdecode.git;a=blobdiff_plain;f=decoders%2Fi2cdemux%2Fpd.py;h=d28763b2f55a32c9a37b743da3cc997b2f7f6086;hp=12ebb88447097903d69b7dab6ad03b6634e125aa;hb=4539e9ca58966ce3c9cad4801b16c315e86ace01;hpb=c515eed7ef7a04a42b5b34abd308e08d6942835e diff --git a/decoders/i2cdemux/pd.py b/decoders/i2cdemux/pd.py index 12ebb88..d28763b 100644 --- a/decoders/i2cdemux/pd.py +++ b/decoders/i2cdemux/pd.py @@ -14,14 +14,13 @@ ## 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, write to the Free Software -## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +## along with this program; if not, see . ## import sigrokdecode as srd class Decoder(srd.Decoder): - api_version = 1 + api_version = 2 id = 'i2cdemux' name = 'I²C demux' longname = 'I²C demultiplexer' @@ -29,12 +28,8 @@ class Decoder(srd.Decoder): license = 'gplv2+' inputs = ['i2c'] outputs = [] # TODO: Only known at run-time. - probes = [] - optional_probes = [] - options = {} - annotations = [] - def __init__(self, **kwargs): + def __init__(self): self.packets = [] # Local cache of I²C packets self.slaves = [] # List of known slave addresses self.stream = -1 # Current output stream @@ -79,4 +74,3 @@ class Decoder(srd.Decoder): self.stream = -1 else: pass # Do nothing, only add the I²C packet to our cache. -