diff options
author | Christian Pointner <equinox@helsinki.at> | 2014-11-05 00:16:27 (GMT) |
---|---|---|
committer | Christian Pointner <equinox@helsinki.at> | 2014-11-05 00:16:27 (GMT) |
commit | 18cd594a03bf8f10c481868daf8cd1969d33a02e (patch) | |
tree | 859a6359f7cd418da1e26b09d6f4680cc9a4901a | |
parent | f3244ebe20b56ebbd512e037bb80c7867941f931 (diff) |
added reset midi command
-rw-r--r-- | software/rhmixxx/rhmixxx.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/software/rhmixxx/rhmixxx.c b/software/rhmixxx/rhmixxx.c index 0394721..2fef9d1 100644 --- a/software/rhmixxx/rhmixxx.c +++ b/software/rhmixxx/rhmixxx.c @@ -77,6 +77,7 @@ void EVENT_USB_Device_ControlRequest(void) #include "analog.h"
#define MIDI_COMMAND_CONTROL_CHANGE 0xB0
+#define MIDI_COMMAND_PROGRAM_CHANGE 0xC0
static void process_incoming_midi(void)
{
@@ -85,6 +86,12 @@ static void process_incoming_midi(void) uint8_t cmd = ReceivedMIDIEvent.Data1 & 0xF0;
uint8_t note = ReceivedMIDIEvent.Data2;
uint8_t value = ReceivedMIDIEvent.Data3 & 0x7F;
+ if(cmd == MIDI_COMMAND_PROGRAM_CHANGE) {
+ switch(note) {
+ case 127: reset2bootloader();
+ }
+ continue;
+ }
if((note >= KEYPAD_MIDI_NOTE_OFFSET && note < KEYPAD_MIDI_NOTE_OFFSET + KEYPAD_NUM_KEYS) || // KEYPAD
note == KEYPAD_MIDI_NOTE_ALL) {
if(cmd == MIDI_COMMAND_NOTE_ON) {
|