summaryrefslogtreecommitdiff
path: root/tmk_core/protocol/lufa/lufa.h
diff options
context:
space:
mode:
authorcoderkun2017-04-01 10:56:29 +0200
committercoderkun2017-04-01 10:56:29 +0200
commit605c4129cc89e8fe647881108b0c9c79d4da1aea (patch)
tree9af55a60d567bd66b5c8572c04ab63b62abb5a02 /tmk_core/protocol/lufa/lufa.h
parentb0ade6dc9838d4112cbc3093ac3033aa81ef172d (diff)
parent3448d5d4874a2775f85320a2be69edd241575d46 (diff)
Merge branch 'master' into coderkun_neo2
Diffstat (limited to 'tmk_core/protocol/lufa/lufa.h')
-rw-r--r--tmk_core/protocol/lufa/lufa.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/tmk_core/protocol/lufa/lufa.h b/tmk_core/protocol/lufa/lufa.h
index b11854101..a51573786 100644
--- a/tmk_core/protocol/lufa/lufa.h
+++ b/tmk_core/protocol/lufa/lufa.h
@@ -49,7 +49,7 @@
#include <LUFA/Drivers/USB/USB.h>
#include "host.h"
#ifdef MIDI_ENABLE
- #include "midi.h"
+ #include "process_midi.h"
#endif
#ifdef __cplusplus
extern "C" {
@@ -70,7 +70,6 @@ typedef struct {
#ifdef MIDI_ENABLE
void MIDI_Task(void);
MidiDevice midi_device;
- #define MIDI_SYSEX_BUFFER 32
#endif
#ifdef API_ENABLE
@@ -79,6 +78,9 @@ typedef struct {
#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