Advertisement
Guest User

Untitled

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