Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

98 lines
3.7 KiB

  1. /*++
  2. Copyright (c) 1996 Microsoft Corporation
  3. Module Name:
  4. HIDPI.H
  5. Abstract:
  6. Public Definitions of HID USAGES.
  7. Environment:
  8. Kernel & user mode
  9. Revision History:
  10. Aug-1996 : created Kenneth D. Ray
  11. --*/
  12. #ifndef _HIDTOKEN_H
  13. #define _HIDTOKEN_H
  14. #define HIDP_ITEM_LONG 0xFE
  15. #define HIDP_ITEM_LENGTH_DATA 0x03
  16. #define HIDP_IS_MAIN_ITEM(item) (((item) & 0xC) == 0x0)
  17. #define HIDP_IS_GLOBAL_ITEM(item) (((item) & 0xC) == 0x4)
  18. #define HIDP_IS_LOCAL_ITEM(item) (((item) & 0xC) == 0x8)
  19. #define HIDP_IS_RESERVED_ITEM(item) (((item) & 0xC) == 0xC)
  20. // Main Items
  21. // Only main items with one byte data (bSize = 1) are supported.
  22. #define HIDP_MAIN_INPUT_1 0x81
  23. #define HIDP_MAIN_INPUT_2 0x82
  24. #define HIDP_MAIN_OUTPUT_1 0x91
  25. #define HIDP_MAIN_OUTPUT_2 0x92
  26. #define HIDP_MAIN_FEATURE_1 0xB1
  27. #define HIDP_MAIN_FEATURE_2 0xB2
  28. #define HIDP_MAIN_COLLECTION 0xA1
  29. #define HIDP_MAIN_ENDCOLLECTION 0xC0
  30. #define HIDP_ISMAIN(x) (0 == ((x) & 0x0C))
  31. #define HIDP_MAIN_COLLECTION_LINK 0x00
  32. #define HIDP_MAIN_COLLECTION_APP 0x01
  33. // Global Items
  34. #define HIDP_GLOBAL_USAGE_PAGE_1 0x05 // UsagePage of 1 byte
  35. #define HIDP_GLOBAL_USAGE_PAGE_2 0x06 // UsagePage of 2 bytes
  36. #define HIDP_GLOBAL_USAGE_PAGE_4 0x07 // UsagePage of 4 bytes
  37. #define HIDP_GLOBAL_LOG_MIN_1 0x15 // minimum value of size 1 byte.
  38. #define HIDP_GLOBAL_LOG_MIN_2 0x16 // minimum value of size 2 bytes.
  39. #define HIDP_GLOBAL_LOG_MIN_4 0x17 // minimum value of size 4 bytes.
  40. #define HIDP_GLOBAL_LOG_MAX_1 0X25 // maximum of size 1 byte.
  41. #define HIDP_GLOBAL_LOG_MAX_2 0X26 // maximum of size 2 bytes.
  42. #define HIDP_GLOBAL_LOG_MAX_4 0X27 // maximum of size 4 bytes.
  43. #define HIDP_GLOBAL_PHY_MIN_1 0x35 // minimum value of size 1 byte.
  44. #define HIDP_GLOBAL_PHY_MIN_2 0x36 // minimum value of size 2 bytes.
  45. #define HIDP_GLOBAL_PHY_MIN_4 0x37 // minimum value of size 4 bytes.
  46. #define HIDP_GLOBAL_PHY_MAX_1 0X45 // maximum of size 1 byte.
  47. #define HIDP_GLOBAL_PHY_MAX_2 0X46 // maximum of size 2 bytes.
  48. #define HIDP_GLOBAL_PHY_MAX_4 0X47 // maximum of size 4 bytes.
  49. #define HIDP_GLOBAL_UNIT_EXP_1 0x55 // Exponent of size 1 byte.
  50. #define HIDP_GLOBAL_UNIT_EXP_2 0x56 // Exponent of size 2 bytes.
  51. #define HIDP_GLOBAL_UNIT_EXP_4 0x57 // Exponent of size 4 bytes.
  52. #define HIDP_GLOBAL_UNIT_1 0x65 // UNIT of size 1 byte.
  53. #define HIDP_GLOBAL_UNIT_2 0x66 // UNIT of size 2 bytes.
  54. #define HIDP_GLOBAL_UNIT_4 0x67 // UNIT of size 4 bytes.
  55. #define HIDP_GLOBAL_REPORT_SIZE 0x75 // Report size in bits
  56. #define HIDP_GLOBAL_REPORT_ID 0x85 // ID only size 1 byte supported
  57. #define HIDP_GLOBAL_REPORT_COUNT_1 0x95 // Number of data fields 1 byte
  58. #define HIDP_GLOBAL_REPORT_COUNT_2 0x96 // Number of data fields 2 bytes
  59. #define HIDP_GLOBAL_PUSH 0xA4 // The dreaded PUSH command
  60. #define HIDP_GLOBAL_POP 0xB4 // And the dreaded POP command
  61. // Local Items
  62. #define HIDP_LOCAL_USAGE_1 0x09 //
  63. #define HIDP_LOCAL_USAGE_2 0x0A //
  64. #define HIDP_LOCAL_USAGE_4 0x0B //
  65. #define HIDP_LOCAL_USAGE_MIN_1 0x19
  66. #define HIDP_LOCAL_USAGE_MIN_2 0x1A
  67. #define HIDP_LOCAL_USAGE_MIN_4 0x1B
  68. #define HIDP_LOCAL_USAGE_MAX_1 0x29
  69. #define HIDP_LOCAL_USAGE_MAX_2 0x2A
  70. #define HIDP_LOCAL_USAGE_MAX_4 0x2B
  71. #define HIDP_LOCAL_DESIG_INDEX 0x39 // Designators of byte size supported
  72. #define HIDP_LOCAL_DESIG_MIN 0x49
  73. #define HIDP_LOCAL_DESIG_MAX 0x59
  74. #define HIDP_LOCAL_STRING_INDEX 0x79 // String indices of size byte supported
  75. #define HIDP_LOCAL_STRING_MIN 0x89
  76. #define HIDP_LOCAL_STRING_MAX 0x99
  77. #define HIDP_LOCAL_DELIMITER 0xA9
  78. #endif
  79.