X-Git-Url: https://sigrok.org/gitweb/?p=libsigrokdecode.git;a=blobdiff_plain;f=decoders%2Fmidi%2Fpd.py;h=ae35e1231ee2d6c1413efa2df6001beceb15d731;hp=52c06a81487ad942e0903fb110f07859a7072a99;hb=6cbba91f23b9f9ace75b4722c9c0776b9211008d;hpb=f8a6ae167cf134d0f2dc2c94165f2824a3eb75fe diff --git a/decoders/midi/pd.py b/decoders/midi/pd.py index 52c06a8..ae35e12 100644 --- a/decoders/midi/pd.py +++ b/decoders/midi/pd.py @@ -1,7 +1,8 @@ ## ## This file is part of the libsigrokdecode project. ## -## Copyright (C) 2013 Uwe Hermann +## Copyright (C) 2013-2016 Uwe Hermann +## Copyright (C) 2016 Chris Dreher ## ## 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 @@ -14,8 +15,7 @@ ## 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 @@ -25,14 +25,15 @@ RX = 0 TX = 1 class Decoder(srd.Decoder): - api_version = 2 + api_version = 3 id = 'midi' name = 'MIDI' longname = 'Musical Instrument Digital Interface' desc = 'Musical Instrument Digital Interface (MIDI) protocol.' license = 'gplv2+' inputs = ['uart'] - outputs = ['midi'] + outputs = [] + tags = ['Audio', 'PC'] annotations = ( ('text-verbose', 'Human-readable text (verbose)'), ('text-sysreal-verbose', 'Human-readable SysReal text (verbose)'), @@ -44,6 +45,9 @@ class Decoder(srd.Decoder): ) def __init__(self): + self.reset() + + def reset(self): self.state = 'IDLE' self.status_byte = 0 self.explicit_status_byte = False