diff options
Diffstat (limited to 'tmk_core/protocol/lufa/lufa.c')
| -rw-r--r-- | tmk_core/protocol/lufa/lufa.c | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/tmk_core/protocol/lufa/lufa.c b/tmk_core/protocol/lufa/lufa.c index 4cb23ebc8..60cba8d2a 100644 --- a/tmk_core/protocol/lufa/lufa.c +++ b/tmk_core/protocol/lufa/lufa.c | |||
| @@ -1096,16 +1096,23 @@ void cc_callback(MidiDevice * device, | |||
| 1096 | uint8_t chan, uint8_t num, uint8_t val); | 1096 | uint8_t chan, uint8_t num, uint8_t val); |
| 1097 | void sysex_callback(MidiDevice * device, | 1097 | void sysex_callback(MidiDevice * device, |
| 1098 | uint16_t start, uint8_t length, uint8_t * data); | 1098 | uint16_t start, uint8_t length, uint8_t * data); |
| 1099 | |||
| 1100 | void setup_midi(void) | ||
| 1101 | { | ||
| 1102 | #ifdef MIDI_ADVANCED | ||
| 1103 | midi_init(); | ||
| 1104 | #endif | ||
| 1105 | midi_device_init(&midi_device); | ||
| 1106 | midi_device_set_send_func(&midi_device, usb_send_func); | ||
| 1107 | midi_device_set_pre_input_process_func(&midi_device, usb_get_midi); | ||
| 1108 | } | ||
| 1099 | #endif | 1109 | #endif |
| 1100 | 1110 | ||
| 1101 | int main(void) __attribute__ ((weak)); | 1111 | int main(void) __attribute__ ((weak)); |
| 1102 | int main(void) | 1112 | int main(void) |
| 1103 | { | 1113 | { |
| 1104 | |||
| 1105 | #ifdef MIDI_ENABLE | 1114 | #ifdef MIDI_ENABLE |
| 1106 | midi_device_init(&midi_device); | 1115 | setup_midi(); |
| 1107 | midi_device_set_send_func(&midi_device, usb_send_func); | ||
| 1108 | midi_device_set_pre_input_process_func(&midi_device, usb_get_midi); | ||
| 1109 | #endif | 1116 | #endif |
| 1110 | 1117 | ||
| 1111 | setup_mcu(); | 1118 | setup_mcu(); |
| @@ -1170,7 +1177,9 @@ int main(void) | |||
| 1170 | 1177 | ||
| 1171 | #ifdef MIDI_ENABLE | 1178 | #ifdef MIDI_ENABLE |
| 1172 | midi_device_process(&midi_device); | 1179 | midi_device_process(&midi_device); |
| 1173 | // MIDI_Task(); | 1180 | #ifdef MIDI_ADVANCED |
| 1181 | midi_task(); | ||
| 1182 | #endif | ||
| 1174 | #endif | 1183 | #endif |
| 1175 | 1184 | ||
| 1176 | #if defined(RGBLIGHT_ANIMATIONS) & defined(RGBLIGHT_ENABLE) | 1185 | #if defined(RGBLIGHT_ANIMATIONS) & defined(RGBLIGHT_ENABLE) |
