X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;ds=sidebyside;f=tmk_core%2Fprotocol%2Flufa%2Flufa.h;h=a515737862df0f7c429c6e1a9d3a08354de75d86;hb=a729d852fe502d62e09bab1a31f49b738f8892e4;hp=195123c0f974f55a534ce716769e4358c0129554;hpb=f1f2066657f4a0998adc016c95d7e541b436e09f;p=qmk_firmware.git diff --git a/tmk_core/protocol/lufa/lufa.h b/tmk_core/protocol/lufa/lufa.h index 195123c0f..a51573786 100644 --- a/tmk_core/protocol/lufa/lufa.h +++ b/tmk_core/protocol/lufa/lufa.h @@ -48,8 +48,9 @@ #include #include #include "host.h" - - +#ifdef MIDI_ENABLE + #include "process_midi.h" +#endif #ifdef __cplusplus extern "C" { #endif @@ -66,15 +67,30 @@ typedef struct { uint16_t usage; } __attribute__ ((packed)) report_extra_t; +#ifdef MIDI_ENABLE + void MIDI_Task(void); + MidiDevice midi_device; +#endif -#if LUFA_VERSION_INTEGER < 0x120730 - /* old API 120219 */ - #define ENDPOINT_CONFIG(epnum, eptype, epdir, epsize, epbank) Endpoint_ConfigureEndpoint(epnum, eptype, epdir, epsize, epbank) -#else +#ifdef API_ENABLE + #include "api.h" +#endif + +#ifdef API_SYSEX_ENABLE + #include "api_sysex.h" + // Allocate space for encoding overhead. + //The header and terminator are not stored to save a few bytes of precious ram + #define MIDI_SYSEX_BUFFER (API_SYSEX_MAX_SIZE + API_SYSEX_MAX_SIZE / 7 + (API_SYSEX_MAX_SIZE % 7 ? 1 : 0)) +#endif + +// #if LUFA_VERSION_INTEGER < 0x120730 +// /* old API 120219 */ +// #define ENDPOINT_CONFIG(epnum, eptype, epdir, epsize, epbank) Endpoint_ConfigureEndpoint(epnum, eptype, epdir, epsize, epbank) +// #else /* new API >= 120730 */ #define ENDPOINT_BANK_SINGLE 1 #define ENDPOINT_BANK_DOUBLE 2 #define ENDPOINT_CONFIG(epnum, eptype, epdir, epsize, epbank) Endpoint_ConfigureEndpoint((epdir) | (epnum) , eptype, epsize, epbank) -#endif +// #endif #endif