Advertisement
Guest User

Untitled

a guest
Dec 7th, 2017
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 33.64 KB | None | 0 0
  1. const char analog_usbHidReportDescriptor[] PROGMEM = {
  2. ///// gamepad
  3. 0x05,0x01, // Usage Page Generic Desktop
  4. 0x09,0x05, // USAGE (Game Pad)
  5. 0xA1,0x01, // Collection Application
  6. 0x85,0x01, // Report ID 1
  7.  
  8. //button
  9. 0x05, 0x09, // USAGE_PAGE (Button)
  10. 0x19, 0x01, // USAGE_MINIMUM (Button 1)
  11. 0x29, 0x18, // USAGE_MAXIMUM (Button 24)
  12. 0x15, 0x00, // LOGICAL_MINIMUM (0)
  13. 0x25, 0x01, // LOGICAL_MAXIMUM (1)
  14. 0x75, 0x01, // REPORT_SIZE (1)
  15. 0x95, 0x18, // REPORT_COUNT (24)
  16. 0x81, 0x02, // INPUT
  17.  
  18.  
  19. 0xa1, 0x00, // COLLECTION (Physical) ( must be in a collection for open-emu )
  20. //axis
  21. 0x05, 0x01, // USAGE_PAGE (Generic Desktop)
  22. 0x09, 0x30, // USAGE (X)
  23. 0x09, 0x31, // USAGE (Y)
  24. 0x09, 0x32, // USAGE (Z)
  25. 0x09, 0x33, // USAGE (Rx)
  26. 0x09, 0x34, // USAGE (Ry)
  27. 0x09, 0x35, // USAGE (Rz)
  28. 0x09, 0x36, // USAGE slider
  29. 0x09, 0x37, // USAGE dial
  30. //0x09, 0x38, // wheel ( cant figure this out )
  31. 0x15, 0x00, // LOGICAL_MINIMUM (0)
  32. 0x26, 0xFF, 0x00, // LOGICAL_MAXIMUM (255)
  33. 0x35, 0x00, // Physical Minimum (0)
  34. 0x46, 0xFF, 0x00, // Physical Minimum (255)
  35. 0x75, 0x08, // REPORT_SIZE (8)
  36. 0x95, 0x08, // REPORT_COUNT (8)
  37. 0x81, 0x02, // INPUT
  38.  
  39. 0xc0,//end pointer phys collection.
  40.  
  41. //hat
  42. 0x05, 0x01, // USAGE_PAGE (Generic Desktop)
  43. 0x25, 0x07, // LOGICAL_MAXIMUM (7)
  44. 0x46, 0x3b, 0x01, // PHYSICAL_MAXIMUM (315)
  45. 0x75, 0x04, // REPORT_SIZE (4)
  46. 0x95, 0x01, // REPORT_COUNT (1)
  47. 0x65, 0x14, // UNIT (Eng Rot:Angular Pos)
  48. 0x09, 0x39, // USAGE (Hat switch)
  49. 0x81, 0x42, // INPUT (Data,Var,Abs,Null)
  50. 0x65, 0x00, // UNIT (None)
  51. 0x95, 0x01, // REPORT_COUNT (1)
  52. 0x81, 0x01, // INPUT (Cnst,Ary,Abs)
  53.  
  54. /** to make home work the button needs to be the first in the poll, also this vendor specific needs to
  55. be here, at least one pressure. I left it as 2, because any more is another 8 ms poll**/
  56. //ps3 - I think this is just for pressure... the other feature needs to be on report ID 0, so it has to go on the mouse.
  57.  
  58. //0xa1, 0x00, // COLLECTION (Physical)
  59. //if this is not here the playstation does not set the ps3mode, so it must be here.
  60. 0x06, 0x00, 0xff, // USAGE_PAGE (Vendor Specific)
  61. 0x09, 0x20, // Unknown
  62. 0x09, 0x21, // Unknown
  63. //0x09, 0x22, // Unknown
  64. //0x09, 0x23, // Unknown
  65. //0x09, 0x24, // Unknown
  66. //0x09, 0x25, // Unknown
  67. //0x09, 0x26, // Unknown
  68. //0x09, 0x27, // Unknown
  69. //0x09, 0x28, // Unknown
  70. //0x09, 0x29, // Unknown
  71. //0x09, 0x2a, // Unknown
  72. //0x09, 0x2b, // Unknown
  73. 0x75, 0x08, // REPORT_SIZE (8)
  74. 0x95, 0x02, // REPORT_COUNT
  75. 0x81, 0x02, // INPUT (Data,Var,Abs)
  76. //0xc0,//end
  77.  
  78.  
  79. // this is the feature report used to send the 8 bytes (aka magic bytes) to the PS3.
  80. 0x0a, 0x21, 0x26,
  81. 0x95, 0x08, // REPORT_COUNT (8)
  82. 0xb1, 0x02, // FEATURE (Data,Var,Abs)
  83.  
  84.  
  85.  
  86. //this is an input for FFB, data out.
  87. 0x06,0x01,0xFF, // Usage Page Generic Desktop
  88. 0x09,0x49, // Usage Undefined
  89. 0x75,0x01, // Report Size 1
  90. 0x95,0x01, // Report Count 1
  91. 0x81,0x02, // Input (Variable)
  92. 0x75,0x07, // Report Size 7
  93. 0x81,0x03, // Input (Constant, Variable)
  94.  
  95.  
  96. //FFB
  97. 0x05,0x0F, // Usage Page Physical Interface
  98. 0x09,0x92, // Usage ES Playing
  99. 0xA1,0x02, // Collection Datalink
  100. 0x85,0x02, // Report ID 2
  101. 0x09,0x9F, // Usage DS Device is Reset
  102. 0x09,0xA0, // Usage DS Device is Pause
  103. 0x09,0xA4, // Usage Actuator Power
  104. 0x09,0xA5, // Usage Undefined
  105. 0x09,0xA6, // Usage Undefined
  106. 0x15,0x00, // Logical Minimum 0
  107. 0x25,0x01, // Logical Maximum 1
  108. 0x35,0x00, // Physical Minimum 0
  109. 0x45,0x01, // Physical Maximum 1
  110. 0x75,0x01, // Report Size 1
  111. 0x95,0x05, // Report Count 5
  112. 0x81,0x02, // Input (Variable)
  113. 0x95,0x03, // Report Count 3
  114. 0x81,0x03, // Input (Constant, Variable)
  115. 0x09,0x94, // Usage PID Device Control
  116. 0x15,0x00, // Logical Minimum 0
  117. 0x25,0x01, // Logical Maximum 1
  118. 0x35,0x00, // Physical Minimum 0
  119. 0x45,0x01, // Physical Maximum 1
  120. 0x75,0x01, // Report Size 1
  121. 0x95,0x01, // Report Count 1
  122. 0x81,0x02, // Input (Variable)
  123. 0x09,0x22, // Usage Effect Block Index
  124. 0x15,0x01, // Logical Minimum 1
  125. 0x25,0x28, // Logical Maximum 28h (40d)
  126. 0x35,0x01, // Physical Minimum 1
  127. 0x45,0x28, // Physical Maximum 28h (40d)
  128. 0x75,0x07, // Report Size 7
  129. 0x95,0x01, // Report Count 1
  130. 0x81,0x02, // Input (Variable)
  131. 0xC0 , // End Collection
  132.  
  133.  
  134. 0x09,0x21, // Usage Set Effect Report
  135. 0xA1,0x02, // Collection Datalink
  136. 0x85,0x01, // Report ID 1
  137. 0x09,0x22, // Usage Effect Block Index
  138. 0x15,0x01, // Logical Minimum 1
  139. 0x25,0x28, // Logical Maximum 28h (40d)
  140. 0x35,0x01, // Physical Minimum 1
  141. 0x45,0x28, // Physical Maximum 28h (40d)
  142. 0x75,0x08, // Report Size 8
  143. 0x95,0x01, // Report Count 1
  144. 0x91,0x02, // Output (Variable)
  145. 0x09,0x25, // Usage Effect Type
  146. 0xA1,0x02, // Collection Datalink
  147. 0x09,0x26, // Usage ET Constant Force
  148. 0x09,0x27, // Usage ET Ramp
  149. 0x09,0x30, // Usage ET Square
  150. 0x09,0x31, // Usage ET Sine
  151. 0x09,0x32, // Usage ET Triangle
  152. 0x09,0x33, // Usage ET Sawtooth Up
  153. 0x09,0x34, // Usage ET Sawtooth Down
  154. 0x09,0x40, // Usage ET Spring
  155. 0x09,0x41, // Usage ET Damper
  156. 0x09,0x42, // Usage ET Inertia
  157. 0x09,0x43, // Usage ET Friction
  158. 0x09,0x28, // Usage ET Custom Force Data
  159. 0x25,0x03, // Logical Maximum Ch (12d)
  160. 0x15,0x01, // Logical Minimum 1
  161. 0x35,0x01, // Physical Minimum 1
  162. 0x45,0x03, // Physical Maximum Ch (12d)
  163. 0x75,0x08, // Report Size 8
  164. 0x95,0x01, // Report Count 1
  165. 0x91,0x00, // Output
  166. 0xC0 , // End Collection
  167. 0x09,0x50, // Usage Duration
  168. 0x09,0x54, // Usage Trigger Repeat Interval
  169. 0x09,0x51, // Usage Sample Period
  170. 0x15,0x00, // Logical Minimum 0
  171. 0x26,0xFF,0x7F, // Logical Maximum 7FFFh (32767d)
  172. 0x35,0x00, // Physical Minimum 0
  173. 0x46,0xFF,0x7F, // Physical Maximum 7FFFh (32767d)
  174. 0x66,0x03,0x10, // Unit 1003h (4099d)
  175. 0x55,0xFD, // Unit Exponent FDh (253d)
  176. 0x75,0x10, // Report Size 10h (16d)
  177. 0x95,0x03, // Report Count 3
  178. 0x91,0x02, // Output (Variable)
  179. 0x55,0x00, // Unit Exponent 0
  180. 0x66,0x00,0x00, // Unit 0
  181. 0x09,0x52, // Usage Gain
  182. 0x15,0x00, // Logical Minimum 0
  183. 0x26,0xFF,0x00, // Logical Maximum FFh (255d)
  184. 0x35,0x00, // Physical Minimum 0
  185. 0x46,0x10,0x27, // Physical Maximum 2710h (10000d)
  186. 0x75,0x08, // Report Size 8
  187. 0x95,0x01, // Report Count 1
  188. 0x91,0x02, // Output (Variable)
  189. 0x09,0x53, // Usage Trigger Button
  190. 0x15,0x01, // Logical Minimum 1
  191. 0x25,0x08, // Logical Maximum 8
  192. 0x35,0x01, // Physical Minimum 1
  193. 0x45,0x08, // Physical Maximum 8
  194. 0x75,0x08, // Report Size 8
  195. 0x95,0x01, // Report Count 1
  196. 0x91,0x02, // Output (Variable)
  197. 0x09,0x55, // Usage Axes Enable
  198. 0xA1,0x02, // Collection Datalink
  199. 0x05,0x01, // Usage Page Generic Desktop
  200. 0x09,0x30, // Usage X
  201. 0x09,0x31, // Usage Y
  202. 0x15,0x00, // Logical Minimum 0
  203. 0x25,0x01, // Logical Maximum 1
  204. 0x75,0x01, // Report Size 1
  205. 0x95,0x02, // Report Count 2
  206. 0x91,0x02, // Output (Variable)
  207. 0xC0 , // End Collection
  208. 0x05,0x0F, // Usage Page Physical Interface
  209. 0x09,0x56, // Usage Direction Enable
  210. 0x95,0x01, // Report Count 1
  211. 0x91,0x02, // Output (Variable)
  212. 0x95,0x05, // Report Count 5
  213. 0x91,0x03, // Output (Constant, Variable)
  214. 0x09,0x57, // Usage Direction
  215. 0xA1,0x02, // Collection Datalink
  216. 0x0B,0x01,0x00,0x0A,0x00, // Usage Ordinals: Instance 1
  217. 0x0B,0x02,0x00,0x0A,0x00, // Usage Ordinals: Instance 2
  218. 0x66,0x14,0x00, // Unit 14h (20d)
  219. 0x55,0xFE, // Unit Exponent FEh (254d)
  220. 0x15,0x00, // Logical Minimum 0
  221. 0x26,0xFF,0x00, // Logical Maximum FFh (255d)
  222. 0x35,0x00, // Physical Minimum 0
  223. 0x47,0xA0,0x8C,0x00,0x00, // Physical Maximum 8CA0h (36000d)
  224. 0x66,0x00,0x00, // Unit 0
  225. 0x75,0x08, // Report Size 8
  226. 0x95,0x02, // Report Count 2
  227. 0x91,0x02, // Output (Variable)
  228. 0x55,0x00, // Unit Exponent 0
  229. 0x66,0x00,0x00, // Unit 0
  230. 0xC0 , // End Collection
  231. 0x05,0x0F, // Usage Page Physical Interface
  232. 0x09,0xA7, // Usage Undefined
  233. 0x66,0x03,0x10, // Unit 1003h (4099d)
  234. 0x55,0xFD, // Unit Exponent FDh (253d)
  235. 0x15,0x00, // Logical Minimum 0
  236. 0x26,0xFF,0x7F, // Logical Maximum 7FFFh (32767d)
  237. 0x35,0x00, // Physical Minimum 0
  238. 0x46,0xFF,0x7F, // Physical Maximum 7FFFh (32767d)
  239. 0x75,0x10, // Report Size 10h (16d)
  240. 0x95,0x01, // Report Count 1
  241. 0x91,0x02, // Output (Variable)
  242. 0x66,0x00,0x00, // Unit 0
  243. 0x55,0x00, // Unit Exponent 0
  244. 0xC0 , // End Collection
  245. 0x05,0x0F, // Usage Page Physical Interface
  246. 0x09,0x5A, // Usage Set Envelope Report
  247. 0xA1,0x02, // Collection Datalink
  248. 0x85,0x02, // Report ID 2
  249. 0x09,0x22, // Usage Effect Block Index
  250. 0x15,0x01, // Logical Minimum 1
  251. 0x25,0x28, // Logical Maximum 28h (40d)
  252. 0x35,0x01, // Physical Minimum 1
  253. 0x45,0x28, // Physical Maximum 28h (40d)
  254. 0x75,0x08, // Report Size 8
  255. 0x95,0x01, // Report Count 1
  256. 0x91,0x02, // Output (Variable)
  257. 0x09,0x5B, // Usage Attack Level
  258. 0x09,0x5D, // Usage Fade Level
  259. 0x15,0x00, // Logical Minimum 0
  260. 0x26,0xFF,0x00, // Logical Maximum FFh (255d)
  261. 0x35,0x00, // Physical Minimum 0
  262. 0x46,0x10,0x27, // Physical Maximum 2710h (10000d)
  263. 0x95,0x02, // Report Count 2
  264. 0x91,0x02, // Output (Variable)
  265. 0x09,0x5C, // Usage Attack Time
  266. 0x09,0x5E, // Usage Fade Time
  267. 0x66,0x03,0x10, // Unit 1003h (4099d)
  268. 0x55,0xFD, // Unit Exponent FDh (253d)
  269. 0x26,0xFF,0x7F, // Logical Maximum 7FFFh (32767d)
  270. 0x46,0xFF,0x7F, // Physical Maximum 7FFFh (32767d)
  271. 0x75,0x10, // Report Size 10h (16d)
  272. 0x91,0x02, // Output (Variable)
  273. 0x45,0x00, // Physical Maximum 0
  274. 0x66,0x00,0x00, // Unit 0
  275. 0x55,0x00, // Unit Exponent 0
  276. 0xC0 , // End Collection
  277. 0x09,0x5F, // Usage Set Condition Report
  278. 0xA1,0x02, // Collection Datalink
  279. 0x85,0x03, // Report ID 3
  280. 0x09,0x22, // Usage Effect Block Index
  281. 0x15,0x01, // Logical Minimum 1
  282. 0x25,0x28, // Logical Maximum 28h (40d)
  283. 0x35,0x01, // Physical Minimum 1
  284. 0x45,0x28, // Physical Maximum 28h (40d)
  285. 0x75,0x08, // Report Size 8
  286. 0x95,0x01, // Report Count 1
  287. 0x91,0x02, // Output (Variable)
  288. 0x09,0x23, // Usage Parameter Block Offset
  289. 0x15,0x00, // Logical Minimum 0
  290. 0x25,0x01, // Logical Maximum 1
  291. 0x35,0x00, // Physical Minimum 0
  292. 0x45,0x01, // Physical Maximum 1
  293. 0x75,0x04, // Report Size 4
  294. 0x95,0x01, // Report Count 1
  295. 0x91,0x02, // Output (Variable)
  296. 0x09,0x58, // Usage Type Specific Block Off...
  297. 0xA1,0x02, // Collection Datalink
  298. 0x0B,0x01,0x00,0x0A,0x00, // Usage Ordinals: Instance 1
  299. 0x0B,0x02,0x00,0x0A,0x00, // Usage Ordinals: Instance 2
  300. 0x75,0x02, // Report Size 2
  301. 0x95,0x02, // Report Count 2
  302. 0x91,0x02, // Output (Variable)
  303. 0xC0 , // End Collection
  304. 0x15,0x80, // Logical Minimum 80h (-128d)
  305. 0x25,0x7F, // Logical Maximum 7Fh (127d)
  306. 0x36,0xF0,0xD8, // Physical Minimum D8F0h (-10000d)
  307. 0x46,0x10,0x27, // Physical Maximum 2710h (10000d)
  308. 0x09,0x60, // Usage CP Offset
  309. 0x75,0x08, // Report Size 8
  310. 0x95,0x01, // Report Count 1
  311. 0x91,0x02, // Output (Variable)
  312. 0x36,0xF0,0xD8, // Physical Minimum D8F0h (-10000d)
  313. 0x46,0x10,0x27, // Physical Maximum 2710h (10000d)
  314. 0x09,0x61, // Usage Positive Coefficient
  315. 0x09,0x62, // Usage Negative Coefficient
  316. 0x95,0x02, // Report Count 2
  317. 0x91,0x02, // Output (Variable)
  318. 0x15,0x00, // Logical Minimum 0
  319. 0x26,0xFF,0x00, // Logical Maximum FFh (255d)
  320. 0x35,0x00, // Physical Minimum 0
  321. 0x46,0x10,0x27, // Physical Maximum 2710h (10000d)
  322. 0x09,0x63, // Usage Positive Saturation
  323. 0x09,0x64, // Usage Negative Saturation
  324. 0x75,0x08, // Report Size 8
  325. 0x95,0x02, // Report Count 2
  326. 0x91,0x02, // Output (Variable)
  327. 0x09,0x65, // Usage Dead Band
  328. 0x46,0x10,0x27, // Physical Maximum 2710h (10000d)
  329. 0x95,0x01, // Report Count 1
  330. 0x91,0x02, // Output (Variable)
  331. 0xC0 , // End Collection
  332. 0x09,0x6E, // Usage Set Periodic Report
  333. 0xA1,0x02, // Collection Datalink
  334. 0x85,0x04, // Report ID 4
  335. 0x09,0x22, // Usage Effect Block Index
  336. 0x15,0x01, // Logical Minimum 1
  337. 0x25,0x28, // Logical Maximum 28h (40d)
  338. 0x35,0x01, // Physical Minimum 1
  339. 0x45,0x28, // Physical Maximum 28h (40d)
  340. 0x75,0x08, // Report Size 8
  341. 0x95,0x01, // Report Count 1
  342. 0x91,0x02, // Output (Variable)
  343. 0x09,0x70, // Usage Magnitude
  344. 0x15,0x00, // Logical Minimum 0
  345. 0x26,0xFF,0x00, // Logical Maximum FFh (255d)
  346. 0x35,0x00, // Physical Minimum 0
  347. 0x46,0x10,0x27, // Physical Maximum 2710h (10000d)
  348. 0x75,0x08, // Report Size 8
  349. 0x95,0x01, // Report Count 1
  350. 0x91,0x02, // Output (Variable)
  351. 0x09,0x6F, // Usage Offset
  352. 0x15,0x80, // Logical Minimum 80h (-128d)
  353. 0x25,0x7F, // Logical Maximum 7Fh (127d)
  354. 0x36,0xF0,0xD8, // Physical Minimum D8F0h (-10000d)
  355. 0x46,0x10,0x27, // Physical Maximum 2710h (10000d)
  356. 0x95,0x01, // Report Count 1
  357. 0x91,0x02, // Output (Variable)
  358. 0x09,0x71, // Usage Phase
  359. 0x66,0x14,0x00, // Unit 14h (20d)
  360. 0x55,0xFE, // Unit Exponent FEh (254d)
  361. 0x15,0x00, // Logical Minimum 0
  362. 0x26,0xFF,0x00, // Logical Maximum FFh (255d)
  363. 0x35,0x00, // Physical Minimum 0
  364. 0x47,0xA0,0x8C,0x00,0x00, // Physical Maximum 8CA0h (36000d)
  365. 0x91,0x02, // Output (Variable)
  366. 0x09,0x72, // Usage Period
  367. 0x26,0xFF,0x7F, // Logical Maximum 7FFFh (32767d)
  368. 0x46,0xFF,0x7F, // Physical Maximum 7FFFh (32767d)
  369. 0x66,0x03,0x10, // Unit 1003h (4099d)
  370. 0x55,0xFD, // Unit Exponent FDh (253d)
  371. 0x75,0x10, // Report Size 10h (16d)
  372. 0x95,0x01, // Report Count 1
  373. 0x91,0x02, // Output (Variable)
  374. 0x66,0x00,0x00, // Unit 0
  375. 0x55,0x00, // Unit Exponent 0
  376. 0xC0 , // End Collection
  377. 0x09,0x73, // Usage Set Constant Force Rep...
  378. 0xA1,0x02, // Collection Datalink
  379. 0x85,0x05, // Report ID 5
  380. 0x09,0x22, // Usage Effect Block Index
  381. 0x15,0x01, // Logical Minimum 1
  382. 0x25,0x28, // Logical Maximum 28h (40d)
  383. 0x35,0x01, // Physical Minimum 1
  384. 0x45,0x28, // Physical Maximum 28h (40d)
  385. 0x75,0x08, // Report Size 8
  386. 0x95,0x01, // Report Count 1
  387. 0x91,0x02, // Output (Variable)
  388. 0x09,0x70, // Usage Magnitude
  389. 0x16,0x01,0xFF, // Logical Minimum FF01h (-255d)
  390. 0x26,0xFF,0x00, // Logical Maximum FFh (255d)
  391. 0x36,0xF0,0xD8, // Physical Minimum D8F0h (-10000d)
  392. 0x46,0x10,0x27, // Physical Maximum 2710h (10000d)
  393. 0x75,0x10, // Report Size 10h (16d)
  394. 0x95,0x01, // Report Count 1
  395. 0x91,0x02, // Output (Variable)
  396. 0xC0 , // End Collection
  397. 0x09,0x74, // Usage Set Ramp Force Report
  398. 0xA1,0x02, // Collection Datalink
  399. 0x85,0x06, // Report ID 6
  400. 0x09,0x22, // Usage Effect Block Index
  401. 0x15,0x01, // Logical Minimum 1
  402. 0x25,0x28, // Logical Maximum 28h (40d)
  403. 0x35,0x01, // Physical Minimum 1
  404. 0x45,0x28, // Physical Maximum 28h (40d)
  405. 0x75,0x08, // Report Size 8
  406. 0x95,0x01, // Report Count 1
  407. 0x91,0x02, // Output (Variable)
  408. 0x09,0x75, // Usage Ramp Start
  409. 0x09,0x76, // Usage Ramp End
  410. 0x15,0x80, // Logical Minimum 80h (-128d)
  411. 0x25,0x7F, // Logical Maximum 7Fh (127d)
  412. 0x36,0xF0,0xD8, // Physical Minimum D8F0h (-10000d)
  413. 0x46,0x10,0x27, // Physical Maximum 2710h (10000d)
  414. 0x75,0x08, // Report Size 8
  415. 0x95,0x02, // Report Count 2
  416. 0x91,0x02, // Output (Variable)
  417. 0xC0 , // End Collection
  418. 0x09,0x68, // Usage Custom Force Data Rep...
  419. 0xA1,0x02, // Collection Datalink
  420. 0x85,0x07, // Report ID 7
  421. 0x09,0x22, // Usage Effect Block Index
  422. 0x15,0x01, // Logical Minimum 1
  423. 0x25,0x28, // Logical Maximum 28h (40d)
  424. 0x35,0x01, // Physical Minimum 1
  425. 0x45,0x28, // Physical Maximum 28h (40d)
  426. 0x75,0x08, // Report Size 8
  427. 0x95,0x01, // Report Count 1
  428. 0x91,0x02, // Output (Variable)
  429. 0x09,0x6C, // Usage Custom Force Data Offset
  430. 0x15,0x00, // Logical Minimum 0
  431. 0x26,0x10,0x27, // Logical Maximum 2710h (10000d)
  432. 0x35,0x00, // Physical Minimum 0
  433. 0x46,0x10,0x27, // Physical Maximum 2710h (10000d)
  434. 0x75,0x10, // Report Size 10h (16d)
  435. 0x95,0x01, // Report Count 1
  436. 0x91,0x02, // Output (Variable)
  437. 0x09,0x69, // Usage Custom Force Data
  438. 0x15,0x81, // Logical Minimum 81h (-127d)
  439. 0x25,0x7F, // Logical Maximum 7Fh (127d)
  440. 0x35,0x00, // Physical Minimum 0
  441. 0x46,0xFF,0x00, // Physical Maximum FFh (255d)
  442. 0x75,0x08, // Report Size 8
  443. 0x95,0x0C, // Report Count Ch (12d)
  444. 0x92,0x02,0x01, // Output (Variable, Buffered)
  445. 0xC0 , // End Collection
  446. 0x09,0x66, // Usage Download Force Sample
  447. 0xA1,0x02, // Collection Datalink
  448. 0x85,0x08, // Report ID 8
  449. 0x05,0x01, // Usage Page Generic Desktop
  450. 0x09,0x30, // Usage X
  451. 0x09,0x31, // Usage Y
  452. 0x15,0x81, // Logical Minimum 81h (-127d)
  453. 0x25,0x7F, // Logical Maximum 7Fh (127d)
  454. 0x35,0x00, // Physical Minimum 0
  455. 0x46,0xFF,0x00, // Physical Maximum FFh (255d)
  456. 0x75,0x08, // Report Size 8
  457. 0x95,0x02, // Report Count 2
  458. 0x91,0x02, // Output (Variable)
  459. 0xC0 , // End Collection
  460. 0x05,0x0F, // Usage Page Physical Interface
  461. 0x09,0x77, // Usage Effect Operation Report
  462. 0xA1,0x02, // Collection Datalink
  463. 0x85,0x0A, // Report ID Ah (10d)
  464. 0x09,0x22, // Usage Effect Block Index
  465. 0x15,0x01, // Logical Minimum 1
  466. 0x25,0x28, // Logical Maximum 28h (40d)
  467. 0x35,0x01, // Physical Minimum 1
  468. 0x45,0x28, // Physical Maximum 28h (40d)
  469. 0x75,0x08, // Report Size 8
  470. 0x95,0x01, // Report Count 1
  471. 0x91,0x02, // Output (Variable)
  472. 0x09,0x78, // Usage Operation
  473. 0xA1,0x02, // Collection Datalink
  474. 0x09,0x79, // Usage Op Effect Start (based on http://vjoystick.sourceforge.net/site/includes/SDK_ReadMe.pdf solo is stop all others)
  475. 0x09,0x7A, // Usage Op Effect Start Solo
  476. 0x09,0x7B, // Usage Op Effect Stop
  477. 0x15,0x01, // Logical Minimum 1
  478. 0x25,0x03, // Logical Maximum 3
  479. 0x75,0x08, // Report Size 8
  480. 0x95,0x01, // Report Count 1
  481. 0x91,0x00, // Output
  482. 0xC0 , // End Collection
  483. 0x09,0x7C, // Usage Loop Count (based on http://vjoystick.sourceforge.net/site/includes/SDK_ReadMe.pdf FF is loop until stop)
  484. 0x15,0x00, // Logical Minimum 0
  485. 0x26,0xFF,0x00, // Logical Maximum FFh (255d)
  486. 0x35,0x00, // Physical Minimum 0
  487. 0x46,0xFF,0x00, // Physical Maximum FFh (255d)
  488. 0x91,0x02, // Output (Variable)
  489. 0xC0 , // End Collection
  490. 0x09,0x90, // Usage PID State Report
  491. 0xA1,0x02, // Collection Datalink
  492. 0x85,0x0B, // Report ID Bh (11d)
  493. 0x09,0x22, // Usage Effect Block Index
  494. 0x25,0x28, // Logical Maximum 28h (40d)
  495. 0x15,0x01, // Logical Minimum 1
  496. 0x35,0x01, // Physical Minimum 1
  497. 0x45,0x28, // Physical Maximum 28h (40d)
  498. 0x75,0x08, // Report Size 8
  499. 0x95,0x01, // Report Count 1
  500. 0x91,0x02, // Output (Variable)
  501. 0xC0 , // End Collection
  502. 0x09,0x96, // Usage DC Disable Actuators
  503. 0xA1,0x02, // Collection Datalink
  504. 0x85,0x0C, // Report ID Ch (12d)
  505. 0x09,0x97, // Usage DC Stop All Effects
  506. 0x09,0x98, // Usage DC Device Reset
  507. 0x09,0x99, // Usage DC Device Pause
  508. 0x09,0x9A, // Usage DC Device Continue
  509. 0x09,0x9B, // Usage PID Device State
  510. 0x09,0x9C, // Usage DS Actuators Enabled
  511. 0x15,0x01, // Logical Minimum 1
  512. 0x25,0x06, // Logical Maximum 6
  513. 0x75,0x08, // Report Size 8
  514. 0x95,0x01, // Report Count 1
  515. 0x91,0x00, // Output
  516. 0xC0 , // End Collection
  517. 0x09,0x7D, // Usage PID Pool Report
  518. 0xA1,0x02, // Collection Datalink
  519. 0x85,0x0D, // Report ID Dh (13d)
  520. 0x09,0x7E, // Usage RAM Pool Size
  521. 0x15,0x00, // Logical Minimum 0
  522. 0x26,0xFF,0x00, // Logical Maximum FFh (255d)
  523. 0x35,0x00, // Physical Minimum 0
  524. 0x46,0x10,0x27, // Physical Maximum 2710h (10000d)
  525. 0x75,0x08, // Report Size 8
  526. 0x95,0x01, // Report Count 1
  527. 0x91,0x02, // Output (Variable)
  528. 0xC0 , // End Collection
  529. 0x09,0x6B, // Usage Set Custom Force Report
  530. 0xA1,0x02, // Collection Datalink
  531. 0x85,0x0E, // Report ID Eh (14d)
  532. 0x09,0x22, // Usage Effect Block Index
  533. 0x15,0x01, // Logical Minimum 1
  534. 0x25,0x28, // Logical Maximum 28h (40d)
  535. 0x35,0x01, // Physical Minimum 1
  536. 0x45,0x28, // Physical Maximum 28h (40d)
  537. 0x75,0x08, // Report Size 8
  538. 0x95,0x01, // Report Count 1
  539. 0x91,0x02, // Output (Variable)
  540. 0x09,0x6D, // Usage Sample Count
  541. 0x15,0x00, // Logical Minimum 0
  542. 0x26,0xFF,0x00, // Logical Maximum FFh (255d)
  543. 0x35,0x00, // Physical Minimum 0
  544. 0x46,0xFF,0x00, // Physical Maximum FFh (255d)
  545. 0x75,0x08, // Report Size 8
  546. 0x95,0x01, // Report Count 1
  547. 0x91,0x02, // Output (Variable)
  548. 0x09,0x51, // Usage Sample Period
  549. 0x66,0x03,0x10, // Unit 1003h (4099d)
  550. 0x55,0xFD, // Unit Exponent FDh (253d)
  551. 0x15,0x00, // Logical Minimum 0
  552. 0x26,0xFF,0x7F, // Logical Maximum 7FFFh (32767d)
  553. 0x35,0x00, // Physical Minimum 0
  554. 0x46,0xFF,0x7F, // Physical Maximum 7FFFh (32767d)
  555. 0x75,0x10, // Report Size 10h (16d)
  556. 0x95,0x01, // Report Count 1
  557. 0x91,0x02, // Output (Variable)
  558. 0x55,0x00, // Unit Exponent 0
  559. 0x66,0x00,0x00, // Unit 0
  560. 0xC0 , // End Collection
  561. 0x09,0xAB, // Usage Undefined
  562. 0xA1,0x02, // Collection Datalink
  563. 0x85,0x0f, // Report ID f //THIS WAS A 1, so it does not conflict with ps3
  564. 0x09,0x25, // Usage Effect Type
  565. 0xA1,0x02, // Collection Datalink
  566. 0x09,0x26, // Usage ET Constant Force
  567. 0x09,0x27, // Usage ET Ramp
  568. 0x09,0x30, // Usage ET Square
  569. 0x09,0x31, // Usage ET Sine
  570. 0x09,0x32, // Usage ET Triangle
  571. 0x09,0x33, // Usage ET Sawtooth Up
  572. 0x09,0x34, // Usage ET Sawtooth Down
  573. 0x09,0x40, // Usage ET Spring
  574. 0x09,0x41, // Usage ET Damper
  575. 0x09,0x42, // Usage ET Inertia
  576. 0x09,0x43, // Usage ET Friction
  577. 0x09,0x28, // Usage ET Custom Force Data
  578. 0x25,0x03, // Logical Maximum Ch (12d)
  579. 0x15,0x01, // Logical Minimum 1
  580. 0x35,0x01, // Physical Minimum 1
  581. 0x45,0x03, // Physical Maximum Ch (12d)
  582. 0x75,0x08, // Report Size 8
  583. 0x95,0x01, // Report Count 1
  584. 0xB1,0x00, // Feature
  585. 0xC0 , // End Collection
  586. 0x05,0x01, // Usage Page Generic Desktop
  587. 0x09,0x3B, // Usage Byte Count
  588. 0x15,0x00, // Logical Minimum 0
  589. 0x26,0xFF,0x01, // Logical Maximum 1FFh (511d)
  590. 0x35,0x00, // Physical Minimum 0
  591. 0x46,0xFF,0x01, // Physical Maximum 1FFh (511d)
  592. 0x75,0x0A, // Report Size Ah (10d)
  593. 0x95,0x01, // Report 1
  594. 0xB1,0x02, // Feature (Variable)
  595. 0x75,0x06, // Report Size 6
  596. 0xB1,0x01, // Feature (Constant)
  597. 0xC0 , // End Collection
  598. 0x05,0x0F, // Usage Page Physical Interface
  599. 0x09,0x89, // Usage Block Load Status
  600. 0xA1,0x02, // Collection Datalink
  601. 0x85,0x02, // Report ID 2
  602. 0x09,0x22, // Usage Effect Block Index
  603. 0x25,0x28, // Logical Maximum 28h (40d)
  604. 0x15,0x01, // Logical Minimum 1
  605. 0x35,0x01, // Physical Minimum 1
  606. 0x45,0x28, // Physical Maximum 28h (40d)
  607. 0x75,0x08, // Report Size 8
  608. 0x95,0x01, // Report Count 1
  609. 0xB1,0x02, // Feature (Variable)
  610. 0x09,0x8B, // Usage Block Load Full
  611. 0xA1,0x02, // Collection Datalink
  612. 0x09,0x8C, // Usage Block Load Error
  613. 0x09,0x8D, // Usage Block Handle
  614. 0x09,0x8E, // Usage PID Block Free Report
  615. 0x25,0x03, // Logical Maximum 3
  616. 0x15,0x01, // Logical Minimum 1
  617. 0x35,0x01, // Physical Minimum 1
  618. 0x45,0x03, // Physical Maximum 3
  619. 0x75,0x08, // Report Size 8
  620. 0x95,0x01, // Report Count 1
  621. 0xB1,0x00, // Feature
  622. 0xC0 , // End Collection
  623. 0x09,0xAC, // Usage Undefined
  624. 0x15,0x00, // Logical Minimum 0
  625. 0x27,0xFF,0xFF,0x00,0x00, // Logical Maximum FFFFh (65535d)
  626. 0x35,0x00, // Physical Minimum 0
  627. 0x47,0xFF,0xFF,0x00,0x00, // Physical Maximum FFFFh (65535d)
  628. 0x75,0x10, // Report Size 10h (16d)
  629. 0x95,0x01, // Report Count 1
  630. 0xB1,0x00, // Feature
  631. 0xC0 , // End Collection
  632. 0x09,0x7F, // Usage ROM Pool Size
  633. 0xA1,0x02, // Collection Datalink
  634. 0x85,0x03, // Report ID 3
  635. 0x09,0x80, // Usage ROM Effect Block Count
  636. 0x75,0x10, // Report Size 10h (16d)
  637. 0x95,0x01, // Report Count 1
  638. 0x15,0x00, // Logical Minimum 0
  639. 0x35,0x00, // Physical Minimum 0
  640. 0x27,0xFF,0xFF,0x00,0x00, // Logical Maximum FFFFh (65535d)
  641. 0x47,0xFF,0xFF,0x00,0x00, // Physical Maximum FFFFh (65535d)
  642. 0xB1,0x02, // Feature (Variable)
  643. 0x09,0x83, // Usage PID Pool Move Report
  644. 0x26,0xFF,0x00, // Logical Maximum FFh (255d)
  645. 0x46,0xFF,0x00, // Physical Maximum FFh (255d)
  646. 0x75,0x08, // Report Size 8
  647. 0x95,0x01, // Report Count 1
  648. 0xB1,0x02, // Feature (Variable)
  649. 0x09,0xA9, // Usage Undefined
  650. 0x09,0xAA, // Usage Undefined
  651. 0x75,0x01, // Report Size 1
  652. 0x95,0x02, // Report Count 2
  653. 0x15,0x00, // Logical Minimum 0
  654. 0x25,0x01, // Logical Maximum 1
  655. 0x35,0x00, // Physical Minimum 0
  656. 0x45,0x01, // Physical Maximum 1
  657. 0xB1,0x02, // Feature (Variable)
  658. 0x75,0x06, // Report Size 6
  659. 0x95,0x01, // Report Count 1
  660. 0xB1,0x03, // Feature (Constant, Variable)
  661.  
  662. //api
  663.  
  664. 0x15, 0x00, // LOGICAL_MINIMUM (0)
  665. 0x26, 0xff, 0x00, // LOGICAL_MAXIMUM (255)
  666. 0x75, 0x08, // REPORT_SIZE (8)
  667.  
  668. //generic (64 size) - good speed coudl always make a smaller packet
  669.  
  670. //get
  671. 0x85, 0x11, // REPORT_ID (17)
  672. 0x95, 0x20, // REPORT_COUNT (64)
  673. 0x09, 0x00, // USAGE (Undefined)
  674. 0xb2, 0x02, 0x01, // FEATURE (Data,Var,Abs,Buf)
  675.  
  676. //send
  677. 0x85, 0x12, // REPORT_ID (18)
  678. 0x95, 0x44, // REPORT_COUNT (68) 64+(rid,command, 0, 0)
  679. 0x09, 0x00, // USAGE (Undefined)
  680. 0xb2, 0x02, 0x01, // FEATURE (Data,Var,Abs,Buf)
  681.  
  682. //LDC DC
  683.  
  684. //get
  685. 0x85, 0x13, // REPORT_ID (19)
  686. 0x95, 0xc0, // REPORT_COUNT (192)
  687. 0x09, 0x00, // USAGE (Undefined)
  688. 0xb2, 0x02, 0x01, // FEATURE (Data,Var,Abs,Buf)
  689.  
  690. //send
  691. 0x85, 0x14, // REPORT_ID (20)
  692. 0x95, 0xc4, // REPORT_COUNT (196) 192+(rid,command, 0, 0)
  693. 0x09, 0x00, // USAGE (Undefined)
  694. 0xb2, 0x02, 0x01, // FEATURE (Data,Var,Abs,Buf)
  695.  
  696.  
  697. 0xC0, // End Collection
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement