diff options
author | Gabriel Young <gabeplaysdrums@live.com> | 2017-02-18 03:12:13 -0800 |
---|---|---|
committer | Gabriel Young <gabeplaysdrums@live.com> | 2017-02-19 16:41:59 -0800 |
commit | e405ab4bc6ff47d189d99c4d51aadf60a642d82a (patch) | |
tree | 60d81499162c5a8a6d5e479f2acb2bba7dfe3392 /tmk_core/protocol/lufa | |
parent | 5ae1411fc387a682d3e22f5cddfe1102e3312af5 (diff) | |
download | qmk_firmware-e405ab4bc6ff47d189d99c4d51aadf60a642d82a.tar.gz qmk_firmware-e405ab4bc6ff47d189d99c4d51aadf60a642d82a.zip |
initial implementation of polyphony using variable length array of notes on
Diffstat (limited to 'tmk_core/protocol/lufa')
-rw-r--r-- | tmk_core/protocol/lufa/lufa.c | 13 | ||||
-rw-r--r-- | tmk_core/protocol/lufa/lufa.h | 2 |
2 files changed, 10 insertions, 5 deletions
diff --git a/tmk_core/protocol/lufa/lufa.c b/tmk_core/protocol/lufa/lufa.c index ba49284c9b..fb60658df7 100644 --- a/tmk_core/protocol/lufa/lufa.c +++ b/tmk_core/protocol/lufa/lufa.c @@ -1101,16 +1101,21 @@ void cc_callback(MidiDevice * device, uint8_t chan, uint8_t num, uint8_t val); void sysex_callback(MidiDevice * device, uint16_t start, uint8_t length, uint8_t * data); + +void setup_midi(void) +{ + midi_init(); + midi_device_init(&midi_device); + midi_device_set_send_func(&midi_device, usb_send_func); + midi_device_set_pre_input_process_func(&midi_device, usb_get_midi); +} #endif int main(void) __attribute__ ((weak)); int main(void) { - #ifdef MIDI_ENABLE - midi_device_init(&midi_device); - midi_device_set_send_func(&midi_device, usb_send_func); - midi_device_set_pre_input_process_func(&midi_device, usb_get_midi); + setup_midi(); #endif setup_mcu(); diff --git a/tmk_core/protocol/lufa/lufa.h b/tmk_core/protocol/lufa/lufa.h index a049fd43c9..a515737862 100644 --- a/tmk_core/protocol/lufa/lufa.h +++ b/tmk_core/protocol/lufa/lufa.h @@ -49,7 +49,7 @@ #include <LUFA/Drivers/USB/USB.h> #include "host.h" #ifdef MIDI_ENABLE - #include "midi.h" + #include "process_midi.h" #endif #ifdef __cplusplus extern "C" { |