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.

641 lines
30 KiB

7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
  1. /* gc_n64_usb : Gamecube or N64 controller to USB adapter firmware
  2. Copyright (C) 2007-2015 Raphael Assenat <raph@raphnet.net>
  3. This program is free software: you can redistribute it and/or modify
  4. it under the terms of the GNU General Public License as published by
  5. the Free Software Foundation, either version 3 of the License, or
  6. (at your option) any later version.
  7. This program is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. GNU General Public License for more details.
  11. You should have received a copy of the GNU General Public License
  12. along with this program. If not, see <http://www.gnu.org/licenses/>.
  13. */
  14. /*
  15. * The original file gamepad.c contained this descriptor which was
  16. * adapted from my original reportdesc.c by Sean Green for force
  17. * feedback support. Big thanks to him from sharing back!
  18. *
  19. * The descriptor is intact, except for minor changes such as
  20. * axis types and button quantity.
  21. */
  22. const uint8_t gcn64_usbHidReportDescriptor[] PROGMEM = {
  23. ///// gampad
  24. 0x05,0x01, // Usage Page Generic Desktop
  25. 0x09,0x05, // Usage Joystick
  26. 0xA1,0x01, // Collection Application
  27. //axis
  28. //
  29. 0x09, 0x01, // usage pointer
  30. 0xA1, 0x00, // COLLECTION (phys)
  31. 0x85,0x01, // Report ID 1
  32. 0x05, 0x01, // USAGE_PAGE (Generic desktop)
  33. 0x75, 0x10, // REPORT_SIZE (16)
  34. 0x95, 0x06, // REPORT_COUNT (6)
  35. 0x15, 0x00, // LOGICAL_MINIMUM (0)
  36. 0x26, 0x00, 0x7D, // LOGICAL_MAXIMUM (32000)
  37. 0x09, 0x30, // USAGE (X)
  38. 0x09, 0x31, // USAGE (Y)
  39. 0x09, 0x33, // USAGE (Rx)
  40. 0x09, 0x34, // USAGE (Ry)
  41. 0x09, 0x35, // USAGE (Rz)
  42. 0x09, 0x36, // USAGE (Slider)
  43. 0x81, 0x02, // INPUT
  44. 0xc0, // END COLLECTION
  45. #define NUM_BUTTONS 16
  46. //buttons
  47. 0xA1, 0x00, // COLLECTION (phys)
  48. 0x05, 0x09, // USAGE_PAGE (Button)
  49. 0x15, 0x00, // LOGICAL_MINIMUM (0)
  50. 0x25, 0x01, // LOGICAL_MAXIMUM (1)
  51. 0x75, 0x01, // REPORT_SIZE (1)
  52. 0x95, NUM_BUTTONS, // REPORT_COUNT (14)
  53. 0x19, 0x01, // USAGE_MINIMUM (Button 1)
  54. 0x29, NUM_BUTTONS, // USAGE_MAXIMUM (Button 14)
  55. 0x75, 0x01, // REPORT_SIZE (1)
  56. 0x95, NUM_BUTTONS, // REPORT_COUNT (16)
  57. 0x81, 0x02, // INPUT
  58. 0xc0, // END COLLECTION
  59. 0x05,0x0F, // Usage Page Physical Interface
  60. 0x09,0x92, // Usage ES Playing
  61. 0xA1,0x02, // Collection Datalink
  62. 0x85,0x02, // Report ID 2
  63. 0x09,0x9F, // Usage DS Device is Reset
  64. 0x09,0xA0, // Usage DS Device is Pause
  65. // RA: 2015-08-18: Removed this bit since it gets
  66. // mapped to BTN_DEAD in linux's hid-input.c and this
  67. // makes the adapter appear to have 17 buttons.
  68. //
  69. // 0x09,0xA4, // Usage Actuator Power
  70. 0x09,0xA5, // Usage Undefined
  71. 0x09,0xA6, // Usage Undefined
  72. 0x15,0x00, // Logical Minimum 0
  73. 0x25,0x01, // Logical Maximum 1
  74. 0x35,0x00, // Physical Minimum 0
  75. 0x45,0x01, // Physical Maximum 1
  76. 0x75,0x01, // Report Size 1
  77. 0x95,0x04, // Report Count 4
  78. 0x81,0x02, // Input (Variable)
  79. 0x95,0x04, // Report Count 4
  80. 0x75,0x01, // Report Size 1
  81. 0x81,0x03, // Input (Constant, Variable)
  82. 0x09,0x94, // Usage PID Device Control
  83. 0x15,0x00, // Logical Minimum 0
  84. 0x25,0x01, // Logical Maximum 1
  85. 0x35,0x00, // Physical Minimum 0
  86. 0x45,0x01, // Physical Maximum 1
  87. 0x75,0x01, // Report Size 1
  88. 0x95,0x01, // Report Count 1
  89. 0x81,0x02, // Input (Variable)
  90. 0x09,0x22, // Usage Effect Block Index
  91. 0x15,0x01, // Logical Minimum 1
  92. 0x25,0x28, // Logical Maximum 28h (40d)
  93. 0x35,0x01, // Physical Minimum 1
  94. 0x45,0x28, // Physical Maximum 28h (40d)
  95. 0x75,0x07, // Report Size 7
  96. 0x95,0x01, // Report Count 1
  97. 0x81,0x02, // Input (Variable)
  98. 0xC0 , // End Collection
  99. 0x09,0x21, // Usage Set Effect Report
  100. 0xA1,0x02, // Collection Datalink
  101. 0x85,0x01, // Report ID 1
  102. 0x09,0x22, // Usage Effect Block Index
  103. 0x15,0x01, // Logical Minimum 1
  104. 0x25,0x28, // Logical Maximum 28h (40d)
  105. 0x35,0x01, // Physical Minimum 1
  106. 0x45,0x28, // Physical Maximum 28h (40d)
  107. 0x75,0x08, // Report Size 8
  108. 0x95,0x01, // Report Count 1
  109. 0x91,0x02, // Output (Variable)
  110. 0x09,0x25, // Usage Effect Type
  111. 0xA1,0x02, // Collection Datalink
  112. 0x09,0x26, // Usage ET Constant Force
  113. 0x09,0x27, // Usage ET Ramp
  114. 0x09,0x30, // Usage ET Square
  115. 0x09,0x31, // Usage ET Sine
  116. 0x09,0x32, // Usage ET Triangle
  117. 0x09,0x33, // Usage ET Sawtooth Up
  118. 0x09,0x34, // Usage ET Sawtooth Down
  119. 0x09,0x40, // Usage ET Spring
  120. 0x09,0x41, // Usage ET Damper
  121. 0x09,0x42, // Usage ET Inertia
  122. 0x09,0x43, // Usage ET Friction
  123. 0x09,0x28, // Usage ET Custom Force Data
  124. 0x25,0x0C, // Logical Maximum Ch (12d)
  125. 0x15,0x01, // Logical Minimum 1
  126. 0x35,0x01, // Physical Minimum 1
  127. 0x45,0x0C, // Physical Maximum Ch (12d)
  128. 0x75,0x08, // Report Size 8
  129. 0x95,0x01, // Report Count 1
  130. 0x91,0x00, // Output
  131. 0xC0 , // End Collection
  132. 0x09,0x50, // Usage Duration
  133. 0x09,0x54, // Usage Trigger Repeat Interval
  134. 0x09,0x51, // Usage Sample Period
  135. 0x15,0x00, // Logical Minimum 0
  136. 0x26,0xFF,0x7F, // Logical Maximum 7FFFh (32767d)
  137. 0x35,0x00, // Physical Minimum 0
  138. 0x46,0xFF,0x7F, // Physical Maximum 7FFFh (32767d)
  139. 0x66,0x03,0x10, // Unit 1003h (4099d)
  140. 0x55,0xFD, // Unit Exponent FDh (253d)
  141. 0x75,0x10, // Report Size 10h (16d)
  142. 0x95,0x03, // Report Count 3
  143. 0x91,0x02, // Output (Variable)
  144. 0x55,0x00, // Unit Exponent 0
  145. 0x66,0x00,0x00, // Unit 0
  146. 0x09,0x52, // Usage Gain
  147. 0x15,0x00, // Logical Minimum 0
  148. 0x26,0xFF,0x00, // Logical Maximum FFh (255d)
  149. 0x35,0x00, // Physical Minimum 0
  150. 0x46,0x10,0x27, // Physical Maximum 2710h (10000d)
  151. 0x75,0x08, // Report Size 8
  152. 0x95,0x01, // Report Count 1
  153. 0x91,0x02, // Output (Variable)
  154. 0x09,0x53, // Usage Trigger Button
  155. 0x15,0x01, // Logical Minimum 1
  156. 0x25,0x08, // Logical Maximum 8
  157. 0x35,0x01, // Physical Minimum 1
  158. 0x45,0x08, // Physical Maximum 8
  159. 0x75,0x08, // Report Size 8
  160. 0x95,0x01, // Report Count 1
  161. 0x91,0x02, // Output (Variable)
  162. 0x09,0x55, // Usage Axes Enable
  163. 0xA1,0x02, // Collection Datalink
  164. 0x05,0x01, // Usage Page Generic Desktop
  165. 0x09,0x30, // Usage X
  166. 0x09,0x31, // Usage Y
  167. 0x15,0x00, // Logical Minimum 0
  168. 0x25,0x01, // Logical Maximum 1
  169. 0x75,0x01, // Report Size 1
  170. 0x95,0x02, // Report Count 2
  171. 0x91,0x02, // Output (Variable)
  172. 0xC0 , // End Collection
  173. 0x05,0x0F, // Usage Page Physical Interface
  174. 0x09,0x56, // Usage Direction Enable
  175. 0x95,0x01, // Report Count 1
  176. 0x91,0x02, // Output (Variable)
  177. 0x95,0x05, // Report Count 5
  178. 0x91,0x03, // Output (Constant, Variable)
  179. 0x09,0x57, // Usage Direction
  180. 0xA1,0x02, // Collection Datalink
  181. 0x0B,0x01,0x00,0x0A,0x00, // Usage Ordinals: Instance 1
  182. 0x0B,0x02,0x00,0x0A,0x00, // Usage Ordinals: Instance 2
  183. 0x66,0x14,0x00, // Unit 14h (20d)
  184. 0x55,0xFE, // Unit Exponent FEh (254d)
  185. 0x15,0x00, // Logical Minimum 0
  186. 0x26,0xFF,0x00, // Logical Maximum FFh (255d)
  187. 0x35,0x00, // Physical Minimum 0
  188. 0x47,0xA0,0x8C,0x00,0x00, // Physical Maximum 8CA0h (36000d)
  189. 0x66,0x00,0x00, // Unit 0
  190. 0x75,0x08, // Report Size 8
  191. 0x95,0x02, // Report Count 2
  192. 0x91,0x02, // Output (Variable)
  193. 0x55,0x00, // Unit Exponent 0
  194. 0x66,0x00,0x00, // Unit 0
  195. 0xC0 , // End Collection
  196. 0x05,0x0F, // Usage Page Physical Interface
  197. 0x09,0xA7, // Usage Undefined
  198. 0x66,0x03,0x10, // Unit 1003h (4099d)
  199. 0x55,0xFD, // Unit Exponent FDh (253d)
  200. 0x15,0x00, // Logical Minimum 0
  201. 0x26,0xFF,0x7F, // Logical Maximum 7FFFh (32767d)
  202. 0x35,0x00, // Physical Minimum 0
  203. 0x46,0xFF,0x7F, // Physical Maximum 7FFFh (32767d)
  204. 0x75,0x10, // Report Size 10h (16d)
  205. 0x95,0x01, // Report Count 1
  206. 0x91,0x02, // Output (Variable)
  207. 0x66,0x00,0x00, // Unit 0
  208. 0x55,0x00, // Unit Exponent 0
  209. 0xC0 , // End Collection
  210. 0x05,0x0F, // Usage Page Physical Interface
  211. 0x09,0x5A, // Usage Set Envelope Report
  212. 0xA1,0x02, // Collection Datalink
  213. 0x85,0x02, // Report ID 2
  214. 0x09,0x22, // Usage Effect Block Index
  215. 0x15,0x01, // Logical Minimum 1
  216. 0x25,0x28, // Logical Maximum 28h (40d)
  217. 0x35,0x01, // Physical Minimum 1
  218. 0x45,0x28, // Physical Maximum 28h (40d)
  219. 0x75,0x08, // Report Size 8
  220. 0x95,0x01, // Report Count 1
  221. 0x91,0x02, // Output (Variable)
  222. 0x09,0x5B, // Usage Attack Level
  223. 0x09,0x5D, // Usage Fade Level
  224. 0x15,0x00, // Logical Minimum 0
  225. 0x26,0xFF,0x00, // Logical Maximum FFh (255d)
  226. 0x35,0x00, // Physical Minimum 0
  227. 0x46,0x10,0x27, // Physical Maximum 2710h (10000d)
  228. 0x95,0x02, // Report Count 2
  229. 0x91,0x02, // Output (Variable)
  230. 0x09,0x5C, // Usage Attack Time
  231. 0x09,0x5E, // Usage Fade Time
  232. 0x66,0x03,0x10, // Unit 1003h (4099d)
  233. 0x55,0xFD, // Unit Exponent FDh (253d)
  234. 0x26,0xFF,0x7F, // Logical Maximum 7FFFh (32767d)
  235. 0x46,0xFF,0x7F, // Physical Maximum 7FFFh (32767d)
  236. 0x75,0x10, // Report Size 10h (16d)
  237. 0x91,0x02, // Output (Variable)
  238. 0x45,0x00, // Physical Maximum 0
  239. 0x66,0x00,0x00, // Unit 0
  240. 0x55,0x00, // Unit Exponent 0
  241. 0xC0 , // End Collection
  242. 0x09,0x5F, // Usage Set Condition Report
  243. 0xA1,0x02, // Collection Datalink
  244. 0x85,0x03, // Report ID 3
  245. 0x09,0x22, // Usage Effect Block Index
  246. 0x15,0x01, // Logical Minimum 1
  247. 0x25,0x28, // Logical Maximum 28h (40d)
  248. 0x35,0x01, // Physical Minimum 1
  249. 0x45,0x28, // Physical Maximum 28h (40d)
  250. 0x75,0x08, // Report Size 8
  251. 0x95,0x01, // Report Count 1
  252. 0x91,0x02, // Output (Variable)
  253. 0x09,0x23, // Usage Parameter Block Offset
  254. 0x15,0x00, // Logical Minimum 0
  255. 0x25,0x01, // Logical Maximum 1
  256. 0x35,0x00, // Physical Minimum 0
  257. 0x45,0x01, // Physical Maximum 1
  258. 0x75,0x04, // Report Size 4
  259. 0x95,0x01, // Report Count 1
  260. 0x91,0x02, // Output (Variable)
  261. 0x09,0x58, // Usage Type Specific Block Off...
  262. 0xA1,0x02, // Collection Datalink
  263. 0x0B,0x01,0x00,0x0A,0x00, // Usage Ordinals: Instance 1
  264. 0x0B,0x02,0x00,0x0A,0x00, // Usage Ordinals: Instance 2
  265. 0x75,0x02, // Report Size 2
  266. 0x95,0x02, // Report Count 2
  267. 0x91,0x02, // Output (Variable)
  268. 0xC0 , // End Collection
  269. 0x15,0x80, // Logical Minimum 80h (-128d)
  270. 0x25,0x7F, // Logical Maximum 7Fh (127d)
  271. 0x36,0xF0,0xD8, // Physical Minimum D8F0h (-10000d)
  272. 0x46,0x10,0x27, // Physical Maximum 2710h (10000d)
  273. 0x09,0x60, // Usage CP Offset
  274. 0x75,0x08, // Report Size 8
  275. 0x95,0x01, // Report Count 1
  276. 0x91,0x02, // Output (Variable)
  277. 0x36,0xF0,0xD8, // Physical Minimum D8F0h (-10000d)
  278. 0x46,0x10,0x27, // Physical Maximum 2710h (10000d)
  279. 0x09,0x61, // Usage Positive Coefficient
  280. 0x09,0x62, // Usage Negative Coefficient
  281. 0x95,0x02, // Report Count 2
  282. 0x91,0x02, // Output (Variable)
  283. 0x15,0x00, // Logical Minimum 0
  284. 0x26,0xFF,0x00, // Logical Maximum FFh (255d)
  285. 0x35,0x00, // Physical Minimum 0
  286. 0x46,0x10,0x27, // Physical Maximum 2710h (10000d)
  287. 0x09,0x63, // Usage Positive Saturation
  288. 0x09,0x64, // Usage Negative Saturation
  289. 0x75,0x08, // Report Size 8
  290. 0x95,0x02, // Report Count 2
  291. 0x91,0x02, // Output (Variable)
  292. 0x09,0x65, // Usage Dead Band
  293. 0x46,0x10,0x27, // Physical Maximum 2710h (10000d)
  294. 0x95,0x01, // Report Count 1
  295. 0x91,0x02, // Output (Variable)
  296. 0xC0 , // End Collection
  297. 0x09,0x6E, // Usage Set Periodic Report
  298. 0xA1,0x02, // Collection Datalink
  299. 0x85,0x04, // Report ID 4
  300. 0x09,0x22, // Usage Effect Block Index
  301. 0x15,0x01, // Logical Minimum 1
  302. 0x25,0x28, // Logical Maximum 28h (40d)
  303. 0x35,0x01, // Physical Minimum 1
  304. 0x45,0x28, // Physical Maximum 28h (40d)
  305. 0x75,0x08, // Report Size 8
  306. 0x95,0x01, // Report Count 1
  307. 0x91,0x02, // Output (Variable)
  308. 0x09,0x70, // Usage Magnitude
  309. 0x15,0x00, // Logical Minimum 0
  310. 0x26,0xFF,0x00, // Logical Maximum FFh (255d)
  311. 0x35,0x00, // Physical Minimum 0
  312. 0x46,0x10,0x27, // Physical Maximum 2710h (10000d)
  313. 0x75,0x08, // Report Size 8
  314. 0x95,0x01, // Report Count 1
  315. 0x91,0x02, // Output (Variable)
  316. 0x09,0x6F, // Usage Offset
  317. 0x15,0x80, // Logical Minimum 80h (-128d)
  318. 0x25,0x7F, // Logical Maximum 7Fh (127d)
  319. 0x36,0xF0,0xD8, // Physical Minimum D8F0h (-10000d)
  320. 0x46,0x10,0x27, // Physical Maximum 2710h (10000d)
  321. 0x95,0x01, // Report Count 1
  322. 0x91,0x02, // Output (Variable)
  323. 0x09,0x71, // Usage Phase
  324. 0x66,0x14,0x00, // Unit 14h (20d)
  325. 0x55,0xFE, // Unit Exponent FEh (254d)
  326. 0x15,0x00, // Logical Minimum 0
  327. 0x26,0xFF,0x00, // Logical Maximum FFh (255d)
  328. 0x35,0x00, // Physical Minimum 0
  329. 0x47,0xA0,0x8C,0x00,0x00, // Physical Maximum 8CA0h (36000d)
  330. 0x91,0x02, // Output (Variable)
  331. 0x09,0x72, // Usage Period
  332. 0x26,0xFF,0x7F, // Logical Maximum 7FFFh (32767d)
  333. 0x46,0xFF,0x7F, // Physical Maximum 7FFFh (32767d)
  334. 0x66,0x03,0x10, // Unit 1003h (4099d)
  335. 0x55,0xFD, // Unit Exponent FDh (253d)
  336. 0x75,0x10, // Report Size 10h (16d)
  337. 0x95,0x01, // Report Count 1
  338. 0x91,0x02, // Output (Variable)
  339. 0x66,0x00,0x00, // Unit 0
  340. 0x55,0x00, // Unit Exponent 0
  341. 0xC0 , // End Collection
  342. 0x09,0x73, // Usage Set Constant Force Rep...
  343. 0xA1,0x02, // Collection Datalink
  344. 0x85,0x05, // Report ID 5
  345. 0x09,0x22, // Usage Effect Block Index
  346. 0x15,0x01, // Logical Minimum 1
  347. 0x25,0x28, // Logical Maximum 28h (40d)
  348. 0x35,0x01, // Physical Minimum 1
  349. 0x45,0x28, // Physical Maximum 28h (40d)
  350. 0x75,0x08, // Report Size 8
  351. 0x95,0x01, // Report Count 1
  352. 0x91,0x02, // Output (Variable)
  353. 0x09,0x70, // Usage Magnitude
  354. 0x16,0x01,0xFF, // Logical Minimum FF01h (-255d)
  355. 0x26,0xFF,0x00, // Logical Maximum FFh (255d)
  356. 0x36,0xF0,0xD8, // Physical Minimum D8F0h (-10000d)
  357. 0x46,0x10,0x27, // Physical Maximum 2710h (10000d)
  358. 0x75,0x10, // Report Size 10h (16d)
  359. 0x95,0x01, // Report Count 1
  360. 0x91,0x02, // Output (Variable)
  361. 0xC0 , // End Collection
  362. 0x09,0x74, // Usage Set Ramp Force Report
  363. 0xA1,0x02, // Collection Datalink
  364. 0x85,0x06, // Report ID 6
  365. 0x09,0x22, // Usage Effect Block Index
  366. 0x15,0x01, // Logical Minimum 1
  367. 0x25,0x28, // Logical Maximum 28h (40d)
  368. 0x35,0x01, // Physical Minimum 1
  369. 0x45,0x28, // Physical Maximum 28h (40d)
  370. 0x75,0x08, // Report Size 8
  371. 0x95,0x01, // Report Count 1
  372. 0x91,0x02, // Output (Variable)
  373. 0x09,0x75, // Usage Ramp Start
  374. 0x09,0x76, // Usage Ramp End
  375. 0x15,0x80, // Logical Minimum 80h (-128d)
  376. 0x25,0x7F, // Logical Maximum 7Fh (127d)
  377. 0x36,0xF0,0xD8, // Physical Minimum D8F0h (-10000d)
  378. 0x46,0x10,0x27, // Physical Maximum 2710h (10000d)
  379. 0x75,0x08, // Report Size 8
  380. 0x95,0x02, // Report Count 2
  381. 0x91,0x02, // Output (Variable)
  382. 0xC0 , // End Collection
  383. 0x09,0x68, // Usage Custom Force Data Rep...
  384. 0xA1,0x02, // Collection Datalink
  385. 0x85,0x07, // Report ID 7
  386. 0x09,0x22, // Usage Effect Block Index
  387. 0x15,0x01, // Logical Minimum 1
  388. 0x25,0x28, // Logical Maximum 28h (40d)
  389. 0x35,0x01, // Physical Minimum 1
  390. 0x45,0x28, // Physical Maximum 28h (40d)
  391. 0x75,0x08, // Report Size 8
  392. 0x95,0x01, // Report Count 1
  393. 0x91,0x02, // Output (Variable)
  394. 0x09,0x6C, // Usage Custom Force Data Offset
  395. 0x15,0x00, // Logical Minimum 0
  396. 0x26,0x10,0x27, // Logical Maximum 2710h (10000d)
  397. 0x35,0x00, // Physical Minimum 0
  398. 0x46,0x10,0x27, // Physical Maximum 2710h (10000d)
  399. 0x75,0x10, // Report Size 10h (16d)
  400. 0x95,0x01, // Report Count 1
  401. 0x91,0x02, // Output (Variable)
  402. 0x09,0x69, // Usage Custom Force Data
  403. 0x15,0x81, // Logical Minimum 81h (-127d)
  404. 0x25,0x7F, // Logical Maximum 7Fh (127d)
  405. 0x35,0x00, // Physical Minimum 0
  406. 0x46,0xFF,0x00, // Physical Maximum FFh (255d)
  407. 0x75,0x08, // Report Size 8
  408. 0x95,0x0C, // Report Count Ch (12d)
  409. 0x92,0x02,0x01, // Output (Variable, Buffered)
  410. 0xC0 , // End Collection
  411. 0x09,0x66, // Usage Download Force Sample
  412. 0xA1,0x02, // Collection Datalink
  413. 0x85,0x08, // Report ID 8
  414. 0x05,0x01, // Usage Page Generic Desktop
  415. 0x09,0x30, // Usage X
  416. 0x09,0x31, // Usage Y
  417. 0x15,0x81, // Logical Minimum 81h (-127d)
  418. 0x25,0x7F, // Logical Maximum 7Fh (127d)
  419. 0x35,0x00, // Physical Minimum 0
  420. 0x46,0xFF,0x00, // Physical Maximum FFh (255d)
  421. 0x75,0x08, // Report Size 8
  422. 0x95,0x02, // Report Count 2
  423. 0x91,0x02, // Output (Variable)
  424. 0xC0 , // End Collection
  425. 0x05,0x0F, // Usage Page Physical Interface
  426. 0x09,0x77, // Usage Effect Operation Report
  427. 0xA1,0x02, // Collection Datalink
  428. 0x85,0x0A, // Report ID Ah (10d)
  429. 0x09,0x22, // Usage Effect Block Index
  430. 0x15,0x01, // Logical Minimum 1
  431. 0x25,0x28, // Logical Maximum 28h (40d)
  432. 0x35,0x01, // Physical Minimum 1
  433. 0x45,0x28, // Physical Maximum 28h (40d)
  434. 0x75,0x08, // Report Size 8
  435. 0x95,0x01, // Report Count 1
  436. 0x91,0x02, // Output (Variable)
  437. 0x09,0x78, // Usage Operation
  438. 0xA1,0x02, // Collection Datalink
  439. 0x09,0x79, // Usage Op Effect Start
  440. 0x09,0x7A, // Usage Op Effect Start Solo
  441. 0x09,0x7B, // Usage Op Effect Stop
  442. 0x15,0x01, // Logical Minimum 1
  443. 0x25,0x03, // Logical Maximum 3
  444. 0x75,0x08, // Report Size 8
  445. 0x95,0x01, // Report Count 1
  446. 0x91,0x00, // Output
  447. 0xC0 , // End Collection
  448. 0x09,0x7C, // Usage Loop Count
  449. 0x15,0x00, // Logical Minimum 0
  450. 0x26,0xFF,0x00, // Logical Maximum FFh (255d)
  451. 0x35,0x00, // Physical Minimum 0
  452. 0x46,0xFF,0x00, // Physical Maximum FFh (255d)
  453. 0x91,0x02, // Output (Variable)
  454. 0xC0 , // End Collection
  455. 0x09,0x90, // Usage PID State Report
  456. 0xA1,0x02, // Collection Datalink
  457. 0x85,0x0B, // Report ID Bh (11d)
  458. 0x09,0x22, // Usage Effect Block Index
  459. 0x25,0x28, // Logical Maximum 28h (40d)
  460. 0x15,0x01, // Logical Minimum 1
  461. 0x35,0x01, // Physical Minimum 1
  462. 0x45,0x28, // Physical Maximum 28h (40d)
  463. 0x75,0x08, // Report Size 8
  464. 0x95,0x01, // Report Count 1
  465. 0x91,0x02, // Output (Variable)
  466. 0xC0 , // End Collection
  467. 0x09,0x96, // Usage DC Disable Actuators
  468. 0xA1,0x02, // Collection Datalink
  469. 0x85,0x0C, // Report ID Ch (12d)
  470. 0x09,0x97, // Usage DC Stop All Effects
  471. 0x09,0x98, // Usage DC Device Reset
  472. 0x09,0x99, // Usage DC Device Pause
  473. 0x09,0x9A, // Usage DC Device Continue
  474. 0x09,0x9B, // Usage PID Device State
  475. 0x09,0x9C, // Usage DS Actuators Enabled
  476. 0x15,0x01, // Logical Minimum 1
  477. 0x25,0x06, // Logical Maximum 6
  478. 0x75,0x08, // Report Size 8
  479. 0x95,0x01, // Report Count 1
  480. 0x91,0x00, // Output
  481. 0xC0 , // End Collection
  482. 0x09,0x7D, // Usage PID Pool Report
  483. 0xA1,0x02, // Collection Datalink
  484. 0x85,0x0D, // Report ID Dh (13d)
  485. 0x09,0x7E, // Usage RAM Pool Size
  486. 0x15,0x00, // Logical Minimum 0
  487. 0x26,0xFF,0x00, // Logical Maximum FFh (255d)
  488. 0x35,0x00, // Physical Minimum 0
  489. 0x46,0x10,0x27, // Physical Maximum 2710h (10000d)
  490. 0x75,0x08, // Report Size 8
  491. 0x95,0x01, // Report Count 1
  492. 0x91,0x02, // Output (Variable)
  493. 0xC0 , // End Collection
  494. 0x09,0x6B, // Usage Set Custom Force Report
  495. 0xA1,0x02, // Collection Datalink
  496. 0x85,0x0E, // Report ID Eh (14d)
  497. 0x09,0x22, // Usage Effect Block Index
  498. 0x15,0x01, // Logical Minimum 1
  499. 0x25,0x28, // Logical Maximum 28h (40d)
  500. 0x35,0x01, // Physical Minimum 1
  501. 0x45,0x28, // Physical Maximum 28h (40d)
  502. 0x75,0x08, // Report Size 8
  503. 0x95,0x01, // Report Count 1
  504. 0x91,0x02, // Output (Variable)
  505. 0x09,0x6D, // Usage Sample Count
  506. 0x15,0x00, // Logical Minimum 0
  507. 0x26,0xFF,0x00, // Logical Maximum FFh (255d)
  508. 0x35,0x00, // Physical Minimum 0
  509. 0x46,0xFF,0x00, // Physical Maximum FFh (255d)
  510. 0x75,0x08, // Report Size 8
  511. 0x95,0x01, // Report Count 1
  512. 0x91,0x02, // Output (Variable)
  513. 0x09,0x51, // Usage Sample Period
  514. 0x66,0x03,0x10, // Unit 1003h (4099d)
  515. 0x55,0xFD, // Unit Exponent FDh (253d)
  516. 0x15,0x00, // Logical Minimum 0
  517. 0x26,0xFF,0x7F, // Logical Maximum 7FFFh (32767d)
  518. 0x35,0x00, // Physical Minimum 0
  519. 0x46,0xFF,0x7F, // Physical Maximum 7FFFh (32767d)
  520. 0x75,0x10, // Report Size 10h (16d)
  521. 0x95,0x01, // Report Count 1
  522. 0x91,0x02, // Output (Variable)
  523. 0x55,0x00, // Unit Exponent 0
  524. 0x66,0x00,0x00, // Unit 0
  525. 0xC0 , // End Collection
  526. 0x09,0xAB, // Usage Undefined << Create New Effect Report
  527. 0xA1,0x02, // Collection Datalink
  528. 0x85,0x09, // Report ID 9
  529. 0x09,0x25, // Usage Effect Type
  530. 0xA1,0x02, // Collection Datalink
  531. 0x09,0x26, // Usage ET Constant Force
  532. 0x09,0x27, // Usage ET Ramp
  533. 0x09,0x30, // Usage ET Square
  534. 0x09,0x31, // Usage ET Sine
  535. 0x09,0x32, // Usage ET Triangle
  536. 0x09,0x33, // Usage ET Sawtooth Up
  537. 0x09,0x34, // Usage ET Sawtooth Down
  538. 0x09,0x40, // Usage ET Spring
  539. 0x09,0x41, // Usage ET Damper
  540. 0x09,0x42, // Usage ET Inertia
  541. 0x09,0x43, // Usage ET Friction
  542. 0x09,0x28, // Usage ET Custom Force Data
  543. 0x25,0x0C, // Logical Maximum Ch (12d)
  544. 0x15,0x01, // Logical Minimum 1
  545. 0x35,0x01, // Physical Minimum 1
  546. 0x45,0x0C, // Physical Maximum Ch (12d)
  547. 0x75,0x08, // Report Size 8
  548. 0x95,0x01, // Report Count 1
  549. 0xB1,0x00, // Feature
  550. 0xC0 , // End Collection
  551. 0x05,0x01, // Usage Page Generic Desktop
  552. 0x09,0x3B, // Usage Byte Count
  553. 0x15,0x00, // Logical Minimum 0
  554. 0x26,0xFF,0x01, // Logical Maximum 1FFh (511d)
  555. 0x35,0x00, // Physical Minimum 0
  556. 0x46,0xFF,0x01, // Physical Maximum 1FFh (511d)
  557. 0x75,0x0A, // Report Size Ah (10d)
  558. 0x95,0x01, // Report Count 1
  559. 0xB1,0x02, // Feature (Variable)
  560. 0x75,0x06, // Report Size 6
  561. 0xB1,0x01, // Feature (Constant)
  562. 0xC0 , // End Collection
  563. 0x05,0x0F, // Usage Page Physical Interface
  564. 0x09,0x89, // Usage Block Load Status
  565. 0xA1,0x02, // Collection Datalink
  566. 0x85,0x02, // Report ID 2
  567. 0x09,0x22, // Usage Effect Block Index
  568. 0x25,0x28, // Logical Maximum 28h (40d)
  569. 0x15,0x01, // Logical Minimum 1
  570. 0x35,0x01, // Physical Minimum 1
  571. 0x45,0x28, // Physical Maximum 28h (40d)
  572. 0x75,0x08, // Report Size 8
  573. 0x95,0x01, // Report Count 1
  574. 0xB1,0x02, // Feature (Variable)
  575. 0x09,0x8B, // Usage Block Load Full
  576. 0xA1,0x02, // Collection Datalink
  577. 0x09,0x8C, // Usage Block Load Error
  578. 0x09,0x8D, // Usage Block Handle
  579. 0x09,0x8E, // Usage PID Block Free Report
  580. 0x25,0x03, // Logical Maximum 3
  581. 0x15,0x01, // Logical Minimum 1
  582. 0x35,0x01, // Physical Minimum 1
  583. 0x45,0x03, // Physical Maximum 3
  584. 0x75,0x08, // Report Size 8
  585. 0x95,0x01, // Report Count 1
  586. 0xB1,0x00, // Feature
  587. 0xC0 , // End Collection
  588. 0x09,0xAC, // Usage Undefined
  589. 0x15,0x00, // Logical Minimum 0
  590. 0x27,0xFF,0xFF,0x00,0x00, // Logical Maximum FFFFh (65535d)
  591. 0x35,0x00, // Physical Minimum 0
  592. 0x47,0xFF,0xFF,0x00,0x00, // Physical Maximum FFFFh (65535d)
  593. 0x75,0x10, // Report Size 10h (16d)
  594. 0x95,0x01, // Report Count 1
  595. 0xB1,0x00, // Feature
  596. 0xC0 , // End Collection
  597. 0x09,0x7F, // Usage ROM Pool Size
  598. 0xA1,0x02, // Collection Datalink
  599. 0x85,0x03, // Report ID 3
  600. 0x09,0x80, // Usage ROM Effect Block Count
  601. 0x75,0x10, // Report Size 10h (16d)
  602. 0x95,0x01, // Report Count 1
  603. 0x15,0x00, // Logical Minimum 0
  604. 0x35,0x00, // Physical Minimum 0
  605. 0x27,0xFF,0xFF,0x00,0x00, // Logical Maximum FFFFh (65535d)
  606. 0x47,0xFF,0xFF,0x00,0x00, // Physical Maximum FFFFh (65535d)
  607. 0xB1,0x02, // Feature (Variable)
  608. 0x09,0x83, // Usage PID Pool Move Report
  609. 0x26,0xFF,0x00, // Logical Maximum FFh (255d)
  610. 0x46,0xFF,0x00, // Physical Maximum FFh (255d)
  611. 0x75,0x08, // Report Size 8
  612. 0x95,0x01, // Report Count 1
  613. 0xB1,0x02, // Feature (Variable)
  614. 0x09,0xA9, // Usage Undefined
  615. 0x09,0xAA, // Usage Undefined
  616. 0x75,0x01, // Report Size 1
  617. 0x95,0x02, // Report Count 2
  618. 0x15,0x00, // Logical Minimum 0
  619. 0x25,0x01, // Logical Maximum 1
  620. 0x35,0x00, // Physical Minimum 0
  621. 0x45,0x01, // Physical Maximum 1
  622. 0xB1,0x02, // Feature (Variable)
  623. 0x75,0x06, // Report Size 6
  624. 0x95,0x01, // Report Count 1
  625. 0xB1,0x03, // Feature (Constant, Variable)
  626. 0xC0, // End Collection
  627. 0xC0, // End Collection
  628. };