diff options
Diffstat (limited to 'protocol/lufa/descriptor.h')
| -rw-r--r-- | protocol/lufa/descriptor.h | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/protocol/lufa/descriptor.h b/protocol/lufa/descriptor.h index 44f20d5a2..9ee1c04d7 100644 --- a/protocol/lufa/descriptor.h +++ b/protocol/lufa/descriptor.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Copyright 2012 Jun Wako <wakojun@gmail.com> | 2 | * Copyright 2012,2013 Jun Wako <wakojun@gmail.com> |
| 3 | * This file is based on: | 3 | * This file is based on: |
| 4 | * LUFA-120219/Demos/Device/Lowlevel/KeyboardMouse | 4 | * LUFA-120219/Demos/Device/Lowlevel/KeyboardMouse |
| 5 | * LUFA-120219/Demos/Device/Lowlevel/GenericHID | 5 | * LUFA-120219/Demos/Device/Lowlevel/GenericHID |
| @@ -78,6 +78,13 @@ typedef struct | |||
| 78 | USB_Descriptor_Endpoint_t Console_INEndpoint; | 78 | USB_Descriptor_Endpoint_t Console_INEndpoint; |
| 79 | USB_Descriptor_Endpoint_t Console_OUTEndpoint; | 79 | USB_Descriptor_Endpoint_t Console_OUTEndpoint; |
| 80 | #endif | 80 | #endif |
| 81 | |||
| 82 | #ifdef NKRO_ENABLE | ||
| 83 | // NKRO HID Interface | ||
| 84 | USB_Descriptor_Interface_t NKRO_Interface; | ||
| 85 | USB_HID_Descriptor_HID_t NKRO_HID; | ||
| 86 | USB_Descriptor_Endpoint_t NKRO_INEndpoint; | ||
| 87 | #endif | ||
| 81 | } USB_Descriptor_Configuration_t; | 88 | } USB_Descriptor_Configuration_t; |
| 82 | 89 | ||
| 83 | 90 | ||
| @@ -102,9 +109,15 @@ typedef struct | |||
| 102 | # define CONSOLE_INTERFACE EXTRAKEY_INTERFACE | 109 | # define CONSOLE_INTERFACE EXTRAKEY_INTERFACE |
| 103 | #endif | 110 | #endif |
| 104 | 111 | ||
| 112 | #ifdef NKRO_ENABLE | ||
| 113 | # define NKRO_INTERFACE (CONSOLE_INTERFACE + 1) | ||
| 114 | #else | ||
| 115 | # define NKRO_INTERFACE CONSOLE_INTERFACE | ||
| 116 | #endif | ||
| 117 | |||
| 105 | 118 | ||
| 106 | /* nubmer of interfaces */ | 119 | /* nubmer of interfaces */ |
| 107 | #define TOTAL_INTERFACES (CONSOLE_INTERFACE + 1) | 120 | #define TOTAL_INTERFACES (NKRO_INTERFACE + 1) |
| 108 | 121 | ||
| 109 | 122 | ||
| 110 | // Endopoint number and size | 123 | // Endopoint number and size |
| @@ -125,6 +138,12 @@ typedef struct | |||
| 125 | #ifdef CONSOLE_ENABLE | 138 | #ifdef CONSOLE_ENABLE |
| 126 | # define CONSOLE_IN_EPNUM (EXTRAKEY_IN_EPNUM + 1) | 139 | # define CONSOLE_IN_EPNUM (EXTRAKEY_IN_EPNUM + 1) |
| 127 | # define CONSOLE_OUT_EPNUM (EXTRAKEY_IN_EPNUM + 2) | 140 | # define CONSOLE_OUT_EPNUM (EXTRAKEY_IN_EPNUM + 2) |
| 141 | #else | ||
| 142 | # define CONSOLE_OUT_EPNUM EXTRAKEY_IN_EPNUM | ||
| 143 | #endif | ||
| 144 | |||
| 145 | #ifdef NKRO_ENABLE | ||
| 146 | # define NKRO_IN_EPNUM (CONSOLE_OUT_EPNUM + 1) | ||
| 128 | #endif | 147 | #endif |
| 129 | 148 | ||
| 130 | 149 | ||
| @@ -132,6 +151,7 @@ typedef struct | |||
| 132 | #define MOUSE_EPSIZE 8 | 151 | #define MOUSE_EPSIZE 8 |
| 133 | #define EXTRAKEY_EPSIZE 8 | 152 | #define EXTRAKEY_EPSIZE 8 |
| 134 | #define CONSOLE_EPSIZE 32 | 153 | #define CONSOLE_EPSIZE 32 |
| 154 | #define NKRO_EPSIZE 16 | ||
| 135 | 155 | ||
| 136 | 156 | ||
| 137 | uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, | 157 | uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, |
