aboutsummaryrefslogtreecommitdiffstats
path: root/protocol/lufa/descriptor.h
diff options
context:
space:
mode:
authorJack Humbert <jack.humb@gmail.com>2015-08-21 10:46:53 -0400
committerJack Humbert <jack.humb@gmail.com>2015-08-21 10:46:53 -0400
commit04885a3b447c82437d919d467328800eb00af629 (patch)
treeaf1603f20b8d28aee533ccaaed7992ce29619a94 /protocol/lufa/descriptor.h
parentfb4fe52c0a5be527e6c9bfa006a5fb3ea79b4b0e (diff)
downloadfirmware-04885a3b447c82437d919d467328800eb00af629.tar.gz
firmware-04885a3b447c82437d919d467328800eb00af629.tar.bz2
firmware-04885a3b447c82437d919d467328800eb00af629.zip
preonic
Diffstat (limited to 'protocol/lufa/descriptor.h')
-rw-r--r--protocol/lufa/descriptor.h18
1 files changed, 15 insertions, 3 deletions
diff --git a/protocol/lufa/descriptor.h b/protocol/lufa/descriptor.h
index 58a7df440..44f4c8f4a 100644
--- a/protocol/lufa/descriptor.h
+++ b/protocol/lufa/descriptor.h
@@ -86,6 +86,7 @@ typedef struct
USB_Descriptor_Endpoint_t NKRO_INEndpoint;
#endif
+#ifdef MIDI_ENABLE
// MIDI Audio Control Interface
USB_Descriptor_Interface_t Audio_ControlInterface;
USB_Audio_Descriptor_Interface_AC_t Audio_ControlInterface_SPC;
@@ -101,6 +102,7 @@ typedef struct
USB_MIDI_Descriptor_Jack_Endpoint_t MIDI_In_Jack_Endpoint_SPC;
USB_Audio_Descriptor_StreamEndpoint_Std_t MIDI_Out_Jack_Endpoint;
USB_MIDI_Descriptor_Jack_Endpoint_t MIDI_Out_Jack_Endpoint_SPC;
+#endif
} USB_Descriptor_Configuration_t;
@@ -132,9 +134,14 @@ typedef struct
# define NKRO_INTERFACE CONSOLE_INTERFACE
#endif
+#ifdef MIDI_ENABLE
+# define MIDI_INTERFACE (NKRO_INTERFACE + 1)
+#else
+# define MIDI_INTERFACE NKRO_INTERFACE
+#endif
/* nubmer of interfaces */
-#define TOTAL_INTERFACES (NKRO_INTERFACE + 3)
+#define TOTAL_INTERFACES (MIDI_INTERFACE + 1)
// Endopoint number and size
@@ -167,8 +174,13 @@ typedef struct
# endif
#endif
-#define MIDI_STREAM_IN_EPNUM (NKRO_IN_EPNUM + 1)
-#define MIDI_STREAM_OUT_EPNUM (NKRO_IN_EPNUM + 1)
+#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
+#endif
#define KEYBOARD_EPSIZE 8