diff options
author | Jack Humbert <jack.humb@gmail.com> | 2016-12-30 11:05:50 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-12-30 11:05:50 -0500 |
commit | 2eced29675b50fbc695920fdceaa0e7521571b76 (patch) | |
tree | f26d870eb321fdc438518e8193d82bb958d1a07f /tmk_core/protocol/lufa/lufa.h | |
parent | 8a76075ca7bb2a8346053b8293e177853fe8e92f (diff) | |
parent | dd685eceb2045371d38f24d454f1ab08ca7416f4 (diff) |
Merge pull request #974 from fredizzimo/remove_malloc_from_sysex
API Sysex fixes
Diffstat (limited to 'tmk_core/protocol/lufa/lufa.h')
-rw-r--r-- | tmk_core/protocol/lufa/lufa.h | 4 |
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 |