summaryrefslogtreecommitdiff
path: root/tmk_core/protocol/lufa/lufa.h
diff options
context:
space:
mode:
authorJosh Colbeck2017-02-21 20:31:16 -0600
committerJosh Colbeck2017-02-21 20:31:16 -0600
commite51001efcc3ff8b64f8264e8bd4c2dbea15f3364 (patch)
treebdf5a0a4b44d5e63ba1376b70d94f64c77f3c90c /tmk_core/protocol/lufa/lufa.h
parentc56693f858cb3409e4a68a8e65a1370c022a51ed (diff)
parent7ff41df32c29bca4e3a6efc3047b8fa93bb99b92 (diff)
Merge remote-tracking branch 'qmk/master'
Diffstat (limited to 'tmk_core/protocol/lufa/lufa.h')
-rw-r--r--tmk_core/protocol/lufa/lufa.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/tmk_core/protocol/lufa/lufa.h b/tmk_core/protocol/lufa/lufa.h
index aad08d640..a049fd43c 100644
--- a/tmk_core/protocol/lufa/lufa.h
+++ b/tmk_core/protocol/lufa/lufa.h
@@ -68,8 +68,19 @@ typedef struct {
} __attribute__ ((packed)) report_extra_t;
#ifdef MIDI_ENABLE
-void MIDI_Task(void);
-MidiDevice midi_device;
+ void MIDI_Task(void);
+ MidiDevice midi_device;
+#endif
+
+#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