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 qmk_firmware-525be99ee938aa6e48448d7dd6ea6e6fe50bb36d.zip |
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 @@ | |||
1 | #define MIDI_TONE_KEYCODE_OCTAVES 2 | ||
2 | |||
3 | #include "process_midi.h" | 1 | #include "process_midi.h" |
2 | |||
3 | #if defined(MIDI_ENABLE) && defined(MIDI_ADVANCED) | ||
4 | |||
4 | #include "timer.h" | 5 | #include "timer.h" |
5 | 6 | ||
6 | static uint8_t tone_status[MIDI_TONE_COUNT]; | 7 | static uint8_t tone_status[MIDI_TONE_COUNT]; |
@@ -161,7 +162,7 @@ bool process_midi(uint16_t keycode, keyrecord_t *record) | |||
161 | dprintf("midi channel %d\n", midi_config.channel); | 162 | dprintf("midi channel %d\n", midi_config.channel); |
162 | } | 163 | } |
163 | return false; | 164 | return false; |
164 | case MI_OFF: | 165 | case MI_ALLOFF: |
165 | if (record->event.pressed) { | 166 | if (record->event.pressed) { |
166 | midi_send_cc(&midi_device, midi_config.channel, 0x7B, 0); | 167 | midi_send_cc(&midi_device, midi_config.channel, 0x7B, 0); |
167 | dprintf("midi off\n"); | 168 | dprintf("midi off\n"); |
@@ -209,3 +210,5 @@ bool process_midi(uint16_t keycode, keyrecord_t *record) | |||
209 | 210 | ||
210 | return true; | 211 | return true; |
211 | } | 212 | } |
213 | |||
214 | #endif // MIDI_ADVANCED | ||