Doc & formatting.
This commit is contained in:
parent
deb2d27ee8
commit
b2800e5fdd
24
src/MIDI.h
24
src/MIDI.h
|
|
@ -93,7 +93,6 @@ private:
|
||||||
|
|
||||||
#endif // MIDI_BUILD_OUTPUT
|
#endif // MIDI_BUILD_OUTPUT
|
||||||
|
|
||||||
|
|
||||||
// -------------------------------------------------------------------------
|
// -------------------------------------------------------------------------
|
||||||
// MIDI Input
|
// MIDI Input
|
||||||
|
|
||||||
|
|
@ -126,14 +125,12 @@ private:
|
||||||
void resetInput();
|
void resetInput();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
StatusByte mRunningStatus_RX;
|
StatusByte mRunningStatus_RX;
|
||||||
Channel mInputChannel;
|
Channel mInputChannel;
|
||||||
|
byte mPendingMessage[3];
|
||||||
byte mPendingMessage[3]; // SysEx are dumped into mMessage directly.
|
unsigned mPendingMessageExpectedLenght;
|
||||||
unsigned mPendingMessageExpectedLenght;
|
unsigned mPendingMessageIndex;
|
||||||
unsigned mPendingMessageIndex; // Extended to unsigned for larger SysEx payloads.
|
Message mMessage;
|
||||||
Message mMessage;
|
|
||||||
|
|
||||||
|
|
||||||
// -------------------------------------------------------------------------
|
// -------------------------------------------------------------------------
|
||||||
// Input Callbacks
|
// Input Callbacks
|
||||||
|
|
@ -163,7 +160,6 @@ public:
|
||||||
inline void disconnectCallbackFromType(MidiType inType);
|
inline void disconnectCallbackFromType(MidiType inType);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
void launchCallback();
|
void launchCallback();
|
||||||
|
|
||||||
void (*mNoteOffCallback)(byte channel, byte note, byte velocity);
|
void (*mNoteOffCallback)(byte channel, byte note, byte velocity);
|
||||||
|
|
@ -186,10 +182,8 @@ private:
|
||||||
void (*mSystemResetCallback)(void);
|
void (*mSystemResetCallback)(void);
|
||||||
|
|
||||||
#endif // MIDI_USE_CALLBACKS
|
#endif // MIDI_USE_CALLBACKS
|
||||||
|
|
||||||
#endif // MIDI_BUILD_INPUT
|
#endif // MIDI_BUILD_INPUT
|
||||||
|
|
||||||
|
|
||||||
// -------------------------------------------------------------------------
|
// -------------------------------------------------------------------------
|
||||||
// MIDI Soft Thru
|
// MIDI Soft Thru
|
||||||
|
|
||||||
|
|
@ -215,11 +209,9 @@ private:
|
||||||
|
|
||||||
|
|
||||||
#if MIDI_USE_RUNNING_STATUS
|
#if MIDI_USE_RUNNING_STATUS
|
||||||
|
|
||||||
private:
|
private:
|
||||||
StatusByte mRunningStatus_TX;
|
StatusByte mRunningStatus_TX;
|
||||||
|
#endif
|
||||||
#endif // MIDI_USE_RUNNING_STATUS
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
SerialPort& mSerial;
|
SerialPort& mSerial;
|
||||||
|
|
@ -236,7 +228,7 @@ END_MIDI_NAMESPACE
|
||||||
|
|
||||||
#if MIDI_AUTO_INSTANCIATE && defined(ARDUINO)
|
#if MIDI_AUTO_INSTANCIATE && defined(ARDUINO)
|
||||||
extern MIDI_NAMESPACE::MidiInterface<MIDI_DEFAULT_SERIAL_CLASS> MIDI;
|
extern MIDI_NAMESPACE::MidiInterface<MIDI_DEFAULT_SERIAL_CLASS> MIDI;
|
||||||
#endif // MIDI_AUTO_INSTANCIATE
|
#endif
|
||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@
|
||||||
|
|
||||||
BEGIN_MIDI_NAMESPACE
|
BEGIN_MIDI_NAMESPACE
|
||||||
|
|
||||||
/*! \brief Constructor for MidiInterface. */
|
/// \brief Constructor for MidiInterface.
|
||||||
template<class SerialPort>
|
template<class SerialPort>
|
||||||
MidiInterface<SerialPort>::MidiInterface(SerialPort& inSerial)
|
MidiInterface<SerialPort>::MidiInterface(SerialPort& inSerial)
|
||||||
: mSerial(inSerial)
|
: mSerial(inSerial)
|
||||||
|
|
|
||||||
|
|
@ -34,8 +34,6 @@
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
|
|
||||||
// Create a MIDI object automatically on the port defined with MIDI_SERIAL_PORT.
|
// Create a MIDI object automatically on the port defined with MIDI_SERIAL_PORT.
|
||||||
// You can turn this off by adding #define MIDI_AUTO_INSTANCIATE 0 just before
|
|
||||||
// including <MIDI.h> in your sketch.
|
|
||||||
#ifndef MIDI_AUTO_INSTANCIATE
|
#ifndef MIDI_AUTO_INSTANCIATE
|
||||||
# ifdef ARDUINO
|
# ifdef ARDUINO
|
||||||
# define MIDI_AUTO_INSTANCIATE 1
|
# define MIDI_AUTO_INSTANCIATE 1
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue