X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=decoders%2Fmidi%2Fpd.py;h=60bfd2ebc543de8e03baa124412d9391a0a80bf4;hb=cc75bd231ee4878c08fed6b352caaf340d84728e;hp=21c402477cc392cc3f55a3f1b9c6a77c1845a692;hpb=18101a318c4ed6ed3f6a32ef7e4867ed7be1ff2a;p=libsigrokdecode.git diff --git a/decoders/midi/pd.py b/decoders/midi/pd.py index 21c4024..60bfd2e 100644 --- a/decoders/midi/pd.py +++ b/decoders/midi/pd.py @@ -25,18 +25,19 @@ 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)'), - ('text-error', 'Human-readable Error text'), + ('text-verbose', 'Text (verbose)'), + ('text-sysreal-verbose', 'SysReal text (verbose)'), + ('text-error', 'Error text'), ) annotation_rows = ( ('normal', 'Normal', (0, 2)), @@ -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