summaryrefslogtreecommitdiff
path: root/tmk_core/protocol/lufa/lufa.h
diff options
context:
space:
mode:
authorDamien <Dbroqua@users.noreply.github.com>2017-01-07 08:45:19 -0600
committerGitHub <noreply@github.com>2017-01-07 08:45:19 -0600
commit0fb82c15a5c9a69e17cff8dcd04c652d21381958 (patch)
treedd7a441ad7d086bb7cb4b093bd8d0cbd4d39d69d /tmk_core/protocol/lufa/lufa.h
parentdb48b28eeb5ebe5252cc04495d5eb326fa62dc26 (diff)
parente7df488a92da56cf160ac64c8cc7302ab717e145 (diff)
Merge pull request #15 from jackhumbert/master
Merge from qmk
Diffstat (limited to 'tmk_core/protocol/lufa/lufa.h')
-rw-r--r--tmk_core/protocol/lufa/lufa.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/tmk_core/protocol/lufa/lufa.h b/tmk_core/protocol/lufa/lufa.h
index b11854101d..a049fd43c9 100644
--- a/tmk_core/protocol/lufa/lufa.h
+++ b/tmk_core/protocol/lufa/lufa.h
@@ -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