1 /**************************************************************************/
2 /*                                                                        */
3 /*       Copyright (c) Microsoft Corporation. All rights reserved.        */
4 /*                                                                        */
5 /*       This software is licensed under the Microsoft Software License   */
6 /*       Terms for Microsoft Azure RTOS. Full text of the license can be  */
7 /*       found in the LICENSE file at https://aka.ms/AzureRTOS_EULA       */
8 /*       and in the root directory of this software.                      */
9 /*                                                                        */
10 /**************************************************************************/
11 
12 
13 /**************************************************************************/
14 /**************************************************************************/
15 /**                                                                       */
16 /** USBX Component                                                        */
17 /**                                                                       */
18 /**   HID Class                                                           */
19 /**                                                                       */
20 /**************************************************************************/
21 /**************************************************************************/
22 
23 
24 /**************************************************************************/
25 /*                                                                        */
26 /*  COMPONENT DEFINITION                                   RELEASE        */
27 /*                                                                        */
28 /*    ux_host_class_hid.h                                 PORTABLE C      */
29 /*                                                           6.1.10       */
30 /*  AUTHOR                                                                */
31 /*                                                                        */
32 /*    Chaoqiong Xiao, Microsoft Corporation                               */
33 /*                                                                        */
34 /*  DESCRIPTION                                                           */
35 /*                                                                        */
36 /*    This file contains all the header and extern functions used by the  */
37 /*    USBX HID class.                                                     */
38 /*                                                                        */
39 /*  RELEASE HISTORY                                                       */
40 /*                                                                        */
41 /*    DATE              NAME                      DESCRIPTION             */
42 /*                                                                        */
43 /*  05-19-2020     Chaoqiong Xiao           Initial Version 6.0           */
44 /*  09-30-2020     Chaoqiong Xiao           Modified comment(s),          */
45 /*                                            used UX prefix to refer to  */
46 /*                                            TX symbols instead of using */
47 /*                                            them directly, fixed struct */
48 /*                                            field definition issues,    */
49 /*                                            resulting in version 6.1    */
50 /*  08-02-2021     Wen Wang                 Modified comment(s),          */
51 /*                                            added extern "C" keyword    */
52 /*                                            for compatibility with C++, */
53 /*                                            resulting in version 6.1.8  */
54 /*  01-31-2022     Xiuwen Cai, CQ Xiao      Modified comment(s),          */
55 /*                                            added interrupt OUT support,*/
56 /*                                            added standalone mode,      */
57 /*                                            resulting in version 6.1.10 */
58 /*                                                                        */
59 /**************************************************************************/
60 
61 #ifndef UX_HOST_CLASS_HID_H
62 #define UX_HOST_CLASS_HID_H
63 
64 /* Determine if a C++ compiler is being used.  If so, ensure that standard
65    C is used to process the API information.  */
66 
67 #ifdef   __cplusplus
68 
69 /* Yes, C++ compiler is present.  Use standard C.  */
70 extern   "C" {
71 
72 #endif
73 
74 
75 /* Define HID Class constants.  */
76 
77 #define UX_HOST_CLASS_HID_CLASS                                 3
78 #define UX_HOST_CLASS_HID_FIELDS                                16
79 #define UX_HOST_CLASS_HID_MAX_COLLECTION                        4
80 #define UX_HOST_CLASS_HID_MAX_REPORT                            8
81 #define UX_HOST_CLASS_HID_REPORT_SIZE                           32
82 #define UX_HOST_CLASS_HID_DESCRIPTOR                            0x21
83 #define UX_HOST_CLASS_HID_ITEM_LENGTH_MASK                      3
84 #define UX_HOST_CLASS_HID_ITEM_TAG_MASK                         0xf0
85 #define UX_HOST_CLASS_HID_ITEM_TAG_SHORT                        1
86 #define UX_HOST_CLASS_HID_ITEM_TAG_LONG                         0xf0
87 #define UX_HOST_CLASS_HID_MAX_CLIENTS                           8
88 #define UX_HOST_CLASS_HID_MAX_CLIENT_NAME_LENGTH                63 /* Exclude string null-terminator */
89 
90 #ifndef UX_HOST_CLASS_HID_DECOMPRESSION_BUFFER
91 #define UX_HOST_CLASS_HID_DECOMPRESSION_BUFFER                  4096
92 #endif
93 #define UX_HOST_CLASS_HID_REPORT_DECOMPRESSED                   0
94 #define UX_HOST_CLASS_HID_REPORT_RAW                            1
95 #define UX_HOST_CLASS_HID_REPORT_INDIVIDUAL_USAGE               2
96 #define UX_HOST_CLASS_HID_INTERRUPT_ENDPOINT_READY              1
97 #define UX_HOST_CLASS_HID_INTERRUPT_ENDPOINT_ACTIVE             2
98 
99 
100 /* Define HID Class item types.  */
101 
102 #define UX_HOST_CLASS_HID_TYPE_MAIN                             0x0
103 #define UX_HOST_CLASS_HID_TYPE_GLOBAL                           0x1
104 #define UX_HOST_CLASS_HID_TYPE_LOCAL                            0x2
105 #define UX_HOST_CLASS_HID_TYPE_RESERVED                         0x3
106 
107 
108 /* Define HID Class main tags.  */
109 
110 #define UX_HOST_CLASS_HID_MAIN_TAG_INPUT                        0x8
111 #define UX_HOST_CLASS_HID_MAIN_TAG_OUTPUT                       0x9
112 #define UX_HOST_CLASS_HID_MAIN_TAG_FEATURE                      0xb
113 #define UX_HOST_CLASS_HID_MAIN_TAG_COLLECTION                   0xa
114 #define UX_HOST_CLASS_HID_MAIN_TAG_END_COLLECTION               0xc
115 
116 
117 /* Define HID Class global tags.  */
118 
119 #define UX_HOST_CLASS_HID_GLOBAL_TAG_USAGE_PAGE                 0x0
120 #define UX_HOST_CLASS_HID_GLOBAL_TAG_LOGICAL_MINIMUM            0x1
121 #define UX_HOST_CLASS_HID_GLOBAL_TAG_LOGICAL_MAXIMUM            0x2
122 #define UX_HOST_CLASS_HID_GLOBAL_TAG_PHYSICAL_MINIMUM           0x3
123 #define UX_HOST_CLASS_HID_GLOBAL_TAG_PHYSICAL_MAXIMUM           0x4
124 #define UX_HOST_CLASS_HID_GLOBAL_TAG_UNIT_EXPONENT              0x5
125 #define UX_HOST_CLASS_HID_GLOBAL_TAG_UNIT                       0x6
126 #define UX_HOST_CLASS_HID_GLOBAL_TAG_REPORT_SIZE                0x7
127 #define UX_HOST_CLASS_HID_GLOBAL_TAG_REPORT_ID                  0x8
128 #define UX_HOST_CLASS_HID_GLOBAL_TAG_REPORT_COUNT               0x9
129 #define UX_HOST_CLASS_HID_GLOBAL_TAG_PUSH                       0xa
130 #define UX_HOST_CLASS_HID_GLOBAL_TAG_POP                        0xb
131 
132 
133 /* Define HID Class local tags.  */
134 
135 #define UX_HOST_CLASS_HID_LOCAL_TAG_USAGE                       0x0
136 #define UX_HOST_CLASS_HID_LOCAL_TAG_USAGE_MINIMUM               0x1
137 #define UX_HOST_CLASS_HID_LOCAL_TAG_USAGE_MAXIMUM               0x2
138 #define UX_HOST_CLASS_HID_LOCAL_TAG_DESIGNATOR_INDEX            0x3
139 #define UX_HOST_CLASS_HID_LOCAL_TAG_DESIGNATOR_MINIMUM          0x4
140 #define UX_HOST_CLASS_HID_LOCAL_TAG_DESIGNATOR_MAXIMUM          0x5
141 #define UX_HOST_CLASS_HID_LOCAL_TAG_STRING_INDEX                0x7
142 #define UX_HOST_CLASS_HID_LOCAL_TAG_STRING_MINIMUM              0x8
143 #define UX_HOST_CLASS_HID_LOCAL_TAG_STRING_MAXIMUM              0x9
144 #define UX_HOST_CLASS_HID_LOCAL_TAG_DELIMITER                   0xa
145 
146 
147 /* Define HID Class collection item types.  */
148 
149 #define UX_HOST_CLASS_HID_COLLECTION_PHYSICAL                   0
150 #define UX_HOST_CLASS_HID_COLLECTION_APPLICATION                1
151 #define UX_HOST_CLASS_HID_COLLECTION_LOGICAL                    2
152 
153 
154 /* Define HID Class delimiter set.  */
155 
156 #define UX_HOST_CLASS_HID_DELIMITER_OPEN                        1
157 #define UX_HOST_CLASS_HID_DELIMITER_CLOSE                       0
158 
159 
160 /* Define HID Class item bit masks.  */
161 
162 #define UX_HOST_CLASS_HID_ITEM_CONSTANT                         0x0001
163 #define UX_HOST_CLASS_HID_ITEM_VARIABLE                         0x0002
164 #define UX_HOST_CLASS_HID_ITEM_RELATIVE                         0x0004
165 #define UX_HOST_CLASS_HID_ITEM_WRAP                             0x0008
166 #define UX_HOST_CLASS_HID_ITEM_NON_LINEAR                       0x0010
167 #define UX_HOST_CLASS_HID_ITEM_NO_PREFERRED_STATE               0x0020
168 #define UX_HOST_CLASS_HID_ITEM_NULL_STATE                       0x0040
169 #define UX_HOST_CLASS_HID_ITEM_VOLATILE                         0x0080
170 #define UX_HOST_CLASS_HID_ITEM_BUFFERED_BYTES                   0x0100
171 
172 
173 /* Define HID Class commands.  */
174 
175 #define UX_HOST_CLASS_HID_GET_REPORT                            0x01
176 #define UX_HOST_CLASS_HID_GET_IDLE                              0x02
177 #define UX_HOST_CLASS_HID_GET_PROTOCOL                          0x03
178 #define UX_HOST_CLASS_HID_SET_REPORT                            0x09
179 #define UX_HOST_CLASS_HID_SET_IDLE                              0x0A
180 #define UX_HOST_CLASS_HID_SET_PROTOCOL                          0x0B
181 
182 
183 /* Define HID Class descriptors.  */
184 
185 #define UX_HOST_CLASS_HID_DESCRIPTOR                            0x21
186 #define UX_HOST_CLASS_HID_REPORT_DESCRIPTOR                     0x22
187 #define UX_HOST_CLASS_HID_PHYSICAL_DESCRIPTOR                   0x23
188 
189 
190 #define UX_HID_DESCRIPTOR_ENTRIES                               7
191 #define UX_HID_DESCRIPTOR_LENGTH                                9
192 
193 
194 /* Define HID Class page constants.  */
195 
196 #define UX_HOST_CLASS_HID_PAGE_GENERIC_DESKTOP_CONTROLS         0x01
197 #define UX_HOST_CLASS_HID_PAGE_SIMULATION_CONTROLS              0x02
198 #define UX_HOST_CLASS_HID_PAGE_VR_CONTROLS                      0x03
199 #define UX_HOST_CLASS_HID_PAGE_SPORT_CONTROLS                   0x04
200 #define UX_HOST_CLASS_HID_PAGE_GAME_CONTROLS                    0x05
201 #define UX_HOST_CLASS_HID_PAGE_GENERIC_DEVICE_CONTROLS          0x06
202 #define UX_HOST_CLASS_HID_PAGE_KEYBOARD_KEYPAD                  0x07
203 #define UX_HOST_CLASS_HID_PAGE_LEDS                             0x08
204 #define UX_HOST_CLASS_HID_PAGE_BUTTON                           0x09
205 #define UX_HOST_CLASS_HID_PAGE_ORDINAL                          0x0A
206 #define UX_HOST_CLASS_HID_PAGE_TELEPHONY                        0x0B
207 #define UX_HOST_CLASS_HID_PAGE_CONSUMER                         0x0C
208 #define UX_HOST_CLASS_HID_PAGE_DIGITIZER                        0x0D
209 #define UX_HOST_CLASS_HID_PAGE_PHYSICAL_INTERFACE_DEVICE        0x0F
210 #define UX_HOST_CLASS_HID_PAGE_UNICODE                          0x10
211 #define UX_HOST_CLASS_HID_PAGE_ALPHANUMERIC_DISPLAY             0x14
212 #define UX_HOST_CLASS_HID_PAGE_MEDICAL_INSTRUMENTS              0x40
213 #define UX_HOST_CLASS_HID_PAGE_BAR_CODE_SCANNER                 0x8C
214 #define UX_HOST_CLASS_HID_PAGE_SCALE_PAGE                       0x8D
215 #define UX_HOST_CLASS_HID_PAGE_MAGNETIC_STRIPE_READING          0x8E
216 #define UX_HOST_CLASS_HID_PAGE_CAMERA_CONTROL_PAGE              0x90
217 
218 
219 /* Define HID Class generic desktop page constants.  */
220 
221 #define UX_HOST_CLASS_HID_GENERIC_DESKTOP_UNDEFINED             0x00
222 #define UX_HOST_CLASS_HID_GENERIC_DESKTOP_POINTER               0x01
223 #define UX_HOST_CLASS_HID_GENERIC_DESKTOP_MOUSE                 0x02
224 #define UX_HOST_CLASS_HID_GENERIC_DESKTOP_RESERVED              0x03
225 #define UX_HOST_CLASS_HID_GENERIC_DESKTOP_JOYSTICK              0x04
226 #define UX_HOST_CLASS_HID_GENERIC_DESKTOP_GAME PAD              0x05
227 #define UX_HOST_CLASS_HID_GENERIC_DESKTOP_KEYBOARD              0x06
228 #define UX_HOST_CLASS_HID_GENERIC_DESKTOP_KEYPAD                0x07
229 #define UX_HOST_CLASS_HID_GENERIC_DESKTOP_MULTI_AXIS_CONTROLLER 0x08
230 #define UX_HOST_CLASS_HID_GENERIC_DESKTOP_X                     0x30
231 #define UX_HOST_CLASS_HID_GENERIC_DESKTOP_Y                     0x31
232 #define UX_HOST_CLASS_HID_GENERIC_DESKTOP_Z                     0x32
233 #define UX_HOST_CLASS_HID_GENERIC_DESKTOP_RX                    0x33
234 #define UX_HOST_CLASS_HID_GENERIC_DESKTOP_RY                    0x34
235 #define UX_HOST_CLASS_HID_GENERIC_DESKTOP_RZ                    0x35
236 #define UX_HOST_CLASS_HID_GENERIC_DESKTOP_SLIDER                0x36
237 #define UX_HOST_CLASS_HID_GENERIC_DESKTOP_DIAL                  0x37
238 #define UX_HOST_CLASS_HID_GENERIC_DESKTOP_WHEEL                 0x38
239 #define UX_HOST_CLASS_HID_GENERIC_DESKTOP_HAT_SWITCH            0x39
240 #define UX_HOST_CLASS_HID_GENERIC_DESKTOP_COUNTED_BUFFER        0x3A
241 #define UX_HOST_CLASS_HID_GENERIC_DESKTOP_BYTE_COUNT            0x3B
242 #define UX_HOST_CLASS_HID_GENERIC_DESKTOP_MOTION_WAKEUP         0x3C
243 #define UX_HOST_CLASS_HID_GENERIC_DESKTOP_START                 0x3D
244 #define UX_HOST_CLASS_HID_GENERIC_DESKTOP_SELECT                0x3E
245 #define UX_HOST_CLASS_HID_GENERIC_DESKTOP_VX                    0x40
246 #define UX_HOST_CLASS_HID_GENERIC_DESKTOP_VY                    0x41
247 #define UX_HOST_CLASS_HID_GENERIC_DESKTOP_VZ                    0x42
248 #define UX_HOST_CLASS_HID_GENERIC_DESKTOP_VBRX                  0x43
249 #define UX_HOST_CLASS_HID_GENERIC_DESKTOP_VBRY                  0x44
250 #define UX_HOST_CLASS_HID_GENERIC_DESKTOP_VBRZ                  0x45
251 #define UX_HOST_CLASS_HID_GENERIC_DESKTOP_VNO                   0x46
252 #define UX_HOST_CLASS_HID_GENERIC_DESKTOP_FEATURE_NOTIFICATION  0x47
253 #define UX_HOST_CLASS_HID_GENERIC_DESKTOP_SYSTEM_CONTROL        0x80
254 #define UX_HOST_CLASS_HID_GENERIC_DESKTOP_SYSTEM_POWER_DOWN     0x81
255 #define UX_HOST_CLASS_HID_GENERIC_DESKTOP_SYSTEM_SLEEP          0x82
256 #define UX_HOST_CLASS_HID_GENERIC_DESKTOP_SYSTEM_WAKE_UP        0x83
257 #define UX_HOST_CLASS_HID_GENERIC_DESKTOP_SYSTEM_CONTEXT_MENU   0x84
258 #define UX_HOST_CLASS_HID_GENERIC_DESKTOP_SYSTEM_MAIN_MENU      0x85
259 #define UX_HOST_CLASS_HID_GENERIC_DESKTOP_SYSTEM_APP_MENU       0x86
260 #define UX_HOST_CLASS_HID_GENERIC_DESKTOP_SYSTEM_MENU_HELP      0x87
261 #define UX_HOST_CLASS_HID_GENERIC_DESKTOP_SYSTEM_MENU_EXIT      0x88
262 #define UX_HOST_CLASS_HID_GENERIC_DESKTOP_SYSTEM_MENU_SELECT    0x89
263 #define UX_HOST_CLASS_HID_GENERIC_DESKTOP_SYSTEM_MENU_RIGHT     0x8A
264 #define UX_HOST_CLASS_HID_GENERIC_DESKTOP_SYSTEM_MENU_LEFT      0x8B
265 #define UX_HOST_CLASS_HID_GENERIC_DESKTOP_SYSTEM_MENU_UP        0x8C
266 #define UX_HOST_CLASS_HID_GENERIC_DESKTOP_SYSTEM_MENU_DOWN      0x8D
267 #define UX_HOST_CLASS_HID_GENERIC_DESKTOP_SYSTEM_COLD_RESTART   0x8E
268 #define UX_HOST_CLASS_HID_GENERIC_DESKTOP_SYSTEM_WARM_RESTART   0x8F
269 #define UX_HOST_CLASS_HID_GENERIC_DESKTOP_D_PAD_UP              0x90
270 #define UX_HOST_CLASS_HID_GENERIC_DESKTOP_D_PAD_DOWN            0x91
271 #define UX_HOST_CLASS_HID_GENERIC_DESKTOP_D_PAD_RIGHT           0x92
272 #define UX_HOST_CLASS_HID_GENERIC_DESKTOP_D_PAD_LEFT            0x93
273 #define UX_HOST_CLASS_HID_GENERIC_DESKTOP_SYSTEM_DOCK           0xA0
274 #define UX_HOST_CLASS_HID_GENERIC_DESKTOP_SYSTEM_UNDOCK         0xA1
275 #define UX_HOST_CLASS_HID_GENERIC_DESKTOP_SYSTEM_SETUP          0xA2
276 #define UX_HOST_CLASS_HID_GENERIC_DESKTOP_SYSTEM_BREAK          0xA3
277 #define UX_HOST_CLASS_HID_GENERIC_DESKTOP_SYSTEM_DEBUGGER_BREAK 0xA4
278 #define UX_HOST_CLASS_HID_GENERIC_DESKTOP_APPLICAION_BREAK      0xA5
279 #define UX_HOST_CLASS_HID_GENERIC_DESKTOP_APPLICATION_DEBUGGER_BREAK 0xA6
280 #define UX_HOST_CLASS_HID_GENERIC_DESKTOP_SYSTEM_SPEAKER_MUTE   0xA7
281 #define UX_HOST_CLASS_HID_GENERIC_DESKTOP_SYSTEM_HIBERNATE      0xA8
282 #define UX_HOST_CLASS_HID_GENERIC_DESKTOP_SYSTEM_DISPLAY_INVERT 0xB0
283 #define UX_HOST_CLASS_HID_GENERIC_DESKTOP_SYSTEM_DISPLAY_INTERNAL 0xB1
284 #define UX_HOST_CLASS_HID_GENERIC_DESKTOP_SYSTEM_DISPLAY_EXTERNAL 0xB2
285 #define UX_HOST_CLASS_HID_GENERIC_DESKTOP_SYSTEM_DISPLAY_BOTH   0xB3
286 #define UX_HOST_CLASS_HID_GENERIC_DESKTOP_SYSTEM_DISPLAY_DUAL   0xB4
287 #define UX_HOST_CLASS_HID_GENERIC_DESKTOP_SYSTEM_DISPLAY_TOGGLE 0xB5
288 #define UX_HOST_CLASS_HID_GENERIC_DESKTOP_SYSTEM_DISPLAY_SWAP   0xB6
289 #define UX_HOST_CLASS_HID_GENERIC_DESKTOP_SYSTEM_DISPLAY_LCD_AUTOSCALE 0xB7
290 
291 
292 /* Define HID Class game control page constants.  */
293 
294 #define UX_HOST_CLASS_HID_GAME_CONTROL_UNDEFINED                0x00
295 #define UX_HOST_CLASS_HID_GAME_CONTROL_3D_GAME_CONTROLLER       0x01
296 #define UX_HOST_CLASS_HID_GAME_CONTROL_PINBALL_DEVICE           0x02
297 #define UX_HOST_CLASS_HID_GAME_CONTROL_GUN_DEVICE               0x03
298 #define UX_HOST_CLASS_HID_GAME_CONTROL_POINT_OF_VIEW            0x20
299 #define UX_HOST_CLASS_HID_GAME_CONTROL_TURN_RIGHT_LEFT          0x21
300 #define UX_HOST_CLASS_HID_GAME_CONTROL_PITCH_FORWARD_BACKWARD   0x22
301 #define UX_HOST_CLASS_HID_GAME_CONTROL_ROLL_RIGHT_LEFT          0x23
302 #define UX_HOST_CLASS_HID_GAME_CONTROL_MOVE_RIGHT_LEFT          0x24
303 #define UX_HOST_CLASS_HID_GAME_CONTROL_MOVE_FORWARD_BACKWARD    0x25
304 #define UX_HOST_CLASS_HID_GAME_CONTROL_MOVE_UP_DOWN             0x26
305 #define UX_HOST_CLASS_HID_GAME_CONTROL_LEAN_RIGHT_LEFT          0x27
306 #define UX_HOST_CLASS_HID_GAME_CONTROL_LEAN_FORWARD_BACKWARD    0x28
307 #define UX_HOST_CLASS_HID_GAME_CONTROL_HEIGHT_OF_POV            0x29
308 #define UX_HOST_CLASS_HID_GAME_CONTROL_FLIPPER                  0x2A
309 #define UX_HOST_CLASS_HID_GAME_CONTROL_SECONDARY_FLIPPER        0x2B
310 #define UX_HOST_CLASS_HID_GAME_CONTROL_BUMP                     0x2C
311 #define UX_HOST_CLASS_HID_GAME_CONTROL_NEW_GAME                 0x2D
312 #define UX_HOST_CLASS_HID_GAME_CONTROL_SHOOT_BALL               0x2E
313 #define UX_HOST_CLASS_HID_GAME_CONTROL_PLAYER                   0x2F
314 #define UX_HOST_CLASS_HID_GAME_CONTROL_GUN_BOLT                 0x30
315 #define UX_HOST_CLASS_HID_GAME_CONTROL_GUN_CLIP                 0x31
316 #define UX_HOST_CLASS_HID_GAME_CONTROL_GUN_SELECTOR             0x32
317 #define UX_HOST_CLASS_HID_GAME_CONTROL_GUN_SINGLE_SHOT          0x33
318 #define UX_HOST_CLASS_HID_GAME_CONTROL_GUN_BURST                0x34
319 #define UX_HOST_CLASS_HID_GAME_CONTROL_GUN_AUTOMATIC            0x35
320 #define UX_HOST_CLASS_HID_GAME_CONTROL_GUN_SAFETY               0x36
321 #define UX_HOST_CLASS_HID_GAME_CONTROL_GAMEAD_FIRE_JUMP         0x37
322 #define UX_HOST_CLASS_HID_GAME_CONTROL_GAMEPAD_TRIGGER          0x39
323 
324 
325 /* Define HID Class LED page constants.  */
326 
327 #define UX_HOST_CLASS_HID_LED_UNDEFINED                         0x00
328 #define UX_HOST_CLASS_HID_LED_NUM_LOCK                          0x01
329 #define UX_HOST_CLASS_HID_LED_CAPS_LOCK                         0x02
330 #define UX_HOST_CLASS_HID_LED_SCROLL_LOCK                       0x03
331 #define UX_HOST_CLASS_HID_LED_COMPOSE                           0x04
332 #define UX_HOST_CLASS_HID_LED_KANA                              0x05
333 #define UX_HOST_CLASS_HID_LED_POWER                             0x06
334 #define UX_HOST_CLASS_HID_LED_SHIFT                             0x07
335 #define UX_HOST_CLASS_HID_LED_DO_NOT_DISTURB                    0x08
336 #define UX_HOST_CLASS_HID_LED_MUTE                              0x09
337 #define UX_HOST_CLASS_HID_LED_TONE_ENABLE                       0x0A
338 #define UX_HOST_CLASS_HID_LED_HIGH_CUT_FILTER                   0x0B
339 #define UX_HOST_CLASS_HID_LED_LOW_CUT_FILTER                    0x0C
340 #define UX_HOST_CLASS_HID_LED_EQUALIZER_ENABLE                  0x0D
341 #define UX_HOST_CLASS_HID_LED_SOUND_FIELD_ON                    0x0E
342 #define UX_HOST_CLASS_HID_LED_SURROUND_ON                       0x0F
343 #define UX_HOST_CLASS_HID_LED_REPEAT                            0x10
344 #define UX_HOST_CLASS_HID_LED_STEREO                            0x11
345 #define UX_HOST_CLASS_HID_LED_SAMPLING_RATE_DETECT              0x12
346 #define UX_HOST_CLASS_HID_LED_SPINNING                          0x13
347 #define UX_HOST_CLASS_HID_LED_CAV                               0x14
348 #define UX_HOST_CLASS_HID_LED_CLV                               0x15
349 #define UX_HOST_CLASS_HID_LED_RECORDING_FORMAT_DETECT           0x16
350 #define UX_HOST_CLASS_HID_LED_OFF_HOOK                          0x17
351 #define UX_HOST_CLASS_HID_LED_RING                              0x18
352 #define UX_HOST_CLASS_HID_LED_MESSAGE_WAITING                   0x19
353 #define UX_HOST_CLASS_HID_LED_DATA_MODE                         0x1A
354 #define UX_HOST_CLASS_HID_LED_BATTERY_OPERATION                 0x1B
355 #define UX_HOST_CLASS_HID_LED_BATTERY_OK                        0x1C
356 #define UX_HOST_CLASS_HID_LED_BATTERY_LOW                       0x1D
357 #define UX_HOST_CLASS_HID_LED_SPEAKER                           0x1E
358 #define UX_HOST_CLASS_HID_LED_HEAD_SET                          0x1F
359 #define UX_HOST_CLASS_HID_LED_HOLD                              0x20
360 #define UX_HOST_CLASS_HID_LED_MICROPHONE                        0x21
361 #define UX_HOST_CLASS_HID_LED_COVERAGE                          0x22
362 #define UX_HOST_CLASS_HID_LED_NIGHT_MODE                        0x23
363 #define UX_HOST_CLASS_HID_LED_SEND_CALLS                        0x24
364 #define UX_HOST_CLASS_HID_LED_CALL_PICKUP                       0x25
365 #define UX_HOST_CLASS_HID_LED_CONFERENCE                        0x26
366 #define UX_HOST_CLASS_HID_LED_STAND_BY                          0x27
367 #define UX_HOST_CLASS_HID_LED_CAMERA_ON                         0x28
368 #define UX_HOST_CLASS_HID_LED_CAMERA_OFF                        0x29
369 #define UX_HOST_CLASS_HID_LED_ON_LINE                           0x2A
370 #define UX_HOST_CLASS_HID_LED_OFF_LINE                          0x2B
371 #define UX_HOST_CLASS_HID_LED_BUSY                              0x2C
372 #define UX_HOST_CLASS_HID_LED_READY                             0x2D
373 #define UX_HOST_CLASS_HID_LED_PAPER_OUT                         0x2E
374 #define UX_HOST_CLASS_HID_LED_PAPER_JAM                         0x2F
375 #define UX_HOST_CLASS_HID_LED_REMOTE                            0x30
376 #define UX_HOST_CLASS_HID_LED_FORWARD                           0x31
377 #define UX_HOST_CLASS_HID_LED_REVERSE                           0x32
378 #define UX_HOST_CLASS_HID_LED_STOP                              0x33
379 #define UX_HOST_CLASS_HID_LED_REWIND                            0x34
380 #define UX_HOST_CLASS_HID_LED_FAST_FORWARD                      0x35
381 #define UX_HOST_CLASS_HID_LED_PLAY                              0x36
382 #define UX_HOST_CLASS_HID_LED_PAUSE                             0x37
383 #define UX_HOST_CLASS_HID_LED_RECORD                            0x38
384 #define UX_HOST_CLASS_HID_LED_ERROR                             0x39
385 #define UX_HOST_CLASS_HID_LED_USAGE_SELECTED_INDICATOR          0x3A
386 #define UX_HOST_CLASS_HID_LED_USAGE_IN_USE_INDICATOR            0x3B
387 #define UX_HOST_CLASS_HID_LED_USAGE MULTI_MODE_INDICATOR        0x3C
388 #define UX_HOST_CLASS_HID_LED_INDICATOR_ON                      0x3D
389 #define UX_HOST_CLASS_HID_LED_INDICATOR_FLASH                   0x3E
390 #define UX_HOST_CLASS_HID_LED_INDICATOR_SLOW_BLINK              0x3F
391 #define UX_HOST_CLASS_HID_LED_INDICATOR_FAST_BLINK              0x40
392 #define UX_HOST_CLASS_HID_LED_INDICATOR_OFF                     0x41
393 #define UX_HOST_CLASS_HID_LED_FLASH_ON_TIME                     0x42
394 #define UX_HOST_CLASS_HID_LED_SLOW_BLINK_ON_TIME                0x43
395 #define UX_HOST_CLASS_HID_LED_SLOW_BLINK_OFF_TIME               0x44
396 #define UX_HOST_CLASS_HID_LED_FAST_BLINK_ON_TIME                0x45
397 #define UX_HOST_CLASS_HID_LED_FAST_BLINK_OFF_TIME               0x46
398 #define UX_HOST_CLASS_HID_LED_USAGE_INDICATOR_COLOR             0x47
399 #define UX_HOST_CLASS_HID_LED_INDICATOR_RED                     0x48
400 #define UX_HOST_CLASS_HID_LED_INDICATOR_GREEN                   0x49
401 #define UX_HOST_CLASS_HID_LED_INDICATOR_AMBER                   0x4A
402 #define UX_HOST_CLASS_HID_LED_GENERIC_INDICATOR                 0x4B
403 #define UX_HOST_CLASS_HID_LED_SYSTEM_SUSPEND                    0x4C
404 #define UX_HOST_CLASS_HID_LED_EXTERNAL_POWER_CONNECTED          0x4D
405 
406 
407 /* Define HID Class consumer page constants.  */
408 
409 #define UX_HOST_CLASS_HID_CONSUMER_UNASSIGNED                   0x00
410 #define UX_HOST_CLASS_HID_CONSUMER_REMOTE_CONTROL               0x01
411 #define UX_HOST_CLASS_HID_CONSUMER_NUMERIC_KEY_PAD              0x02
412 #define UX_HOST_CLASS_HID_CONSUMER_PROGRAMMABLE_BUTTONS         0x03
413 #define UX_HOST_CLASS_HID_CONSUMER_MICROPHONE                   0x04
414 #define UX_HOST_CLASS_HID_CONSUMER_HEADPHONE                    0x05
415 #define UX_HOST_CLASS_HID_CONSUMER_GRAPHIC_EQUALIZER            0x06
416 #define UX_HOST_CLASS_HID_CONSUMER_PLUS_10                      0x20
417 #define UX_HOST_CLASS_HID_CONSUMER_PLUS_100                     0x21
418 #define UX_HOST_CLASS_HID_CONSUMER_AM_PM                        0x22
419 #define UX_HOST_CLASS_HID_CONSUMER_POWER                        0x30
420 #define UX_HOST_CLASS_HID_CONSUMER_RESET                        0x31
421 #define UX_HOST_CLASS_HID_CONSUMER_SLEEP                        0x32
422 #define UX_HOST_CLASS_HID_CONSUMER_SLEEP_AFTER                  0x33
423 #define UX_HOST_CLASS_HID_CONSUMER_SLEEP_MODE_RTC               0x34
424 #define UX_HOST_CLASS_HID_CONSUMER_ILLUMINATION                 0x35
425 #define UX_HOST_CLASS_HID_CONSUMER_FUNCTION_BUTTONS             0x36
426 #define UX_HOST_CLASS_HID_CONSUMER_MENU                         0x40
427 #define UX_HOST_CLASS_HID_CONSUMER_MENU_PICK                    0x41
428 #define UX_HOST_CLASS_HID_CONSUMER_MENU_UP                      0x42
429 #define UX_HOST_CLASS_HID_CONSUMER_MENU_DOWN                    0x43
430 #define UX_HOST_CLASS_HID_CONSUMER_MENU_LEFT                    0x44
431 #define UX_HOST_CLASS_HID_CONSUMER_MENU_RIGHT                   0x45
432 #define UX_HOST_CLASS_HID_CONSUMER_MENU_ESCAPE                  0x46
433 #define UX_HOST_CLASS_HID_CONSUMER_MENU_VALUE_INCREASE          0x47
434 #define UX_HOST_CLASS_HID_CONSUMER_MENU_VALUE_DECREASE          0x48
435 #define UX_HOST_CLASS_HID_CONSUMER_DATA_ON_SCREEN               0x60
436 #define UX_HOST_CLASS_HID_CONSUMER_CLOSED_CAPTION               0x61
437 #define UX_HOST_CLASS_HID_CONSUMER_CLOSED_CAPTION_SELECT        0x62
438 #define UX_HOST_CLASS_HID_CONSUMER_VCR_TV                       0x63
439 #define UX_HOST_CLASS_HID_CONSUMER_BROADCAST_MODE               0x64
440 #define UX_HOST_CLASS_HID_CONSUMER_SNAPSHOT                     0x65
441 #define UX_HOST_CLASS_HID_CONSUMER_STILL                        0x66
442 #define UX_HOST_CLASS_HID_CONSUMER_SELECTION                    0x80
443 #define UX_HOST_CLASS_HID_CONSUMER_ASSIGN_SELECTION             0x81
444 #define UX_HOST_CLASS_HID_CONSUMER_MODE_STEP                    0x82
445 #define UX_HOST_CLASS_HID_CONSUMER_RECALL_LAST                  0x83
446 #define UX_HOST_CLASS_HID_CONSUMER_ENTER_CHANNEL                0x84
447 #define UX_HOST_CLASS_HID_CONSUMER_ORDER_MOVIE                  0x85
448 #define UX_HOST_CLASS_HID_CONSUMER_CHANNEL_L                    0x86
449 #define UX_HOST_CLASS_HID_CONSUMER_MEDIA_SELECTION              0x87
450 #define UX_HOST_CLASS_HID_CONSUMER_MEDIA_SELECT_COMPUTER        0x88
451 #define UX_HOST_CLASS_HID_CONSUMER_MEDIA_SELECT_TV              0x89
452 #define UX_HOST_CLASS_HID_CONSUMER_MEDIA_SELECT_WWW             0x8A
453 #define UX_HOST_CLASS_HID_CONSUMER_MEDIA_SELECT_DVD             0x8B
454 #define UX_HOST_CLASS_HID_CONSUMER_MEDIA_SELECT_TELEPHONE       0x8C
455 #define UX_HOST_CLASS_HID_CONSUMER_MEDIA_SELECT_PROGRAM_GUIDE   0x8D
456 #define UX_HOST_CLASS_HID_CONSUMER_MEDIA_SELECT_VIDEO_PHONE     0x8E
457 #define UX_HOST_CLASS_HID_CONSUMER_MEDIA_SELECT_GAMES           0x8F
458 #define UX_HOST_CLASS_HID_CONSUMER_MEDIA_SELECT_MESSAGES        0x90
459 #define UX_HOST_CLASS_HID_CONSUMER_MEDIA_SELECT_CD              0x91
460 #define UX_HOST_CLASS_HID_CONSUMER_MEDIA_SELECT_VCR             0x92
461 #define UX_HOST_CLASS_HID_CONSUMER_MEDIA_SELECT_TUNER           0x93
462 #define UX_HOST_CLASS_HID_CONSUMER_QUIT                         0x94
463 #define UX_HOST_CLASS_HID_CONSUMER_HELP                         0x95
464 #define UX_HOST_CLASS_HID_CONSUMER_MEDIA_SELECT_TAPE            0x96
465 #define UX_HOST_CLASS_HID_CONSUMER_MEDIA_SELECT_CABLE           0x97
466 #define UX_HOST_CLASS_HID_CONSUMER_MEDIA_SELECT_SATELLITE       0x98
467 #define UX_HOST_CLASS_HID_CONSUMER_MEDIA_SELECT_SECURITY        0x99
468 #define UX_HOST_CLASS_HID_CONSUMER_MEDIA_SELECT_HOME            0x9A
469 #define UX_HOST_CLASS_HID_CONSUMER_MEDIA_SELECT_CALL            0x9B
470 #define UX_HOST_CLASS_HID_CONSUMER_CHANNEL_INCREMENT            0x9C
471 #define UX_HOST_CLASS_HID_CONSUMER_CHANNEL_DECREMENT            0x9D
472 #define UX_HOST_CLASS_HID_CONSUMER_MEDIA_SELECT                 0x9E
473 #define UX_HOST_CLASS_HID_CONSUMER_VCR_PLUS                     0xA0
474 #define UX_HOST_CLASS_HID_CONSUMER_ONCE                         0xA1
475 #define UX_HOST_CLASS_HID_CONSUMER_DAILY                        0xA2
476 #define UX_HOST_CLASS_HID_CONSUMER_WEEKLY                       0xA3
477 #define UX_HOST_CLASS_HID_CONSUMER_MONTHLY                      0xA4
478 #define UX_HOST_CLASS_HID_CONSUMER_PLAY                         0xB0
479 #define UX_HOST_CLASS_HID_CONSUMER_PAUSE                        0xB1
480 #define UX_HOST_CLASS_HID_CONSUMER_RECORD                       0xB2
481 #define UX_HOST_CLASS_HID_CONSUMER_FAST_FORWARD                 0xB3
482 #define UX_HOST_CLASS_HID_CONSUMER_REWIND                       0xB4
483 #define UX_HOST_CLASS_HID_CONSUMER_SCAN_NEXT_TRACK              0xB5
484 #define UX_HOST_CLASS_HID_CONSUMER_SCAN_PREVIOUS_TRACK          0xB6
485 #define UX_HOST_CLASS_HID_CONSUMER_STOP                         0xB7
486 #define UX_HOST_CLASS_HID_CONSUMER_EJECT                        0xB8
487 #define UX_HOST_CLASS_HID_CONSUMER_RANDOM_PLAY                  0xB9
488 #define UX_HOST_CLASS_HID_CONSUMER_SELECT_DISC                  0xBA
489 #define UX_HOST_CLASS_HID_CONSUMER_ENTER_DISC                   0xBB
490 #define UX_HOST_CLASS_HID_CONSUMER_REPEAT                       0xBC
491 #define UX_HOST_CLASS_HID_CONSUMER_TRACKING                     0xBD
492 #define UX_HOST_CLASS_HID_CONSUMER_TRACK_NORMAL                 0xBE
493 #define UX_HOST_CLASS_HID_CONSUMER_SLOW_TRACKING                0xBF
494 #define UX_HOST_CLASS_HID_CONSUMER_FRAME_FORWARD                0xC0
495 #define UX_HOST_CLASS_HID_CONSUMER_FRAME_BACK                   0xC1
496 #define UX_HOST_CLASS_HID_CONSUMER_MARK                         0xC2
497 #define UX_HOST_CLASS_HID_CONSUMER_CLEAR_MARK                   0xC3
498 #define UX_HOST_CLASS_HID_CONSUMER_REPEAT_FROM_MARK             0xC4
499 #define UX_HOST_CLASS_HID_CONSUMER_RETURN_TO_MARK               0xC5
500 #define UX_HOST_CLASS_HID_CONSUMER_SEARCH_MARK_FORWARD          0xC6
501 #define UX_HOST_CLASS_HID_CONSUMER_SEARCH_MARK_BACKWARDS        0xC7
502 #define UX_HOST_CLASS_HID_CONSUMER_COUNTER_RESET                0xC8
503 #define UX_HOST_CLASS_HID_CONSUMER_SHOW_COUNTER                 0xC9
504 #define UX_HOST_CLASS_HID_CONSUMER_TRACKING_INCREMENT           0xCA
505 #define UX_HOST_CLASS_HID_CONSUMER_TRACKING_DECREMENT           0xCB
506 #define UX_HOST_CLASS_HID_CONSUMER_STOP_EJECT                   0xCC
507 #define UX_HOST_CLASS_HID_CONSUMER_PLAY_PAUSE                   0xCD
508 #define UX_HOST_CLASS_HID_CONSUMER_PLAY_SKIP                    0xCE
509 #define UX_HOST_CLASS_HID_CONSUMER_VOLUME                       0xE0
510 #define UX_HOST_CLASS_HID_CONSUMER_BALANCE                      0xE1
511 #define UX_HOST_CLASS_HID_CONSUMER_MUTE                         0xE2
512 #define UX_HOST_CLASS_HID_CONSUMER_BASS                         0xE3
513 #define UX_HOST_CLASS_HID_CONSUMER_TREBLE                       0xE4
514 #define UX_HOST_CLASS_HID_CONSUMER_BASS_BOOST                   0xE5
515 #define UX_HOST_CLASS_HID_CONSUMER_SURROUND_MODE                0xE6
516 #define UX_HOST_CLASS_HID_CONSUMER_LOUDNESS                     0xE7
517 #define UX_HOST_CLASS_HID_CONSUMER_MPX                          0xE8
518 #define UX_HOST_CLASS_HID_CONSUMER_VOLUME_INCREMENT             0xE9
519 #define UX_HOST_CLASS_HID_CONSUMER_VOLUME_DECREMENT             0xEA
520 #define UX_HOST_CLASS_HID_CONSUMER_SPEED_SELECT                 0xF0
521 #define UX_HOST_CLASS_HID_CONSUMER_PLAYBACK_SPEED               0xF1
522 #define UX_HOST_CLASS_HID_CONSUMER_STANDARD_PLAY                0xF2
523 #define UX_HOST_CLASS_HID_CONSUMER_LONG_PLAY                    0xF3
524 #define UX_HOST_CLASS_HID_CONSUMER_EXTENDED_PLAY                0xF4
525 #define UX_HOST_CLASS_HID_CONSUMER_SLOW                         0xF5
526 #define UX_HOST_CLASS_HID_CONSUMER_FAN_ENABLE                   0xF6
527 #define UX_HOST_CLASS_HID_CONSUMER_FAN_SPEED                    0x100
528 #define UX_HOST_CLASS_HID_CONSUMER_LIGHT_ENABLE                 0x101
529 #define UX_HOST_CLASS_HID_CONSUMER_LIGHT_ILLUMINATION_LEVEL     0x102
530 #define UX_HOST_CLASS_HID_CONSUMER_CLIMATE_CONTROL_ENABLE       0x103
531 #define UX_HOST_CLASS_HID_CONSUMER_ROOM_TEMPERATURE             0x104
532 #define UX_HOST_CLASS_HID_CONSUMER_SECURITY_ENABLE              0x105
533 #define UX_HOST_CLASS_HID_CONSUMER_FIRE_ALARM                   0x106
534 #define UX_HOST_CLASS_HID_CONSUMER_POLICE_ALARM                 0x107
535 #define UX_HOST_CLASS_HID_CONSUMER_PROXIMITY                    0x108
536 #define UX_HOST_CLASS_HID_CONSUMER_MOTION                       0x109
537 #define UX_HOST_CLASS_HID_CONSUMER_DURESS_ALARM                 0x10A
538 #define UX_HOST_CLASS_HID_CONSUMER_HOLDUP_ALARM                 0x10B
539 #define UX_HOST_CLASS_HID_CONSUMER_MEDICAL_ALARM                0x10C
540 #define UX_HOST_CLASS_HID_CONSUMER_BALANCE_RIGHT                0x10D
541 #define UX_HOST_CLASS_HID_CONSUMER_BALANCE_LEFT                 0x150
542 #define UX_HOST_CLASS_HID_CONSUMER_BASS_INCREMENT               0x151
543 #define UX_HOST_CLASS_HID_CONSUMER_BASS_DECREMENT               0x152
544 #define UX_HOST_CLASS_HID_CONSUMER_TREBLE_INCREMENT             0x153
545 #define UX_HOST_CLASS_HID_CONSUMER_TREBLE_DECREMENT             0x154
546 #define UX_HOST_CLASS_HID_CONSUMER_SPEAKER_SYSTEM               0x155
547 #define UX_HOST_CLASS_HID_CONSUMER_CHANNEL_LEFT                 0x160
548 #define UX_HOST_CLASS_HID_CONSUMER_CHANNEL_RIGHT                0x161
549 #define UX_HOST_CLASS_HID_CONSUMER_CHANNEL_CENTER               0x162
550 #define UX_HOST_CLASS_HID_CONSUMER_CHANNEL_FRONT                0x163
551 #define UX_HOST_CLASS_HID_CONSUMER_CHANNEL_CENTER_FRONT         0x164
552 #define UX_HOST_CLASS_HID_CONSUMER_CHANNEL_SIDE                 0x165
553 #define UX_HOST_CLASS_HID_CONSUMER_CHANNEL_SURROUND             0x166
554 #define UX_HOST_CLASS_HID_CONSUMER_CHANNEL_LOW_FREQUENCY        0x167
555 #define UX_HOST_CLASS_HID_CONSUMER_CHANNEL_TOP                  0x168
556 #define UX_HOST_CLASS_HID_CONSUMER_CHANNEL_UNKNOWN              0x169
557 #define UX_HOST_CLASS_HID_CONSUMER_SUB_CHANNEL                  0x16A
558 #define UX_HOST_CLASS_HID_CONSUMER_SUB_CHANNEL_INCREMENT        0x170
559 #define UX_HOST_CLASS_HID_CONSUMER_SUB_CHANNEL_DECREMENT        0x171
560 #define UX_HOST_CLASS_HID_CONSUMER_ALTERNATE_AUDIO_INCREMENT    0x172
561 #define UX_HOST_CLASS_HID_CONSUMER_ALTERNATE_AUDIO_DECREMENT    0x173
562 #define UX_HOST_CLASS_HID_CONSUMER_APPLICATION_LAUNCH_BUTTONS   0x174
563 #define UX_HOST_CLASS_HID_CONSUMER_AL_LAUNCH_BUTTON_CONFIGURATION 0x180
564 #define UX_HOST_CLASS_HID_CONSUMER_AL_PROGRAMMABLE_BUTTON       0x181
565 #define UX_HOST_CLASS_HID_CONSUMER_AL_CONSUMER_CONTROL_CONFIGURATION 0x182
566 #define UX_HOST_CLASS_HID_CONSUMER_AL_WORD_PROCESSOR            0x183
567 #define UX_HOST_CLASS_HID_CONSUMER_AL_TEXT_EDITOR               0x184
568 #define UX_HOST_CLASS_HID_CONSUMER_AL_SPREADSHEET               0x185
569 #define UX_HOST_CLASS_HID_CONSUMER_AL_GRAPHICS_EDITOR           0x186
570 #define UX_HOST_CLASS_HID_CONSUMER_AL_PRESENTATION_APP          0x187
571 #define UX_HOST_CLASS_HID_CONSUMER_AL_DATABASE_APP              0x188
572 #define UX_HOST_CLASS_HID_CONSUMER_AL_EMAIL_READER              0x189
573 #define UX_HOST_CLASS_HID_CONSUMER_AL_NEWSREADER                0x18A
574 #define UX_HOST_CLASS_HID_CONSUMER_AL_VOICEMAIL                 0x18B
575 #define UX_HOST_CLASS_HID_CONSUMER_AL_CONTACTS_ADDRESS_BOOK     0x18C
576 #define UX_HOST_CLASS_HID_CONSUMER_AL_CALENDAR_SCHEDULE         0x18D
577 #define UX_HOST_CLASS_HID_CONSUMER_AL_TASK_PROJECT_MANAGER      0x18E
578 #define UX_HOST_CLASS_HID_CONSUMER_AL_LOG_JOURNAL_TIMECARD      0x18F
579 #define UX_HOST_CLASS_HID_CONSUMER_AL_CHECKBOOK_FINANCE         0x190
580 #define UX_HOST_CLASS_HID_CONSUMER_AL_CALCULATOR                0x191
581 #define UX_HOST_CLASS_HID_CONSUMER_AL_A_V_CAPTURE_PLAYBACK      0x192
582 #define UX_HOST_CLASS_HID_CONSUMER_AL_LOCAL_MACHINE_BROWSER     0x193
583 #define UX_HOST_CLASS_HID_CONSUMER_AL_LAN_WAN_BROWSER           0x194
584 #define UX_HOST_CLASS_HID_CONSUMER_AL_INTERNET_BROWSER          0x195
585 #define UX_HOST_CLASS_HID_CONSUMER_AL_REMOTE_NETWORKING         0x196
586 #define UX_HOST_CLASS_HID_CONSUMER_AL_NETWORK_CONFERENCE        0x197
587 #define UX_HOST_CLASS_HID_CONSUMER_AL_NETWORK_CHAT              0x198
588 #define UX_HOST_CLASS_HID_CONSUMER_AL_TELEPHONY_DIALER          0x199
589 #define UX_HOST_CLASS_HID_CONSUMER_AL_LOGON                     0x19A
590 #define UX_HOST_CLASS_HID_CONSUMER_AL_LOGOFF                    0x19B
591 #define UX_HOST_CLASS_HID_CONSUMER_AL_LOGON_LOGOFF              0x19C
592 #define UX_HOST_CLASS_HID_CONSUMER_AL_SCREENSAVER               0x19D
593 #define UX_HOST_CLASS_HID_CONSUMER_AL_CONTROL_PANEL             0x19E
594 #define UX_HOST_CLASS_HID_CONSUMER_AL_COMMAND_LINE_PROCESSOR    0x19F
595 #define UX_HOST_CLASS_HID_CONSUMER_AL_PROCESS_MANAGER           0x1A0
596 #define UX_HOST_CLASS_HID_CONSUMER_AL_SELECT_APPLICATION        0x1A1
597 #define UX_HOST_CLASS_HID_CONSUMER_AL_NEXT_APPLICATION          0x1A2
598 #define UX_HOST_CLASS_HID_CONSUMER_AL_PREVIOUS_APPLICATION      0x1A3
599 #define UX_HOST_CLASS_HID_CONSUMER_AL_PREEMPTIVE_HALT_APPLICATION 0x1A4
600 #define UX_HOST_CLASS_HID_CONSUMER_AL_INTEGRATED_HELP_CENTER    0x1A5
601 #define UX_HOST_CLASS_HID_CONSUMER_AL_DOCUMENTS                 0x1A6
602 #define UX_HOST_CLASS_HID_CONSUMER_AL_THESAURUS                 0x1A7
603 #define UX_HOST_CLASS_HID_CONSUMER_AL_DICTIONARY                0x1A8
604 #define UX_HOST_CLASS_HID_CONSUMER_AL_DESKTOP                   0x1A9
605 #define UX_HOST_CLASS_HID_CONSUMER_AL_SPELL_CHECK               0x1AA
606 #define UX_HOST_CLASS_HID_CONSUMER_AL_GRAMMAR_CHECK             0x1AB
607 #define UX_HOST_CLASS_HID_CONSUMER_AL_WIRELESS_STATUS           0x1AC
608 #define UX_HOST_CLASS_HID_CONSUMER_AL_KEYBOARD_LAYOUT           0x1AD
609 #define UX_HOST_CLASS_HID_CONSUMER_AL_VIRUS_PROTECTION          0x1AE
610 #define UX_HOST_CLASS_HID_CONSUMER_AL_ENCRYPTION                0x1AF
611 #define UX_HOST_CLASS_HID_CONSUMER_AL_SCREEN_SAVER              0x1B0
612 #define UX_HOST_CLASS_HID_CONSUMER_AL_ALARMS                    0x1B1
613 #define UX_HOST_CLASS_HID_CONSUMER_AL_CLOCK                     0x1B2
614 #define UX_HOST_CLASS_HID_CONSUMER_AL_FILE_BROWSER              0x1B3
615 #define UX_HOST_CLASS_HID_CONSUMER_AL_POWER_STATUS              0x1B4
616 #define UX_HOST_CLASS_HID_CONSUMER_AC_NEW                       0x1B5
617 #define UX_HOST_CLASS_HID_CONSUMER_AC_OPEN                      0x201
618 #define UX_HOST_CLASS_HID_CONSUMER_AC_CLOSE                     0x202
619 #define UX_HOST_CLASS_HID_CONSUMER_AC_EXIT                      0x203
620 #define UX_HOST_CLASS_HID_CONSUMER_AC_MAXIMIZE                  0x204
621 #define UX_HOST_CLASS_HID_CONSUMER_AC_MINIMIZE                  0x205
622 #define UX_HOST_CLASS_HID_CONSUMER_AC_SAVE                      0x206
623 #define UX_HOST_CLASS_HID_CONSUMER_AC_PRINT                     0x207
624 #define UX_HOST_CLASS_HID_CONSUMER_AC_PROPERTIES                0x208
625 #define UX_HOST_CLASS_HID_CONSUMER_AC_UNDO                      0x209
626 #define UX_HOST_CLASS_HID_CONSUMER_AC_COPY                      0x21A
627 #define UX_HOST_CLASS_HID_CONSUMER_AC_CUT                       0x21B
628 #define UX_HOST_CLASS_HID_CONSUMER_AC_PASTE                     0x21C
629 #define UX_HOST_CLASS_HID_CONSUMER_AC_SELECT_ALL                0x21D
630 #define UX_HOST_CLASS_HID_CONSUMER_AC_FIND                      0x21E
631 #define UX_HOST_CLASS_HID_CONSUMER_AC_FIND_AND_REPLACE          0x21F
632 #define UX_HOST_CLASS_HID_CONSUMER_AC_SEARCH                    0x220
633 #define UX_HOST_CLASS_HID_CONSUMER_AC_GO_TO                     0x221
634 #define UX_HOST_CLASS_HID_CONSUMER_AC_HOME                      0x222
635 #define UX_HOST_CLASS_HID_CONSUMER_AC_BACK                      0x223
636 #define UX_HOST_CLASS_HID_CONSUMER_AC_FORWARD                   0x224
637 #define UX_HOST_CLASS_HID_CONSUMER_AC_STOP                      0x225
638 #define UX_HOST_CLASS_HID_CONSUMER_AC_REFRESH                   0x226
639 #define UX_HOST_CLASS_HID_CONSUMER_AC_PREVIOUS_LINK             0x227
640 #define UX_HOST_CLASS_HID_CONSUMER_AC_NEXT_LINK                 0x228
641 #define UX_HOST_CLASS_HID_CONSUMER_AC_BOOKMARKS                 0x229
642 #define UX_HOST_CLASS_HID_CONSUMER_AC_HISTORY                   0x22A
643 #define UX_HOST_CLASS_HID_CONSUMER_AC_SUBSCRIPTIONS             0x22B
644 #define UX_HOST_CLASS_HID_CONSUMER_AC_ZOOM_IN                   0x22C
645 #define UX_HOST_CLASS_HID_CONSUMER_AC_ZOOM_OUT                  0x22D
646 #define UX_HOST_CLASS_HID_CONSUMER_AC_ZOOM                      0x22E
647 #define UX_HOST_CLASS_HID_CONSUMER_AC_FULL_SCREEN_VIEW          0x22F
648 #define UX_HOST_CLASS_HID_CONSUMER_AC_NORMAL_VIEW               0x230
649 #define UX_HOST_CLASS_HID_CONSUMER_AC_VIEW_TOGGLE               0x231
650 #define UX_HOST_CLASS_HID_CONSUMER_AC_SCROLL_UP                 0x232
651 #define UX_HOST_CLASS_HID_CONSUMER_AC_SCROLL_DOWN               0x233
652 #define UX_HOST_CLASS_HID_CONSUMER_AC_SCROLL                    0x234
653 #define UX_HOST_CLASS_HID_CONSUMER_AC_PAN_LEFT                  0x235
654 #define UX_HOST_CLASS_HID_CONSUMER_AC_PAN_RIGHT                 0x236
655 #define UX_HOST_CLASS_HID_CONSUMER_AC_PAN                       0x237
656 #define UX_HOST_CLASS_HID_CONSUMER_AC_NEW_WINDOW                0x238
657 #define UX_HOST_CLASS_HID_CONSUMER_AC_TILE_HORIZONTALLY         0x239
658 #define UX_HOST_CLASS_HID_CONSUMER_AC_TILE_VERTICALLY           0x23A
659 #define UX_HOST_CLASS_HID_CONSUMER_AC_FORMAT                    0x23B
660 #define UX_HOST_CLASS_HID_CONSUMER_AC_EDIT                      0x23C
661 #define UX_HOST_CLASS_HID_CONSUMER_AC_BOLD                      0x23D
662 #define UX_HOST_CLASS_HID_CONSUMER_AC_ITALICS                   0x23E
663 #define UX_HOST_CLASS_HID_CONSUMER_AC_UNDERLINE                 0x23F
664 #define UX_HOST_CLASS_HID_CONSUMER_AC_STRIKETHROUGH             0x240
665 #define UX_HOST_CLASS_HID_CONSUMER_AC_SUBSCRIPT                 0x241
666 #define UX_HOST_CLASS_HID_CONSUMER_AC_SUPERSCRIPT               0x242
667 #define UX_HOST_CLASS_HID_CONSUMER_AC_ALL_CAPS                  0x243
668 #define UX_HOST_CLASS_HID_CONSUMER_AC_ROTATE                    0x244
669 #define UX_HOST_CLASS_HID_CONSUMER_AC_RESIZE                    0x245
670 #define UX_HOST_CLASS_HID_CONSUMER_AC_FLIP_HORIZONTAL           0x246
671 #define UX_HOST_CLASS_HID_CONSUMER_AC_FLIP_VERTICAL             0x247
672 #define UX_HOST_CLASS_HID_CONSUMER_AC_MIRROR_HORIZONTAL         0x248
673 #define UX_HOST_CLASS_HID_CONSUMER_AC_MIRROR_VERTICAL           0x249
674 #define UX_HOST_CLASS_HID_CONSUMER_AC_FONT_SELECT               0x24A
675 #define UX_HOST_CLASS_HID_CONSUMER_AC_FONT_COLOR                0x24B
676 #define UX_HOST_CLASS_HID_CONSUMER_AC_FONT_SIZE                 0x24C
677 #define UX_HOST_CLASS_HID_CONSUMER_AC_JUSTIFY_LEFT              0x24D
678 #define UX_HOST_CLASS_HID_CONSUMER_AC_JUSTIFY_CENTER_H          0x24E
679 #define UX_HOST_CLASS_HID_CONSUMER_AC_JUSTIFY_RIGHT             0x24F
680 #define UX_HOST_CLASS_HID_CONSUMER_AC_JUSTIFY_BLOCK_H           0x250
681 #define UX_HOST_CLASS_HID_CONSUMER_AC_JUSTIFY_TOP               0x251
682 #define UX_HOST_CLASS_HID_CONSUMER_AC_JUSTIFY_CENTER_V          0x252
683 #define UX_HOST_CLASS_HID_CONSUMER_AC_JUSTIFY_BOTTOM            0x253
684 #define UX_HOST_CLASS_HID_CONSUMER_AC_JUSTIFY_BLOCK_V           0x254
685 #define UX_HOST_CLASS_HID_CONSUMER_AC_INDENT_DECREASE           0x255
686 #define UX_HOST_CLASS_HID_CONSUMER_AC_INDENT_INCREASE           0x256
687 #define UX_HOST_CLASS_HID_CONSUMER_AC_NUMBERED_LIST             0x257
688 #define UX_HOST_CLASS_HID_CONSUMER_AC_RESTART_NUMBERING         0x258
689 #define UX_HOST_CLASS_HID_CONSUMER_AC_BULLETED_LIST             0x259
690 #define UX_HOST_CLASS_HID_CONSUMER_AC_PROMOTE                   0x25A
691 #define UX_HOST_CLASS_HID_CONSUMER_AC_DEMOTE                    0x25B
692 #define UX_HOST_CLASS_HID_CONSUMER_AC_YES                       0x25C
693 #define UX_HOST_CLASS_HID_CONSUMER_AC_NO                        0x25D
694 #define UX_HOST_CLASS_HID_CONSUMER_AC_CANCEL                    0x25E
695 #define UX_HOST_CLASS_HID_CONSUMER_AC_CATALOG                   0x25F
696 #define UX_HOST_CLASS_HID_CONSUMER_AC_BUY_CHECKOUT              0x260
697 #define UX_HOST_CLASS_HID_CONSUMER_AC_ADD_TO_CART               0x261
698 #define UX_HOST_CLASS_HID_CONSUMER_AC_EXPAND                    0x262
699 #define UX_HOST_CLASS_HID_CONSUMER_AC_EXPAND_ALL                0x263
700 #define UX_HOST_CLASS_HID_CONSUMER_AC_COLLAPSE                  0x264
701 #define UX_HOST_CLASS_HID_CONSUMER_AC_COLLAPSE_ALL              0x265
702 #define UX_HOST_CLASS_HID_CONSUMER_AC_PRINT_PREVIEW             0x266
703 #define UX_HOST_CLASS_HID_CONSUMER_AC_PASTE_SPECIAL             0x267
704 #define UX_HOST_CLASS_HID_CONSUMER_AC_INSERT_MODE               0x268
705 #define UX_HOST_CLASS_HID_CONSUMER_AC_DELETE                    0x269
706 #define UX_HOST_CLASS_HID_CONSUMER_AC_LOCK                      0x26A
707 #define UX_HOST_CLASS_HID_CONSUMER_AC_UNLOCK                    0x26B
708 #define UX_HOST_CLASS_HID_CONSUMER_AC_PROTECT                   0x26C
709 #define UX_HOST_CLASS_HID_CONSUMER_AC_UNPROTECT                 0x26D
710 #define UX_HOST_CLASS_HID_CONSUMER_AC_ATTACH_COMMENT            0x26E
711 #define UX_HOST_CLASS_HID_CONSUMER_AC_DELETE_COMMENT            0x26F
712 #define UX_HOST_CLASS_HID_CONSUMER_AC_VIEW_COMMENT              0x270
713 #define UX_HOST_CLASS_HID_CONSUMER_AC_SELECT_WORD               0x271
714 #define UX_HOST_CLASS_HID_CONSUMER_AC_SELECT_SENTENCE           0x272
715 #define UX_HOST_CLASS_HID_CONSUMER_AC_SELECT_PARAGRAPH          0x273
716 #define UX_HOST_CLASS_HID_CONSUMER_AC_SELECT_COLUMN             0x274
717 #define UX_HOST_CLASS_HID_CONSUMER_AC_SELECT_ROW                0x275
718 #define UX_HOST_CLASS_HID_CONSUMER_AC_SELECT_TABLE              0x276
719 #define UX_HOST_CLASS_HID_CONSUMER_AC_SELECT_OBJECT             0x277
720 #define UX_HOST_CLASS_HID_CONSUMER_AC_REDO_REPEAT               0x278
721 #define UX_HOST_CLASS_HID_CONSUMER_AC_SORT                      0x279
722 #define UX_HOST_CLASS_HID_CONSUMER_AC_SORT_ASCENDING            0x27A
723 #define UX_HOST_CLASS_HID_CONSUMER_AC_SORT_DESCENDING           0x27B
724 #define UX_HOST_CLASS_HID_CONSUMER_AC_FILTER                    0x27C
725 #define UX_HOST_CLASS_HID_CONSUMER_AC_SET_CLOCK                 0x27D
726 #define UX_HOST_CLASS_HID_CONSUMER_AC_VIEW_CLOCK                0x27E
727 #define UX_HOST_CLASS_HID_CONSUMER_AC_SELECT_TIME_ZONE          0x27F
728 #define UX_HOST_CLASS_HID_CONSUMER_AC_EDIT_TIME_ZONES           0x280
729 #define UX_HOST_CLASS_HID_CONSUMER_AC_SET_ALARM                 0x281
730 #define UX_HOST_CLASS_HID_CONSUMER_AC_CLEAR_ALARM               0x282
731 #define UX_HOST_CLASS_HID_CONSUMER_AC_SNOOZE_ALARM              0x283
732 #define UX_HOST_CLASS_HID_CONSUMER_AC_RESET_ALARM               0x284
733 #define UX_HOST_CLASS_HID_CONSUMER_AC_SYNCHRONIZE               0x285
734 #define UX_HOST_CLASS_HID_CONSUMER_AC_SEND_RECEIVE              0x286
735 #define UX_HOST_CLASS_HID_CONSUMER_AC_SEND_TO                   0x287
736 #define UX_HOST_CLASS_HID_CONSUMER_AC_REPLY                     0x288
737 #define UX_HOST_CLASS_HID_CONSUMER_AC_REPLY_ALL                 0x289
738 #define UX_HOST_CLASS_HID_CONSUMER_AC_FORWARD_MSG               0x28A
739 #define UX_HOST_CLASS_HID_CONSUMER_AC_SEND                      0x28B
740 #define UX_HOST_CLASS_HID_CONSUMER_AC_ATTACH_FILE               0x28C
741 #define UX_HOST_CLASS_HID_CONSUMER_AC_UPLOAD                    0x28D
742 #define UX_HOST_CLASS_HID_CONSUMER_AC_DOWNLOAD                  0x28E
743 #define UX_HOST_CLASS_HID_CONSUMER_AC_SET_BORDERS               0x28F
744 #define UX_HOST_CLASS_HID_CONSUMER_AC_INSERT_ROW                0x290
745 #define UX_HOST_CLASS_HID_CONSUMER_AC_INSERT_COLUMN             0x291
746 #define UX_HOST_CLASS_HID_CONSUMER_AC_INSERT_FILE               0x292
747 #define UX_HOST_CLASS_HID_CONSUMER_AC_INSERT_PICTURE            0x293
748 #define UX_HOST_CLASS_HID_CONSUMER_AC_INSERT_OBJECT             0x294
749 #define UX_HOST_CLASS_HID_CONSUMER_AC_INSERT_SYMBOL             0x295
750 #define UX_HOST_CLASS_HID_CONSUMER_AC_SAVE_CLOSE                0x296
751 #define UX_HOST_CLASS_HID_CONSUMER_AC_RENAME                    0x297
752 #define UX_HOST_CLASS_HID_CONSUMER_AC_MERGE                     0x298
753 #define UX_HOST_CLASS_HID_CONSUMER_AC_SPLIT                     0x299
754 #define UX_HOST_CLASS_HID_CONSUMER_AC_DISRIBUTE_HORIZONTALLY    0x29A
755 #define UX_HOST_CLASS_HID_CONSUMER_AC_DISTRIBUTE_VERTICALLY     0x29B
756 
757 /* Define HID Report Types.  */
758 
759 #define UX_HOST_CLASS_HID_REPORT_TYPE_INPUT                     0x1
760 #define UX_HOST_CLASS_HID_REPORT_TYPE_OUTPUT                    0x2
761 #define UX_HOST_CLASS_HID_REPORT_TYPE_FEATURE                   0x3
762 
763 /* Define HID Class report callback structure.  */
764 
765 #ifndef UX_HOST_CLASS_HID_USAGES
766 #define UX_HOST_CLASS_HID_USAGES                                1024
767 #endif
768 
769 #define UX_HOST_CLASS_HID_MAX_GLOBAL                            4
770 #define UX_HOST_CLASS_HID_MAX_COLLECTION                        4
771 
772 /* Define HID flags.  */
773 #define UX_HOST_CLASS_HID_FLAG_LOCK                             1ul
774 #define UX_HOST_CLASS_HID_FLAG_PROTECT                          2ul
775 
776 #ifndef UX_HOST_CLASS_HID_REPORT_TRANSFER_TIMEOUT
777 #define UX_HOST_CLASS_HID_REPORT_TRANSFER_TIMEOUT               10000
778 #endif
779 
780 /* Define HID Class descriptor.  */
781 
782 typedef struct UX_HID_DESCRIPTOR_STRUCT
783 {
784 
785     ULONG           bLength;
786     ULONG           bDescriptorType;
787     ULONG           bcdHID;
788     ULONG           bCountryCode;
789     ULONG           bNumDescriptor;
790     ULONG           bReportDescriptorType;
791     ULONG           wItemLength;
792 } UX_HID_DESCRIPTOR;
793 
794 
795 typedef struct UX_HOST_CLASS_HID_REPORT_CALLBACK_STRUCT
796 {
797 
798     struct UX_HOST_CLASS_HID_CLIENT_STRUCT
799                     *ux_host_class_hid_report_callback_client;
800     ULONG           ux_host_class_hid_report_callback_id;
801     ULONG           ux_host_class_hid_report_callback_status;
802     ULONG           ux_host_class_hid_report_callback_flags;
803     ULONG           ux_host_class_hid_report_callback_value;
804     ULONG           ux_host_class_hid_report_callback_usage;
805     ULONG           ux_host_class_hid_report_callback_length;
806     ULONG           ux_host_class_hid_report_callback_actual_length;
807     VOID            *ux_host_class_hid_report_callback_buffer;
808     VOID            (*ux_host_class_hid_report_callback_function) (struct UX_HOST_CLASS_HID_REPORT_CALLBACK_STRUCT *);
809 } UX_HOST_CLASS_HID_REPORT_CALLBACK;
810 
811 
812 
813 typedef struct UX_HOST_CLASS_HID_REPORT_GET_ID_STRUCT
814 {
815 
816     ULONG           ux_host_class_hid_report_get_id;
817     ULONG           ux_host_class_hid_report_get_type;
818     struct UX_HOST_CLASS_HID_REPORT_STRUCT
819                     *ux_host_class_hid_report_get_report;
820 } UX_HOST_CLASS_HID_REPORT_GET_ID;
821 
822 
823 /* Define HID Class local item structure.  */
824 
825 typedef struct UX_HOST_CLASS_HID_LOCAL_ITEM_STRUCT
826 {
827 
828     ULONG           ux_host_class_hid_local_item_usages[UX_HOST_CLASS_HID_USAGES];
829     ULONG           ux_host_class_hid_local_item_number_usage;
830     ULONG           ux_host_class_hid_local_item_usage_min;
831     ULONG           ux_host_class_hid_local_item_usage_max;
832     ULONG           ux_host_class_hid_local_item_delimiter_level;
833     ULONG           ux_host_class_hid_local_item_delimiter_branch;
834 } UX_HOST_CLASS_HID_LOCAL_ITEM;
835 
836 
837 /* Define HID Class global item structure.  */
838 
839 typedef struct UX_HOST_CLASS_HID_GLOBAL_ITEM_STRUCT
840 {
841 
842     ULONG           ux_host_class_hid_global_item_usage_page;
843     SLONG           ux_host_class_hid_global_item_logical_min;
844     SLONG           ux_host_class_hid_global_item_logical_max;
845     SLONG           ux_host_class_hid_global_item_physical_min;
846     SLONG           ux_host_class_hid_global_item_physical_max;
847     ULONG           ux_host_class_hid_global_item_unit_expo;
848     ULONG           ux_host_class_hid_global_item_unit;
849     ULONG           ux_host_class_hid_global_item_report_size;
850     ULONG           ux_host_class_hid_global_item_report_id;
851     ULONG           ux_host_class_hid_global_item_report_count;
852 } UX_HOST_CLASS_HID_GLOBAL_ITEM;
853 
854 
855 /* Define HID Class field structure.  */
856 
857 typedef struct UX_HOST_CLASS_HID_FIELD_STRUCT
858 {
859 
860     ULONG           ux_host_class_hid_field_physical;
861     ULONG           ux_host_class_hid_field_logical;
862     ULONG           ux_host_class_hid_field_application;
863     ULONG           ux_host_class_hid_field_usage_page;
864     ULONG           ux_host_class_hid_field_usage_min;
865     ULONG           ux_host_class_hid_field_usage_max;
866     SLONG           ux_host_class_hid_field_logical_min;
867     SLONG           ux_host_class_hid_field_logical_max;
868     SLONG           ux_host_class_hid_field_physical_min;
869     SLONG           ux_host_class_hid_field_physical_max;
870     ULONG           ux_host_class_hid_field_unit;
871     ULONG           ux_host_class_hid_field_unit_expo;
872     ULONG           ux_host_class_hid_field_report_type;
873     ULONG           ux_host_class_hid_field_report_id;
874     ULONG           ux_host_class_hid_field_report_offset;
875     ULONG           ux_host_class_hid_field_report_size;
876     ULONG           ux_host_class_hid_field_report_count;
877     ULONG           ux_host_class_hid_field_value;
878     ULONG           *ux_host_class_hid_field_usages;
879     ULONG           ux_host_class_hid_field_number_usage;
880     ULONG           *ux_host_class_hid_field_values;
881     ULONG           ux_host_class_hid_field_number_values;
882     struct UX_HOST_CLASS_HID_REPORT_STRUCT
883                     *ux_host_class_hid_field_report;
884     struct UX_HOST_CLASS_HID_FIELD_STRUCT
885                     *ux_host_class_hid_field_next_field;
886 } UX_HOST_CLASS_HID_FIELD;
887 
888 
889 /* Define HID Class report structure.  */
890 
891 typedef struct UX_HOST_CLASS_HID_REPORT_STRUCT
892 {
893 
894     ULONG           ux_host_class_hid_report_id;
895     ULONG           ux_host_class_hid_report_type;
896     struct UX_HOST_CLASS_HID_FIELD_STRUCT
897                     *ux_host_class_hid_report_field;
898     ULONG           ux_host_class_hid_report_number_item;
899     ULONG           ux_host_class_hid_report_byte_length;
900     ULONG           ux_host_class_hid_report_bit_length;
901     ULONG           ux_host_class_hid_report_callback_flags;
902     VOID            *ux_host_class_hid_report_callback_buffer;
903     ULONG           ux_host_class_hid_report_callback_length;
904     VOID            (*ux_host_class_hid_report_callback_function) (struct UX_HOST_CLASS_HID_REPORT_CALLBACK_STRUCT *);
905     struct UX_HOST_CLASS_HID_REPORT_STRUCT
906                     *ux_host_class_hid_report_next_report;
907 } UX_HOST_CLASS_HID_REPORT;
908 
909 
910 /* Define HID main parser structure.  */
911 
912 typedef struct UX_HOST_CLASS_HID_PARSER_STRUCT
913 {
914 
915     UX_HOST_CLASS_HID_GLOBAL_ITEM
916                     ux_host_class_hid_parser_global;
917     UX_HOST_CLASS_HID_GLOBAL_ITEM
918                     ux_host_class_hid_parser_global_pool[UX_HOST_CLASS_HID_MAX_GLOBAL];
919     ULONG           ux_host_class_hid_parser_number_global;
920     UX_HOST_CLASS_HID_LOCAL_ITEM
921                     ux_host_class_hid_parser_local;
922     ULONG           ux_host_class_hid_parser_application;
923     ULONG           ux_host_class_hid_parser_collection[UX_HOST_CLASS_HID_MAX_COLLECTION];
924     ULONG           ux_host_class_hid_parser_number_collection;
925     ULONG           ux_host_class_hid_parser_main_page;
926     ULONG           ux_host_class_hid_parser_main_usage;
927     UX_HOST_CLASS_HID_REPORT
928                     *ux_host_class_hid_parser_input_report;
929     UX_HOST_CLASS_HID_REPORT
930                     *ux_host_class_hid_parser_output_report;
931     UX_HOST_CLASS_HID_REPORT
932                     *ux_host_class_hid_parser_feature_report;
933 } UX_HOST_CLASS_HID_PARSER;
934 
935 
936 /* Define HID Class item analysis structure.  */
937 
938 typedef struct UX_HOST_CLASS_HID_ITEM_STRUCT
939 {
940 
941     UCHAR           ux_host_class_hid_item_report_type;
942     UCHAR           ux_host_class_hid_item_report_tag;
943     USHORT          ux_host_class_hid_item_report_length;
944     USHORT          ux_host_class_hid_item_report_format;
945 }  UX_HOST_CLASS_HID_ITEM;
946 
947 
948 /* Define HID Class instance structure.  */
949 
950 typedef struct UX_HOST_CLASS_HID_STRUCT
951 {
952 
953     struct UX_HOST_CLASS_HID_STRUCT
954                     *ux_host_class_hid_next_instance;
955     UX_HOST_CLASS   *ux_host_class_hid_class;
956     UX_DEVICE       *ux_host_class_hid_device;
957     UX_ENDPOINT     *ux_host_class_hid_interrupt_endpoint;
958 #if defined(UX_HOST_CLASS_HID_INTERRUPT_OUT_SUPPORT)
959     UX_ENDPOINT     *ux_host_class_hid_interrupt_out_endpoint;
960 #endif
961     UINT            ux_host_class_hid_interrupt_endpoint_status;
962     UX_INTERFACE    *ux_host_class_hid_interface;
963     ULONG           ux_host_class_hid_state;
964     struct UX_HID_DESCRIPTOR_STRUCT
965                     ux_host_class_hid_descriptor;
966     UX_HOST_CLASS_HID_PARSER
967                     ux_host_class_hid_parser;
968     struct UX_HOST_CLASS_HID_CLIENT_STRUCT
969                     *ux_host_class_hid_client;
970 #if !defined(UX_HOST_STANDALONE)
971     UX_SEMAPHORE    ux_host_class_hid_semaphore;
972 #else
973     ULONG           ux_host_class_hid_flags;
974     UCHAR           *ux_host_class_hid_allocated;
975     UINT            ux_host_class_hid_status;
976     UCHAR           ux_host_class_hid_enum_state;
977     UCHAR           ux_host_class_hid_next_state;
978     UCHAR           ux_host_class_hid_cmd_state;
979     UCHAR           reserved[1];
980 #endif
981 } UX_HOST_CLASS_HID;
982 
983 #if defined(UX_HOST_STANDALONE)
984 #define _ux_host_class_hid_lock_fail_return(hid)                                \
985     UX_DISABLE                                                                  \
986     if (hid -> ux_host_class_hid_flags & UX_HOST_CLASS_HID_FLAG_LOCK)           \
987     {                                                                           \
988         UX_RESTORE                                                              \
989         status = UX_BUSY;                                                       \
990         return(status);                                                         \
991     }                                                                           \
992     hid -> ux_host_class_hid_flags |= UX_HOST_CLASS_HID_FLAG_LOCK;              \
993     UX_RESTORE
994 #define _ux_host_class_hid_unlock(hid) do {                                     \
995         hid -> ux_host_class_hid_flags &= ~UX_HOST_CLASS_HID_FLAG_LOCK;         \
996     } while(0)
997 #else
998 #define _ux_host_class_hid_lock_fail_return(hid)                                \
999     status =  _ux_host_semaphore_get(&hid -> ux_host_class_hid_semaphore,       \
1000                                     UX_WAIT_FOREVER);                           \
1001     if (status != UX_SUCCESS)                                                   \
1002         return(status);
1003 #define _ux_host_class_hid_unlock(hid)                                          \
1004     _ux_host_semaphore_put(&hid -> ux_host_class_hid_semaphore);
1005 #endif
1006 
1007 
1008 /* Define HID Class client command format structure.  */
1009 
1010 typedef struct UX_HOST_CLASS_HID_CLIENT_COMMAND_STRUCT
1011 {
1012 
1013     UINT            ux_host_class_hid_client_command_request;
1014     VOID            *ux_host_class_hid_client_command_container;
1015     UX_HOST_CLASS_HID    *ux_host_class_hid_client_command_instance;
1016     ULONG           ux_host_class_hid_client_command_page;
1017     ULONG           ux_host_class_hid_client_command_usage;
1018 } UX_HOST_CLASS_HID_CLIENT_COMMAND;
1019 
1020 
1021 /* Define HID Class report command structure.  */
1022 
1023 typedef struct UX_HOST_CLASS_HID_CLIENT_REPORT_STRUCT
1024 {
1025 
1026     UX_HOST_CLASS_HID_REPORT
1027                     *ux_host_class_hid_client_report;
1028     ULONG           *ux_host_class_hid_client_report_buffer;
1029     ULONG           ux_host_class_hid_client_report_length;
1030     ULONG           ux_host_class_hid_client_report_actual_length;
1031     UINT            ux_host_class_hid_client_report_flags;
1032 } UX_HOST_CLASS_HID_CLIENT_REPORT;
1033 
1034 
1035 /* Define HID Class client structure.  */
1036 
1037 typedef struct UX_HOST_CLASS_HID_CLIENT_STRUCT
1038 {
1039 
1040     ULONG           ux_host_class_hid_client_status;
1041 #if defined(UX_NAME_REFERENCED_BY_POINTER)
1042     UCHAR           *ux_host_class_hid_client_name;
1043 #else
1044     UCHAR           ux_host_class_hid_client_name[UX_HOST_CLASS_HID_MAX_CLIENT_NAME_LENGTH + 1]; /* "+1" for string null-terminator */
1045 #endif
1046     UINT            (*ux_host_class_hid_client_handler) (struct UX_HOST_CLASS_HID_CLIENT_COMMAND_STRUCT *);
1047     VOID            *ux_host_class_hid_client_local_instance;
1048 #if defined(UX_HOST_STANDALONE)
1049     VOID            (*ux_host_class_hid_client_function)(struct UX_HOST_CLASS_HID_CLIENT_STRUCT *);
1050 #endif
1051 } UX_HOST_CLASS_HID_CLIENT;
1052 
1053 /* Define HID Class function prototypes.  */
1054 
1055 UINT    _ux_host_class_hid_activate(UX_HOST_CLASS_COMMAND  *command);
1056 UINT    _ux_host_class_hid_client_register(UCHAR *hid_client_name,
1057                                 UINT (*hid_client_handler)(struct UX_HOST_CLASS_HID_CLIENT_COMMAND_STRUCT *));
1058 UINT    _ux_host_class_hid_client_search(UX_HOST_CLASS_HID *hid);
1059 UINT    _ux_host_class_hid_configure(UX_HOST_CLASS_HID *hid);
1060 UINT    _ux_host_class_hid_deactivate(UX_HOST_CLASS_COMMAND *command);
1061 UINT    _ux_host_class_hid_descriptor_parse(UX_HOST_CLASS_HID *hid);
1062 UINT    _ux_host_class_hid_entry(UX_HOST_CLASS_COMMAND *command);
1063 UINT    _ux_host_class_hid_field_decompress(UX_HOST_CLASS_HID_FIELD *hid_field, UCHAR *report_buffer, UX_HOST_CLASS_HID_CLIENT_REPORT *client_report);
1064 UINT    _ux_host_class_hid_global_item_parse(UX_HOST_CLASS_HID *hid, UX_HOST_CLASS_HID_ITEM *item, UCHAR *descriptor);
1065 UINT    _ux_host_class_hid_idle_get(UX_HOST_CLASS_HID *hid, USHORT *idle_time, USHORT report_id);
1066 UINT    _ux_host_class_hid_idle_set(UX_HOST_CLASS_HID *hid, USHORT idle_time, USHORT report_id);
1067 UINT    _ux_host_class_hid_instance_clean(UX_HOST_CLASS_HID *hid);
1068 UINT    _ux_host_class_hid_interrupt_endpoint_search(UX_HOST_CLASS_HID *hid);
1069 ULONG   _ux_host_class_hid_item_data_get(UCHAR *descriptor, UX_HOST_CLASS_HID_ITEM *item);
1070 UINT    _ux_host_class_hid_local_item_parse(UX_HOST_CLASS_HID *hid, UX_HOST_CLASS_HID_ITEM *item, UCHAR *descriptor);
1071 UINT    _ux_host_class_hid_main_item_parse(UX_HOST_CLASS_HID *hid, UX_HOST_CLASS_HID_ITEM *item, UCHAR *descriptor);
1072 UINT    _ux_host_class_hid_periodic_report_start(UX_HOST_CLASS_HID *hid);
1073 UINT    _ux_host_class_hid_periodic_report_stop(UX_HOST_CLASS_HID *hid);
1074 UINT    _ux_host_class_hid_report_add(UX_HOST_CLASS_HID *hid, UCHAR *descriptor, UX_HOST_CLASS_HID_ITEM *item);
1075 UINT    _ux_host_class_hid_report_callback_register(UX_HOST_CLASS_HID *hid, UX_HOST_CLASS_HID_REPORT_CALLBACK *call_back);
1076 UINT    _ux_host_class_hid_report_compress(UX_HOST_CLASS_HID *hid, UX_HOST_CLASS_HID_CLIENT_REPORT *client_report,
1077                                                     UCHAR *report_buffer, ULONG report_length);
1078 UINT    _ux_host_class_hid_report_decompress(UX_HOST_CLASS_HID *hid, UX_HOST_CLASS_HID_CLIENT_REPORT *client_report,
1079                                                     UCHAR  *report_buffer, ULONG report_length);
1080 UINT    _ux_host_class_hid_report_descriptor_get(UX_HOST_CLASS_HID *hid, ULONG length);
1081 UINT    _ux_host_class_hid_report_get(UX_HOST_CLASS_HID *hid, UX_HOST_CLASS_HID_CLIENT_REPORT *client_report);
1082 UINT    _ux_host_class_hid_report_id_get(UX_HOST_CLASS_HID *hid, UX_HOST_CLASS_HID_REPORT_GET_ID *report_id);
1083 UINT    _ux_host_class_hid_report_item_analyse(UCHAR *descriptor, UX_HOST_CLASS_HID_ITEM *item);
1084 UINT    _ux_host_class_hid_report_set(UX_HOST_CLASS_HID *hid, UX_HOST_CLASS_HID_CLIENT_REPORT *client_report);
1085 UINT    _ux_host_class_hid_resources_free(UX_HOST_CLASS_HID *hid);
1086 VOID    _ux_host_class_hid_transfer_request_completed(UX_TRANSFER *transfer_request);
1087 
1088 UINT    _ux_host_class_hid_tasks_run(UX_HOST_CLASS *hid_class);
1089 UINT    _ux_host_class_hid_idle_set_run(UX_HOST_CLASS_HID *hid, USHORT idle_time, USHORT report_id);
1090 UINT    _ux_host_class_hid_report_set_run(UX_HOST_CLASS_HID *hid, UX_HOST_CLASS_HID_CLIENT_REPORT *client_report);
1091 
1092 /* Define HID Class API prototypes.  */
1093 
1094 #define ux_host_class_hid_client_register                   _ux_host_class_hid_client_register
1095 #define ux_host_class_hid_client_search                     _ux_host_class_hid_client_search
1096 #define ux_host_class_hid_descriptor_parse                  _ux_host_class_hid_descriptor_parse
1097 #define ux_host_class_hid_entry                             _ux_host_class_hid_entry
1098 #define ux_host_class_hid_idle_get                          _ux_host_class_hid_idle_get
1099 #define ux_host_class_hid_idle_set                          _ux_host_class_hid_idle_set
1100 #define ux_host_class_hid_periodic_report_start             _ux_host_class_hid_periodic_report_start
1101 #define ux_host_class_hid_periodic_report_stop              _ux_host_class_hid_periodic_report_stop
1102 #define ux_host_class_hid_report_add                        _ux_host_class_hid_report_add
1103 #define ux_host_class_hid_report_callback_register          _ux_host_class_hid_report_callback_register
1104 #define ux_host_class_hid_report_descriptor_get             _ux_host_class_hid_report_descriptor_get
1105 #define ux_host_class_hid_report_get                        _ux_host_class_hid_report_get
1106 #define ux_host_class_hid_report_id_get                     _ux_host_class_hid_report_id_get
1107 #define ux_host_class_hid_report_set                        _ux_host_class_hid_report_set
1108 
1109 /* Determine if a C++ compiler is being used.  If so, complete the standard
1110    C conditional started above.  */
1111 #ifdef __cplusplus
1112 }
1113 #endif
1114 
1115 #endif
1116 
1117