aboutsummaryrefslogtreecommitdiff
path: root/protocol/lufa/descriptor.h
diff options
context:
space:
mode:
Diffstat (limited to 'protocol/lufa/descriptor.h')
-rw-r--r--protocol/lufa/descriptor.h29
1 files changed, 23 insertions, 6 deletions
diff --git a/protocol/lufa/descriptor.h b/protocol/lufa/descriptor.h
index 6b1b4d484..19bce999f 100644
--- a/protocol/lufa/descriptor.h
+++ b/protocol/lufa/descriptor.h
@@ -51,9 +51,11 @@ typedef struct
51 USB_Descriptor_Endpoint_t Keyboard_INEndpoint; 51 USB_Descriptor_Endpoint_t Keyboard_INEndpoint;
52 52
53 // Mouse HID Interface 53 // Mouse HID Interface
54#ifdef MOUSE_ENABLE
54 USB_Descriptor_Interface_t Mouse_Interface; 55 USB_Descriptor_Interface_t Mouse_Interface;
55 USB_HID_Descriptor_HID_t Mouse_HID; 56 USB_HID_Descriptor_HID_t Mouse_HID;
56 USB_Descriptor_Endpoint_t Mouse_INEndpoint; 57 USB_Descriptor_Endpoint_t Mouse_INEndpoint;
58#endif
57 59
58 // Console HID Interface 60 // Console HID Interface
59 USB_Descriptor_Interface_t Console_Interface; 61 USB_Descriptor_Interface_t Console_Interface;
@@ -62,20 +64,35 @@ typedef struct
62 USB_Descriptor_Endpoint_t Console_OUTEndpoint; 64 USB_Descriptor_Endpoint_t Console_OUTEndpoint;
63 65
64 // Extra HID Interface 66 // Extra HID Interface
67#ifdef EXTRAKEY_ENABLE
65 USB_Descriptor_Interface_t Extra_Interface; 68 USB_Descriptor_Interface_t Extra_Interface;
66 USB_HID_Descriptor_HID_t Extra_HID; 69 USB_HID_Descriptor_HID_t Extra_HID;
67 USB_Descriptor_Endpoint_t Extra_INEndpoint; 70 USB_Descriptor_Endpoint_t Extra_INEndpoint;
71#endif
68} USB_Descriptor_Configuration_t; 72} USB_Descriptor_Configuration_t;
69 73
70 74
71/* nubmer of interfaces */
72#define TOTAL_INTERFACES 4
73
74/* index of interface */ 75/* index of interface */
75#define KEYBOARD_INTERFACE 0 76#define KEYBOARD_INTERFACE 0
76#define MOUSE_INTERFACE 1 77
77#define CONSOLE_INTERFACE 2 78#ifdef MOUSE_ENABLE
78#define EXTRA_INTERFACE 3 79# define MOUSE_INTERFACE (KEYBOARD_INTERFACE + 1)
80#else
81# define MOUSE_INTERFACE KEYBOARD_INTERFACE
82#endif
83
84#ifdef EXTRAKEY_ENABLE
85# define EXTRA_INTERFACE (MOUSE_INTERFACE + 1)
86#else
87# define EXTRA_INTERFACE MOUSE_INTERFACE
88#endif
89
90#define CONSOLE_INTERFACE (EXTRA_INTERFACE + 1)
91
92
93/* nubmer of interfaces */
94#define TOTAL_INTERFACES (CONSOLE_INTERFACE + 1)
95
79 96
80// Endopoint number and size 97// Endopoint number and size
81#define KEYBOARD_IN_EPNUM 1 98#define KEYBOARD_IN_EPNUM 1