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.

210 lines
6.0 KiB

  1. Descriptor Tool, Version 2.4
  2. The major changes to 2.4 are:
  3. 1) Fixed monitor enumerated values. Needed to have usage 1 display "Enum 0".
  4. Added REPEATING0 option to .UPG files to fix this.
  5. 2) Added a title bar to the Usage Page Dialog box.
  6. 3) Fixed incorrect Extended Usages during inital insertion.
  7. 4) Added concatonation of Ordinal Instance value to Usages in collection
  8. immediately following Ordinal declaration.
  9. 5) Fixed display of Extended Usages when No Data option is selected.
  10. 6) Added support for Vendor Defined Usage Tables.
  11. The major changes to Version 2.3 are:
  12. 1) added sizable window
  13. The major changes to 2.0 are:
  14. 1) Incorporated the HID syntax checker from HIDview.
  15. 2) The Usage Pages are all ASCII files that can be modified by the user.
  16. 3) Extended Usages are supported.
  17. 4) Added cut and paste.
  18. 5) Report Descriptors files can be saved as .HID, .TXT, .INC, and .H. Only .HID can be read.
  19. 6) Included examples from the HID spec. and the Usage Table document.
  20. 7) Fixed numerous bugs.
  21. /************************************************************************
  22. Instructions:
  23. DT.INI must reside in the same directory as DT.EXE.
  24. Usage pages can be added or modified. To add a Usage Page create a text
  25. .UPG file as described below then add an Usage Page (UPn) entry to DT.INI.
  26. NOTE: When saving a file in a format other than .HID be sure to
  27. change the extension otherwise the .HID file will be overwritten.
  28. **************************** WARNING ***************************
  29. The usages pages (.UPG files) from the 9.0 Release Candidate USB HID Usage
  30. Tables document are included here. These pages are included for convienence
  31. and may change in the final release of the document.
  32. **************************** WARNING ***************************
  33. /************************************************************************
  34. HID Spec issues:
  35. 1) Vendor defined Collection IDs are not supported by DT.
  36. 2) Extended Usages are 32-bit usages where the high order 16-bits are the
  37. Usage Page ID and the low order 16-bits are the Usage ID. These are useful
  38. when usages from different Usage Pages are required for the same Main Item.
  39. Memphis supports extended usages. Extended Usages are not defined in the
  40. HID 1.0 Specification.
  41. 3) Extended usage values for Usage Minimum and Maximum (32 bit parameters)
  42. are also supported by DT. Memphis supports this too.
  43. 4) Memphis has the following restrictions on delimiters:
  44. - Do not use delimiters for usages associated with top level (application)
  45. collections.
  46. - Only Usages are supported in delimiters. Usage Min, Usage Max, Designators
  47. and Strings are NOT allowed in a delimited set.
  48. - Delimiters are not allowed when defining usages associated with an Array.
  49. 5) The checker (Parse Descriptor) does not support:
  50. -- Push and Pop - False errors will be reported due to state variables that
  51. are not saved and restored.
  52. -- Extended Usages - The checker will report extended usages as "undefined"
  53. because it does not break the 32-bit value into Usage and Usage Page.
  54. Report problems to: [email protected]
  55. /************************************************************************
  56. File format definitions:
  57. /************************************************************************
  58. .INI format
  59. [UsagePages]
  60. Count=<total number of usage pages declared>
  61. UP0=<Usage Page ID>,<Usage Page Name>,<.UPG File Name>
  62. UP1=...
  63. ...
  64. UP<Count - 1>=...
  65. UPn, where n increments from 0 to the number of pages declared - 1
  66. Notes:
  67. The .INI file must be in the same directory as DT.EXE.
  68. The Usage Page ID is in decimal.
  69. The Usage Page Name must be identical to that found in the .UPG file.
  70. The .UPG File Name can include a path.
  71. *************************************************************************
  72. .UPG format
  73. There are 2 types of .UPG files: NORMAL and REPEATING.
  74. NORMAL .UPG files
  75. <Usage Page Name>
  76. <.UPG File Type Flag: NORMAL>
  77. <Usage ID><tab ('\t')><Usage Name> or
  78. ; Comment if ';' is first character of a line (ignored) or
  79. <Usage ID-Usage ID><tab><Reserved of reserved> (ignored)
  80. Notes:
  81. The Usage Page Name must be identical to the Usage Page Name referred
  82. to in the .INI file to be recognized as a .UPG file.
  83. No blank lines can be in the file.
  84. The Usage ID is in hexidecimal with NO "0x" notation preceeding it
  85. or "h" following it.
  86. There are three forms that can follow the File Type Flag:
  87. 1) The Usage ID, followed by a tab character, followed by the
  88. Usage Name Spaces are allowed in Usage names.
  89. 2) Any line with a semi-colon as the first character is
  90. considered a comment and ignored.
  91. 3) Any line that has "Reserved" of "reserved" as the
  92. Usage Name will be considered a comment and ignored.
  93. 4) Comments are only allowed after the UPG File Type Flag.
  94. Example:
  95. Generic Desktop
  96. NORMAL
  97. 00 Undefined
  98. 01 Pointer
  99. 02 Mouse
  100. 03 Reserved
  101. 04 Joystick
  102. 05 Game Pad
  103. 06 Keyboard
  104. 07 Keypad
  105. 08-2F Reserved
  106. 30 X
  107. ...
  108. 81 System Power
  109. 82 System Sleep
  110. 83-FFFF Reserved
  111. REPEATING .UPG files
  112. <Usage Page Name>
  113. <.UPG File Type Flag: REPEATING>
  114. 00<tab ('\t')><first Usage Name>
  115. 01<tab ('\t')><repeated Usage Name>
  116. ; Comment if ';' is first character of a line (ignored)
  117. Notes:
  118. The Usage Page Name must be identical to the Usage Page Name referred
  119. to in the .INI file to be recognized as a .UPG file.
  120. No blank lines can be in the file.
  121. Only 2 usages are declared. The Usage Name of the first entry (00)
  122. will be used for the first usage and the Usage Name of the second
  123. entry will be repeated followed by <space><Usage ID>.
  124. There are three forms that can follow the File Type Flag:
  125. 1) The Usage ID, followed by a tab character, followed by the
  126. Usage Name Spaces are allowed in Usage names.
  127. 2) Any line with a semi-colon as the first character is
  128. considered a comment and ignored.
  129. 3) Any line that has "Reserved" of "reserved" as the
  130. Usage Name will be considered a comment and ignored.
  131. 4) Comments are only allowed after the UPG File Type Flag.
  132. Example:
  133. Button
  134. REPEATING
  135. 00 Unused
  136. 01 Button
  137. Results in the usages:
  138. Unused
  139. Button 1
  140. Button 2
  141. Button 3
  142. ...