]> git.donarmstrong.com Git - qmk_firmware.git/blobdiff - tmk_core/protocol/lufa/lufa.h
fixed two typos
[qmk_firmware.git] / tmk_core / protocol / lufa / lufa.h
index b11854101d4e35dc95294106a02f182923724256..a515737862df0f7c429c6e1a9d3a08354de75d86 100644 (file)
@@ -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