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 | |
| 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')
| -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 ba49284c9..fb60658df 100644 --- a/tmk_core/protocol/lufa/lufa.c +++ b/tmk_core/protocol/lufa/lufa.c | |||
| @@ -1101,16 +1101,21 @@ void cc_callback(MidiDevice * device, | |||
| 1101 | uint8_t chan, uint8_t num, uint8_t val); | 1101 | uint8_t chan, uint8_t num, uint8_t val); |
| 1102 | void sysex_callback(MidiDevice * device, | 1102 | void sysex_callback(MidiDevice * device, |
| 1103 | uint16_t start, uint8_t length, uint8_t * data); | 1103 | uint16_t start, uint8_t length, uint8_t * data); |
| 1104 | |||
| 1105 | void setup_midi(void) | ||
| 1106 | { | ||
| 1107 | midi_init(); | ||
| 1108 | midi_device_init(&midi_device); | ||
| 1109 | midi_device_set_send_func(&midi_device, usb_send_func); | ||
| 1110 | midi_device_set_pre_input_process_func(&midi_device, usb_get_midi); | ||
| 1111 | } | ||
| 1104 | #endif | 1112 | #endif |
| 1105 | 1113 | ||
| 1106 | int main(void) __attribute__ ((weak)); | 1114 | int main(void) __attribute__ ((weak)); |
| 1107 | int main(void) | 1115 | int main(void) |
| 1108 | { | 1116 | { |
| 1109 | |||
| 1110 | #ifdef MIDI_ENABLE | 1117 | #ifdef MIDI_ENABLE |
| 1111 | midi_device_init(&midi_device); | 1118 | setup_midi(); |
| 1112 | midi_device_set_send_func(&midi_device, usb_send_func); | ||
| 1113 | midi_device_set_pre_input_process_func(&midi_device, usb_get_midi); | ||
| 1114 | #endif | 1119 | #endif |
| 1115 | 1120 | ||
| 1116 | setup_mcu(); | 1121 | setup_mcu(); |
diff --git a/tmk_core/protocol/lufa/lufa.h b/tmk_core/protocol/lufa/lufa.h index a049fd43c..a51573786 100644 --- a/tmk_core/protocol/lufa/lufa.h +++ b/tmk_core/protocol/lufa/lufa.h | |||
| @@ -49,7 +49,7 @@ | |||
| 49 | #include <LUFA/Drivers/USB/USB.h> | 49 | #include <LUFA/Drivers/USB/USB.h> |
| 50 | #include "host.h" | 50 | #include "host.h" |
| 51 | #ifdef MIDI_ENABLE | 51 | #ifdef MIDI_ENABLE |
| 52 | #include "midi.h" | 52 | #include "process_midi.h" |
| 53 | #endif | 53 | #endif |
| 54 | #ifdef __cplusplus | 54 | #ifdef __cplusplus |
| 55 | extern "C" { | 55 | extern "C" { |
