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