summaryrefslogtreecommitdiff
path: root/tmk_core/protocol/lufa/lufa.c
diff options
context:
space:
mode:
authorGabriel Young <gabeplaysdrums@live.com>2017-02-18 03:12:13 -0800
committerGabriel Young <gabeplaysdrums@live.com>2017-02-19 16:41:59 -0800
commite405ab4bc6ff47d189d99c4d51aadf60a642d82a (patch)
tree60d81499162c5a8a6d5e479f2acb2bba7dfe3392 /tmk_core/protocol/lufa/lufa.c
parent5ae1411fc387a682d3e22f5cddfe1102e3312af5 (diff)
initial implementation of polyphony using variable length array of notes on
Diffstat (limited to 'tmk_core/protocol/lufa/lufa.c')
-rw-r--r--tmk_core/protocol/lufa/lufa.c13
1 files changed, 9 insertions, 4 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();