From 525be99ee938aa6e48448d7dd6ea6e6fe50bb36d Mon Sep 17 00:00:00 2001 From: Gabriel Young Date: Sat, 25 Feb 2017 15:02:43 -0800 Subject: 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 --- quantum/process_keycode/process_midi.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'quantum/process_keycode/process_midi.c') 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 -- cgit v1.2.3