From cda23c754e4d16438e2b42d86b4ce9a1eadc03d7 Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Mon, 24 Aug 2015 19:31:12 -0400 Subject: midi working --- protocol/lufa/descriptor.h | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) (limited to 'protocol/lufa/descriptor.h') diff --git a/protocol/lufa/descriptor.h b/protocol/lufa/descriptor.h index 0471ef31de..4fd81a0e87 100644 --- a/protocol/lufa/descriptor.h +++ b/protocol/lufa/descriptor.h @@ -135,14 +135,14 @@ typedef struct #endif #ifdef MIDI_ENABLE -# define MIDI_INTERFACE (NKRO_INTERFACE + 1) -# define MIDI2_INTERFACE (NKRO_INTERFACE + 2) +# define AC_INTERFACE (NKRO_INTERFACE + 1) +# define AS_INTERFACE (NKRO_INTERFACE + 2) #else -# define MIDI2_INTERFACE NKRO_INTERFACE +# define AS_INTERFACE NKRO_INTERFACE #endif /* nubmer of interfaces */ -#define TOTAL_INTERFACES MIDI2_INTERFACE + 1 +#define TOTAL_INTERFACES AS_INTERFACE + 1 // Endopoint number and size @@ -170,20 +170,23 @@ typedef struct #ifdef NKRO_ENABLE # define NKRO_IN_EPNUM (CONSOLE_OUT_EPNUM + 1) -# if defined(__AVR_ATmega32U2__) && NKRO_IN_EPNUM > 4 -# error "Endpoints are not available enough to support all functions. Remove some in Makefile.(MOUSEKEY, EXTRAKEY, CONSOLE, NKRO)" -# endif +#else +# define NKRO_IN_EPNUM CONSOLE_OUT_EPNUM #endif #ifdef MIDI_ENABLE -# define MIDI_STREAM_IN_EPNUM (NKRO_IN_EPNUM + 1) -# define MIDI_STREAM_OUT_EPNUM (NKRO_IN_EPNUM + 1) -#else -# define MIDI_STREAM_IN_EPNUM NKRO_IN_EPNUM -# define MIDI_STREAM_OUT_EPNUM NKRO_IN_EPNUM +# define MIDI_STREAM_IN_EPNUM (NKRO_IN_EPNUM + 1) +// # define MIDI_STREAM_OUT_EPNUM (NKRO_IN_EPNUM + 1) +# define MIDI_STREAM_OUT_EPNUM (NKRO_IN_EPNUM + 2) +# define MIDI_STREAM_IN_EPADDR (ENDPOINT_DIR_IN | MIDI_STREAM_IN_EPNUM) +# define MIDI_STREAM_OUT_EPADDR (ENDPOINT_DIR_OUT | MIDI_STREAM_OUT_EPNUM) #endif +#if defined(__AVR_ATmega32U2__) && MIDI_STREAM_OUT_EPADDR > 4 +# error "Endpoints are not available enough to support all functions. Remove some in Makefile.(MOUSEKEY, EXTRAKEY, CONSOLE, NKRO, MIDI)" +#endif + #define KEYBOARD_EPSIZE 8 #define MOUSE_EPSIZE 8 #define EXTRAKEY_EPSIZE 8 -- cgit v1.2.3