diff options
author | Gabriel Young <gabeplaysdrums@live.com> | 2017-02-25 15:02:43 -0800 |
---|---|---|
committer | Gabriel Young <gabeplaysdrums@live.com> | 2017-02-25 15:02:43 -0800 |
commit | 525be99ee938aa6e48448d7dd6ea6e6fe50bb36d (patch) | |
tree | 8842033e455e5a2546894d03b701ae8fe2f565a7 /quantum/process_keycode/process_midi.c | |
parent | 64eecfc5303788bd82bf2fb466ec4a6f1bd0c028 (diff) | |
download | qmk_firmware-525be99ee938aa6e48448d7dd6ea6e6fe50bb36d.tar.gz |
Split MIDI functionality into MIDI_BASIC and MIDI_ADVANCED
MIDI_ENABLE = no
text data bss dec hex filename
0 17080 0 17080 42b8 satan_midi.hex
MIDI_ENABLE = yes
MIDI_BASIC undefined
MIDI_ADVANCED undefined
text data bss dec hex filename
0 19494 0 19494 4c26 satan_midi.hex
MIDI_ENABLE = yes
#define MIDI_BASIC
MIDI_ADVANCED undefined
text data bss dec hex filename
0 19788 0 19788 4d4c satan_midi.hex
MIDI_ENABLE = yes
MIDI_BASIC undefined
#define MIDI_ADVANCED
text data bss dec hex filename
0 20846 0 20846 516e satan_midi.hex
MIDI_ENABLE = yes
#define MIDI_BASIC
#define MIDI_ADVANCED
text data bss dec hex filename
0 21140 0 21140 5294 satan_midi.hex
Diffstat (limited to 'quantum/process_keycode/process_midi.c')
-rw-r--r-- | quantum/process_keycode/process_midi.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/quantum/process_keycode/process_midi.c b/quantum/process_keycode/process_midi.c index 5530ea97c..161f04a24 100644 --- a/quantum/process_keycode/process_midi.c +++ b/quantum/process_keycode/process_midi.c @@ -1,6 +1,7 @@ -#define MIDI_TONE_KEYCODE_OCTAVES 2 - #include "process_midi.h" + +#if defined(MIDI_ENABLE) && defined(MIDI_ADVANCED) + #include "timer.h" static uint8_t tone_status[MIDI_TONE_COUNT]; @@ -161,7 +162,7 @@ bool process_midi(uint16_t keycode, keyrecord_t *record) dprintf("midi channel %d\n", midi_config.channel); } return false; - case MI_OFF: + case MI_ALLOFF: if (record->event.pressed) { midi_send_cc(&midi_device, midi_config.channel, 0x7B, 0); dprintf("midi off\n"); @@ -209,3 +210,5 @@ bool process_midi(uint16_t keycode, keyrecord_t *record) return true; } + +#endif // MIDI_ADVANCED |