X-Git-Url: https://sigrok.org/gitweb/?p=libsigrokdecode.git;a=blobdiff_plain;f=decoders%2Fmidi%2Fpd.py;h=60bfd2ebc543de8e03baa124412d9391a0a80bf4;hp=99b63b09c441d997c6569d6acf884f2ac3f641ed;hb=e144452bcdd5f2abbe6b6f3da41ad64f67e39def;hpb=4539e9ca58966ce3c9cad4801b16c315e86ace01 diff --git a/decoders/midi/pd.py b/decoders/midi/pd.py index 99b63b0..60bfd2e 100644 --- a/decoders/midi/pd.py +++ b/decoders/midi/pd.py @@ -2,7 +2,7 @@ ## This file is part of the libsigrokdecode project. ## ## Copyright (C) 2013-2016 Uwe Hermann -## Copyright (C) 2016 Chris Dreher +## 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 @@ -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