]> git.friedersdorff.com Git - max/tmk_keyboard.git/blobdiff - keyboard/lufa/descriptor.h
Add consumer/system control feature to LUFA.
[max/tmk_keyboard.git] / keyboard / lufa / descriptor.h
index 19e24c2013ddc91c44792a3de120b236c8120de4..6b1b4d48451a34dca0e03787d884f6f9b3c0a6db 100644 (file)
@@ -46,36 +46,48 @@ typedef struct
     USB_Descriptor_Configuration_Header_t Config;
 
     // Keyboard HID Interface
-    USB_Descriptor_Interface_t            HID0_KeyboardInterface;
-    USB_HID_Descriptor_HID_t              HID0_KeyboardHID;
-    USB_Descriptor_Endpoint_t             HID0_ReportINEndpoint;
+    USB_Descriptor_Interface_t            Keyboard_Interface;
+    USB_HID_Descriptor_HID_t              Keyboard_HID;
+    USB_Descriptor_Endpoint_t             Keyboard_INEndpoint;
 
     // Mouse HID Interface
-    USB_Descriptor_Interface_t            HID1_MouseInterface;
-    USB_HID_Descriptor_HID_t              HID1_MouseHID;
-    USB_Descriptor_Endpoint_t             HID1_ReportINEndpoint;
-
-    // Generic HID Interface
-    USB_Descriptor_Interface_t            HID2_GenericInterface;
-    USB_HID_Descriptor_HID_t              HID2_GenericHID;
-    USB_Descriptor_Endpoint_t             HID2_ReportINEndpoint;
-    USB_Descriptor_Endpoint_t             HID2_ReportOUTEndpoint;
+    USB_Descriptor_Interface_t            Mouse_Interface;
+    USB_HID_Descriptor_HID_t              Mouse_HID;
+    USB_Descriptor_Endpoint_t             Mouse_INEndpoint;
+
+    // Console HID Interface
+    USB_Descriptor_Interface_t            Console_Interface;
+    USB_HID_Descriptor_HID_t              Console_HID;
+    USB_Descriptor_Endpoint_t             Console_INEndpoint;
+    USB_Descriptor_Endpoint_t             Console_OUTEndpoint;
+
+    // Extra HID Interface
+    USB_Descriptor_Interface_t            Extra_Interface;
+    USB_HID_Descriptor_HID_t              Extra_HID;
+    USB_Descriptor_Endpoint_t             Extra_INEndpoint;
 } USB_Descriptor_Configuration_t;
 
 
+/* nubmer of interfaces */
+#define TOTAL_INTERFACES            4
+
+/* index of interface */
 #define KEYBOARD_INTERFACE          0
 #define MOUSE_INTERFACE             1
-#define GENERIC_INTERFACE           2
+#define CONSOLE_INTERFACE           2
+#define EXTRA_INTERFACE             3
 
-// Endopoint number/size
+// Endopoint number and size
 #define KEYBOARD_IN_EPNUM           1
 #define MOUSE_IN_EPNUM              2
-#define GENERIC_IN_EPNUM            3
-#define GENERIC_OUT_EPNUM           4
-
-#define HID_EPSIZE                  8
-#define GENERIC_EPSIZE              8
-#define GENERIC_REPORT_SIZE         8
+#define CONSOLE_IN_EPNUM            3
+#define CONSOLE_OUT_EPNUM           4
+#define EXTRA_IN_EPNUM              5
+
+#define KEYBOARD_EPSIZE             8
+#define MOUSE_EPSIZE                8
+#define CONSOLE_EPSIZE              8
+#define EXTRA_EPSIZE                8
 
 
 uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,