823 line
31KB

  1. /* Teensyduino Core Library
  2. * http://www.pjrc.com/teensy/
  3. * Copyright (c) 2017 PJRC.COM, LLC.
  4. *
  5. * Permission is hereby granted, free of charge, to any person obtaining
  6. * a copy of this software and associated documentation files (the
  7. * "Software"), to deal in the Software without restriction, including
  8. * without limitation the rights to use, copy, modify, merge, publish,
  9. * distribute, sublicense, and/or sell copies of the Software, and to
  10. * permit persons to whom the Software is furnished to do so, subject to
  11. * the following conditions:
  12. *
  13. * 1. The above copyright notice and this permission notice shall be
  14. * included in all copies or substantial portions of the Software.
  15. *
  16. * 2. If the Software is incorporated into a build system that allows
  17. * selection among a list of target devices, then similar target
  18. * devices manufactured by PJRC.COM must be included in the list of
  19. * target devices and selectable in the same manner.
  20. *
  21. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  22. * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  23. * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  24. * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
  25. * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
  26. * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
  27. * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  28. * SOFTWARE.
  29. */
  30. #ifndef _usb_desc_h_
  31. #define _usb_desc_h_
  32. // This header is NOT meant to be included when compiling
  33. // user sketches in Arduino. The low-level functions
  34. // provided by usb_dev.c are meant to be called only by
  35. // code which provides higher-level interfaces to the user.
  36. #include <stdint.h>
  37. #include <stddef.h>
  38. #define ENDPOINT_UNUSED 0x00
  39. #define ENDPOINT_TRANSIMIT_ONLY 0x15
  40. #define ENDPOINT_RECEIVE_ONLY 0x19
  41. #define ENDPOINT_TRANSMIT_AND_RECEIVE 0x1D
  42. #define ENDPOINT_RECEIVE_ISOCHRONOUS 0x18
  43. #define ENDPOINT_TRANSMIT_ISOCHRONOUS 0x14
  44. /*
  45. Each group of #define lines below corresponds to one of the
  46. settings in the Tools > USB Type menu. This file defines what
  47. type of USB device is actually created for each of those menu
  48. options.
  49. Each "interface" is a set of functionality your PC or Mac will
  50. use and treat as if it is a unique device. Within each interface,
  51. the "endpoints" are the actual communication channels. Most
  52. interfaces use 1, 2 or 3 endpoints. By editing only this file,
  53. you can customize the USB Types to be any collection of interfaces.
  54. To modify a USB Type, delete the XYZ_INTERFACE lines for any
  55. interfaces you wish to remove, and copy them from another USB Type
  56. for any you want to add.
  57. Give each interface a unique number, and edit NUM_INTERFACE to
  58. reflect the total number of interfaces.
  59. Next, assign unique endpoint numbers to all the endpoints across
  60. all the interfaces your device has. You can reuse an endpoint
  61. number for transmit and receive, but the same endpoint number must
  62. not be used twice to transmit, or twice to receive.
  63. Most endpoints also require their maximum size, and some also
  64. need an interval specification (the number of milliseconds the
  65. PC will check for data from that endpoint). For existing
  66. interfaces, usually these other settings should not be changed.
  67. Edit NUM_ENDPOINTS to be at least the largest endpoint number used.
  68. Edit NUM_USB_BUFFERS to control how much memory the USB stack will
  69. allocate. At least 2 should be used for each endpoint. More
  70. memory will allow higher throughput for user programs that have
  71. high latency (eg, spending time doing things other than interacting
  72. with the USB).
  73. Edit the ENDPOINT*_CONFIG lines so each endpoint is configured
  74. the proper way (transmit, receive, or both).
  75. If you are using existing interfaces (making your own device with
  76. a different set of interfaces) the code in all other files should
  77. automatically adapt to the new endpoints you specify here.
  78. If you need to create a new type of interface, you'll need to write
  79. the code which sends and receives packets, and presents an API to
  80. the user. Usually, a pair of files are added for the actual code,
  81. and code is also added in usb_dev.c for any control transfers,
  82. interrupt-level code, or other very low-level stuff not possible
  83. from the packet send/receive functons. Code also is added in
  84. usb_inst.c to create an instance of your C++ object. This message
  85. gives a quick summary of things you will need to know:
  86. https://forum.pjrc.com/threads/49045?p=164512&viewfull=1#post164512
  87. You may edit the Vendor and Product ID numbers, and strings. If
  88. the numbers are changed, Teensyduino may not be able to automatically
  89. find and reboot your board when you click the Upload button in
  90. the Arduino IDE. You will need to press the Program button on
  91. Teensy to initiate programming.
  92. Some operating systems, especially Windows, may cache USB device
  93. info. Changes to the device name may not update on the same
  94. computer unless the vendor or product ID numbers change, or the
  95. "bcdDevice" revision code is increased.
  96. If these instructions are missing steps or could be improved, please
  97. let me know? http://forum.pjrc.com/forums/4-Suggestions-amp-Bug-Reports
  98. */
  99. #if defined(USB_SERIAL)
  100. #define VENDOR_ID 0x16C0
  101. #define PRODUCT_ID 0x0483
  102. #define DEVICE_CLASS 2 // 2 = Communication Class
  103. #define MANUFACTURER_NAME {'T','e','e','n','s','y','d','u','i','n','o'}
  104. #define MANUFACTURER_NAME_LEN 11
  105. #define PRODUCT_NAME {'U','S','B',' ','S','e','r','i','a','l'}
  106. #define PRODUCT_NAME_LEN 10
  107. #define EP0_SIZE 64
  108. #define NUM_ENDPOINTS 4
  109. #define NUM_USB_BUFFERS 12
  110. #define NUM_INTERFACE 2
  111. #define CDC_STATUS_INTERFACE 0
  112. #define CDC_DATA_INTERFACE 1
  113. #define CDC_ACM_ENDPOINT 2
  114. #define CDC_RX_ENDPOINT 3
  115. #define CDC_TX_ENDPOINT 4
  116. #define CDC_ACM_SIZE 16
  117. #define CDC_RX_SIZE 64
  118. #define CDC_TX_SIZE 64
  119. #define ENDPOINT2_CONFIG ENDPOINT_TRANSIMIT_ONLY
  120. #define ENDPOINT3_CONFIG ENDPOINT_RECEIVE_ONLY
  121. #define ENDPOINT4_CONFIG ENDPOINT_TRANSIMIT_ONLY
  122. #elif defined(USB_KEYBOARDONLY)
  123. #define VENDOR_ID 0x16C0
  124. #define PRODUCT_ID 0x04D0
  125. #define MANUFACTURER_NAME {'T','e','e','n','s','y','d','u','i','n','o'}
  126. #define MANUFACTURER_NAME_LEN 11
  127. #define PRODUCT_NAME {'K','e','y','b','o','a','r','d'}
  128. #define PRODUCT_NAME_LEN 8
  129. #define EP0_SIZE 64
  130. #define NUM_ENDPOINTS 4
  131. #define NUM_USB_BUFFERS 14
  132. #define NUM_INTERFACE 3
  133. #define SEREMU_INTERFACE 1 // Serial emulation
  134. #define SEREMU_TX_ENDPOINT 1
  135. #define SEREMU_TX_SIZE 64
  136. #define SEREMU_TX_INTERVAL 1
  137. #define SEREMU_RX_ENDPOINT 2
  138. #define SEREMU_RX_SIZE 32
  139. #define SEREMU_RX_INTERVAL 2
  140. #define KEYBOARD_INTERFACE 0 // Keyboard
  141. #define KEYBOARD_ENDPOINT 3
  142. #define KEYBOARD_SIZE 8
  143. #define KEYBOARD_INTERVAL 1
  144. #define KEYMEDIA_INTERFACE 2 // Keyboard Media Keys
  145. #define KEYMEDIA_ENDPOINT 4
  146. #define KEYMEDIA_SIZE 8
  147. #define KEYMEDIA_INTERVAL 4
  148. #define ENDPOINT1_CONFIG ENDPOINT_TRANSIMIT_ONLY
  149. #define ENDPOINT2_CONFIG ENDPOINT_RECEIVE_ONLY
  150. #define ENDPOINT3_CONFIG ENDPOINT_TRANSIMIT_ONLY
  151. #define ENDPOINT4_CONFIG ENDPOINT_TRANSIMIT_ONLY
  152. #define ENDPOINT5_CONFIG ENDPOINT_TRANSIMIT_ONLY
  153. #define ENDPOINT6_CONFIG ENDPOINT_TRANSIMIT_ONLY
  154. #elif defined(USB_HID)
  155. #define VENDOR_ID 0x16C0
  156. #define PRODUCT_ID 0x0482
  157. #define MANUFACTURER_NAME {'T','e','e','n','s','y','d','u','i','n','o'}
  158. #define MANUFACTURER_NAME_LEN 11
  159. #define PRODUCT_NAME {'K','e','y','b','o','a','r','d','/','M','o','u','s','e','/','J','o','y','s','t','i','c','k'}
  160. #define PRODUCT_NAME_LEN 23
  161. #define EP0_SIZE 64
  162. #define NUM_ENDPOINTS 6
  163. #define NUM_USB_BUFFERS 24
  164. #define NUM_INTERFACE 5
  165. #define SEREMU_INTERFACE 2 // Serial emulation
  166. #define SEREMU_TX_ENDPOINT 1
  167. #define SEREMU_TX_SIZE 64
  168. #define SEREMU_TX_INTERVAL 1
  169. #define SEREMU_RX_ENDPOINT 2
  170. #define SEREMU_RX_SIZE 32
  171. #define SEREMU_RX_INTERVAL 2
  172. #define KEYBOARD_INTERFACE 0 // Keyboard
  173. #define KEYBOARD_ENDPOINT 3
  174. #define KEYBOARD_SIZE 8
  175. #define KEYBOARD_INTERVAL 1
  176. #define KEYMEDIA_INTERFACE 4 // Keyboard Media Keys
  177. #define KEYMEDIA_ENDPOINT 6
  178. #define KEYMEDIA_SIZE 8
  179. #define KEYMEDIA_INTERVAL 4
  180. #define MOUSE_INTERFACE 1 // Mouse
  181. #define MOUSE_ENDPOINT 5
  182. #define MOUSE_SIZE 8
  183. #define MOUSE_INTERVAL 1
  184. #define JOYSTICK_INTERFACE 3 // Joystick
  185. #define JOYSTICK_ENDPOINT 4
  186. #define JOYSTICK_SIZE 12 // 12 = normal, 64 = extreme joystick
  187. #define JOYSTICK_INTERVAL 2
  188. #define ENDPOINT1_CONFIG ENDPOINT_TRANSIMIT_ONLY
  189. #define ENDPOINT2_CONFIG ENDPOINT_RECEIVE_ONLY
  190. #define ENDPOINT3_CONFIG ENDPOINT_TRANSIMIT_ONLY
  191. #define ENDPOINT4_CONFIG ENDPOINT_TRANSIMIT_ONLY
  192. #define ENDPOINT5_CONFIG ENDPOINT_TRANSIMIT_ONLY
  193. #define ENDPOINT6_CONFIG ENDPOINT_TRANSIMIT_ONLY
  194. #elif defined(USB_SERIAL_HID)
  195. #define VENDOR_ID 0x16C0
  196. #define PRODUCT_ID 0x0487
  197. #define DEVICE_CLASS 0xEF
  198. #define DEVICE_SUBCLASS 0x02
  199. #define DEVICE_PROTOCOL 0x01
  200. #define MANUFACTURER_NAME {'T','e','e','n','s','y','d','u','i','n','o'}
  201. #define MANUFACTURER_NAME_LEN 11
  202. #define PRODUCT_NAME {'S','e','r','i','a','l','/','K','e','y','b','o','a','r','d','/','M','o','u','s','e','/','J','o','y','s','t','i','c','k'}
  203. #define PRODUCT_NAME_LEN 30
  204. #define EP0_SIZE 64
  205. #define NUM_ENDPOINTS 7
  206. #define NUM_USB_BUFFERS 30
  207. #define NUM_INTERFACE 6
  208. #define CDC_IAD_DESCRIPTOR 1
  209. #define CDC_STATUS_INTERFACE 0
  210. #define CDC_DATA_INTERFACE 1 // Serial
  211. #define CDC_ACM_ENDPOINT 2
  212. #define CDC_RX_ENDPOINT 3
  213. #define CDC_TX_ENDPOINT 4
  214. #define CDC_ACM_SIZE 16
  215. #define CDC_RX_SIZE 64
  216. #define CDC_TX_SIZE 64
  217. #define KEYBOARD_INTERFACE 2 // Keyboard
  218. #define KEYBOARD_ENDPOINT 1
  219. #define KEYBOARD_SIZE 8
  220. #define KEYBOARD_INTERVAL 1
  221. #define KEYMEDIA_INTERFACE 5 // Keyboard Media Keys
  222. #define KEYMEDIA_ENDPOINT 7
  223. #define KEYMEDIA_SIZE 8
  224. #define KEYMEDIA_INTERVAL 4
  225. #define MOUSE_INTERFACE 3 // Mouse
  226. #define MOUSE_ENDPOINT 5
  227. #define MOUSE_SIZE 8
  228. #define MOUSE_INTERVAL 2
  229. #define JOYSTICK_INTERFACE 4 // Joystick
  230. #define JOYSTICK_ENDPOINT 6
  231. #define JOYSTICK_SIZE 12 // 12 = normal, 64 = extreme joystick
  232. #define JOYSTICK_INTERVAL 1
  233. #define ENDPOINT1_CONFIG ENDPOINT_TRANSIMIT_ONLY
  234. #define ENDPOINT2_CONFIG ENDPOINT_TRANSIMIT_ONLY
  235. #define ENDPOINT3_CONFIG ENDPOINT_RECEIVE_ONLY
  236. #define ENDPOINT4_CONFIG ENDPOINT_TRANSIMIT_ONLY
  237. #define ENDPOINT5_CONFIG ENDPOINT_TRANSIMIT_ONLY
  238. #define ENDPOINT6_CONFIG ENDPOINT_TRANSIMIT_ONLY
  239. #define ENDPOINT7_CONFIG ENDPOINT_TRANSIMIT_ONLY
  240. #elif defined(USB_TOUCHSCREEN)
  241. #define VENDOR_ID 0x16C0
  242. #define PRODUCT_ID 0x04D3
  243. #define MANUFACTURER_NAME {'T','e','e','n','s','y','d','u','i','n','o'}
  244. #define MANUFACTURER_NAME_LEN 11
  245. #define PRODUCT_NAME {'K','e','y','b','o','a','r','d','/','T','o','u','c','h','s','c','r','e','e','n'}
  246. #define PRODUCT_NAME_LEN 20
  247. #define EP0_SIZE 64
  248. #define NUM_ENDPOINTS 5
  249. #define NUM_USB_BUFFERS 15
  250. #define NUM_INTERFACE 4
  251. #define SEREMU_INTERFACE 1 // Serial emulation
  252. #define SEREMU_TX_ENDPOINT 1
  253. #define SEREMU_TX_SIZE 64
  254. #define SEREMU_TX_INTERVAL 1
  255. #define SEREMU_RX_ENDPOINT 2
  256. #define SEREMU_RX_SIZE 32
  257. #define SEREMU_RX_INTERVAL 2
  258. #define KEYBOARD_INTERFACE 0 // Keyboard
  259. #define KEYBOARD_ENDPOINT 3
  260. #define KEYBOARD_SIZE 8
  261. #define KEYBOARD_INTERVAL 1
  262. #define KEYMEDIA_INTERFACE 2 // Keyboard Media Keys
  263. #define KEYMEDIA_ENDPOINT 4
  264. #define KEYMEDIA_SIZE 8
  265. #define KEYMEDIA_INTERVAL 4
  266. #define MULTITOUCH_INTERFACE 3 // Touchscreen
  267. #define MULTITOUCH_ENDPOINT 5
  268. #define MULTITOUCH_SIZE 9
  269. #define MULTITOUCH_FINGERS 10
  270. #define ENDPOINT1_CONFIG ENDPOINT_TRANSIMIT_ONLY
  271. #define ENDPOINT2_CONFIG ENDPOINT_RECEIVE_ONLY
  272. #define ENDPOINT3_CONFIG ENDPOINT_TRANSIMIT_ONLY
  273. #define ENDPOINT4_CONFIG ENDPOINT_TRANSIMIT_ONLY
  274. #define ENDPOINT5_CONFIG ENDPOINT_TRANSIMIT_ONLY
  275. #elif defined(USB_HID_TOUCHSCREEN)
  276. #define VENDOR_ID 0x16C0
  277. #define PRODUCT_ID 0x04D4
  278. #define MANUFACTURER_NAME {'T','e','e','n','s','y','d','u','i','n','o'}
  279. #define MANUFACTURER_NAME_LEN 11
  280. #define PRODUCT_NAME {'K','e','y','b','o','a','r','d','/','M','o','u','s','e','/','T','o','u','c','h','s','c','r','e','e','n'}
  281. #define PRODUCT_NAME_LEN 26
  282. #define EP0_SIZE 64
  283. #define NUM_ENDPOINTS 6
  284. #define NUM_USB_BUFFERS 20
  285. #define NUM_INTERFACE 5
  286. #define SEREMU_INTERFACE 2 // Serial emulation
  287. #define SEREMU_TX_ENDPOINT 1
  288. #define SEREMU_TX_SIZE 64
  289. #define SEREMU_TX_INTERVAL 1
  290. #define SEREMU_RX_ENDPOINT 2
  291. #define SEREMU_RX_SIZE 32
  292. #define SEREMU_RX_INTERVAL 2
  293. #define KEYBOARD_INTERFACE 0 // Keyboard
  294. #define KEYBOARD_ENDPOINT 3
  295. #define KEYBOARD_SIZE 8
  296. #define KEYBOARD_INTERVAL 1
  297. #define KEYMEDIA_INTERFACE 3 // Keyboard Media Keys
  298. #define KEYMEDIA_ENDPOINT 4
  299. #define KEYMEDIA_SIZE 8
  300. #define KEYMEDIA_INTERVAL 4
  301. #define MOUSE_INTERFACE 1 // Mouse
  302. #define MOUSE_ENDPOINT 6
  303. #define MOUSE_SIZE 8
  304. #define MOUSE_INTERVAL 2
  305. #define MULTITOUCH_INTERFACE 4 // Touchscreen
  306. #define MULTITOUCH_ENDPOINT 5
  307. #define MULTITOUCH_SIZE 9
  308. #define MULTITOUCH_FINGERS 10
  309. #define ENDPOINT1_CONFIG ENDPOINT_TRANSIMIT_ONLY
  310. #define ENDPOINT2_CONFIG ENDPOINT_RECEIVE_ONLY
  311. #define ENDPOINT3_CONFIG ENDPOINT_TRANSIMIT_ONLY
  312. #define ENDPOINT4_CONFIG ENDPOINT_TRANSIMIT_ONLY
  313. #define ENDPOINT5_CONFIG ENDPOINT_TRANSIMIT_ONLY
  314. #define ENDPOINT6_CONFIG ENDPOINT_TRANSIMIT_ONLY
  315. #elif defined(USB_MIDI)
  316. #define VENDOR_ID 0x16C0
  317. #define PRODUCT_ID 0x0485
  318. #define MANUFACTURER_NAME {'T','e','e','n','s','y','d','u','i','n','o'}
  319. #define MANUFACTURER_NAME_LEN 11
  320. #define PRODUCT_NAME {'T','e','e','n','s','y',' ','M','I','D','I'}
  321. #define PRODUCT_NAME_LEN 11
  322. #define EP0_SIZE 64
  323. #define NUM_ENDPOINTS 4
  324. #define NUM_USB_BUFFERS 16
  325. #define NUM_INTERFACE 2
  326. #define SEREMU_INTERFACE 1 // Serial emulation
  327. #define SEREMU_TX_ENDPOINT 1
  328. #define SEREMU_TX_SIZE 64
  329. #define SEREMU_TX_INTERVAL 1
  330. #define SEREMU_RX_ENDPOINT 2
  331. #define SEREMU_RX_SIZE 32
  332. #define SEREMU_RX_INTERVAL 2
  333. #define MIDI_INTERFACE 0 // MIDI
  334. #define MIDI_NUM_CABLES 1
  335. #define MIDI_TX_ENDPOINT 3
  336. #define MIDI_TX_SIZE 64
  337. #define MIDI_RX_ENDPOINT 4
  338. #define MIDI_RX_SIZE 64
  339. #define ENDPOINT1_CONFIG ENDPOINT_TRANSIMIT_ONLY
  340. #define ENDPOINT2_CONFIG ENDPOINT_RECEIVE_ONLY
  341. #define ENDPOINT3_CONFIG ENDPOINT_TRANSIMIT_ONLY
  342. #define ENDPOINT4_CONFIG ENDPOINT_RECEIVE_ONLY
  343. #elif defined(USB_MIDI_X8)
  344. #define VENDOR_ID 0x16C0
  345. #define PRODUCT_ID 0x0485
  346. #define BCD_DEVICE 0x0300
  347. #define MANUFACTURER_NAME {'T','e','e','n','s','y','d','u','i','n','o'}
  348. #define MANUFACTURER_NAME_LEN 11
  349. #define PRODUCT_NAME {'T','e','e','n','s','y',' ','M','I','D','I','x','8'}
  350. #define PRODUCT_NAME_LEN 13
  351. #define EP0_SIZE 64
  352. #define NUM_ENDPOINTS 4
  353. #define NUM_USB_BUFFERS 16
  354. #define NUM_INTERFACE 2
  355. #define SEREMU_INTERFACE 1 // Serial emulation
  356. #define SEREMU_TX_ENDPOINT 1
  357. #define SEREMU_TX_SIZE 64
  358. #define SEREMU_TX_INTERVAL 1
  359. #define SEREMU_RX_ENDPOINT 2
  360. #define SEREMU_RX_SIZE 32
  361. #define SEREMU_RX_INTERVAL 2
  362. #define MIDI_INTERFACE 0 // MIDI
  363. #define MIDI_NUM_CABLES 8
  364. #define MIDI_TX_ENDPOINT 3
  365. #define MIDI_TX_SIZE 64
  366. #define MIDI_RX_ENDPOINT 4
  367. #define MIDI_RX_SIZE 64
  368. #define ENDPOINT1_CONFIG ENDPOINT_TRANSIMIT_ONLY
  369. #define ENDPOINT2_CONFIG ENDPOINT_RECEIVE_ONLY
  370. #define ENDPOINT3_CONFIG ENDPOINT_TRANSIMIT_ONLY
  371. #define ENDPOINT4_CONFIG ENDPOINT_RECEIVE_ONLY
  372. #elif defined(USB_MIDI_SERIAL)
  373. #define VENDOR_ID 0x16C0
  374. #define PRODUCT_ID 0x0489
  375. #define MANUFACTURER_NAME {'T','e','e','n','s','y','d','u','i','n','o'}
  376. #define MANUFACTURER_NAME_LEN 11
  377. #define PRODUCT_NAME {'T','e','e','n','s','y',' ','M','I','D','I'}
  378. #define PRODUCT_NAME_LEN 11
  379. #define EP0_SIZE 64
  380. #define NUM_ENDPOINTS 5
  381. #define NUM_USB_BUFFERS 30
  382. #define NUM_INTERFACE 3
  383. #define CDC_IAD_DESCRIPTOR 1
  384. #define CDC_STATUS_INTERFACE 0
  385. #define CDC_DATA_INTERFACE 1 // Serial
  386. #define CDC_ACM_ENDPOINT 1
  387. #define CDC_RX_ENDPOINT 2
  388. #define CDC_TX_ENDPOINT 3
  389. #define CDC_ACM_SIZE 16
  390. #define CDC_RX_SIZE 64
  391. #define CDC_TX_SIZE 64
  392. #define MIDI_INTERFACE 2 // MIDI
  393. #define MIDI_NUM_CABLES 1
  394. #define MIDI_TX_ENDPOINT 4
  395. #define MIDI_TX_SIZE 64
  396. #define MIDI_RX_ENDPOINT 5
  397. #define MIDI_RX_SIZE 64
  398. #define ENDPOINT1_CONFIG ENDPOINT_TRANSIMIT_ONLY
  399. #define ENDPOINT2_CONFIG ENDPOINT_RECEIVE_ONLY
  400. #define ENDPOINT3_CONFIG ENDPOINT_TRANSIMIT_ONLY
  401. #define ENDPOINT4_CONFIG ENDPOINT_TRANSIMIT_ONLY
  402. #define ENDPOINT5_CONFIG ENDPOINT_RECEIVE_ONLY
  403. #elif defined(USB_MIDI_X8_SERIAL)
  404. #define VENDOR_ID 0x16C0
  405. #define PRODUCT_ID 0x0489
  406. #define BCD_DEVICE 0x0300
  407. #define MANUFACTURER_NAME {'T','e','e','n','s','y','d','u','i','n','o'}
  408. #define MANUFACTURER_NAME_LEN 11
  409. #define PRODUCT_NAME {'T','e','e','n','s','y',' ','M','I','D','I','x','8'}
  410. #define PRODUCT_NAME_LEN 13
  411. #define EP0_SIZE 64
  412. #define NUM_ENDPOINTS 5
  413. #define NUM_USB_BUFFERS 30
  414. #define NUM_INTERFACE 3
  415. #define CDC_IAD_DESCRIPTOR 1
  416. #define CDC_STATUS_INTERFACE 0
  417. #define CDC_DATA_INTERFACE 1 // Serial
  418. #define CDC_ACM_ENDPOINT 1
  419. #define CDC_RX_ENDPOINT 2
  420. #define CDC_TX_ENDPOINT 3
  421. #define CDC_ACM_SIZE 16
  422. #define CDC_RX_SIZE 64
  423. #define CDC_TX_SIZE 64
  424. #define MIDI_INTERFACE 2 // MIDI
  425. #define MIDI_NUM_CABLES 8
  426. #define MIDI_TX_ENDPOINT 4
  427. #define MIDI_TX_SIZE 64
  428. #define MIDI_RX_ENDPOINT 5
  429. #define MIDI_RX_SIZE 64
  430. #define ENDPOINT1_CONFIG ENDPOINT_TRANSIMIT_ONLY
  431. #define ENDPOINT2_CONFIG ENDPOINT_RECEIVE_ONLY
  432. #define ENDPOINT3_CONFIG ENDPOINT_TRANSIMIT_ONLY
  433. #define ENDPOINT4_CONFIG ENDPOINT_TRANSIMIT_ONLY
  434. #define ENDPOINT5_CONFIG ENDPOINT_RECEIVE_ONLY
  435. #elif defined(USB_RAWHID)
  436. #define VENDOR_ID 0x16C0
  437. #define PRODUCT_ID 0x0486
  438. #define RAWHID_USAGE_PAGE 0xFFAB // recommended: 0xFF00 to 0xFFFF
  439. #define RAWHID_USAGE 0x0200 // recommended: 0x0100 to 0xFFFF
  440. #define MANUFACTURER_NAME {'T','e','e','n','s','y','d','u','i','n','o'}
  441. #define MANUFACTURER_NAME_LEN 11
  442. #define PRODUCT_NAME {'T','e','e','n','s','y','d','u','i','n','o',' ','R','a','w','H','I','D'}
  443. #define PRODUCT_NAME_LEN 18
  444. #define EP0_SIZE 64
  445. #define NUM_ENDPOINTS 4
  446. #define NUM_USB_BUFFERS 12
  447. #define NUM_INTERFACE 2
  448. #define RAWHID_INTERFACE 0 // RawHID
  449. #define RAWHID_TX_ENDPOINT 3
  450. #define RAWHID_TX_SIZE 64
  451. #define RAWHID_TX_INTERVAL 1
  452. #define RAWHID_RX_ENDPOINT 4
  453. #define RAWHID_RX_SIZE 64
  454. #define RAWHID_RX_INTERVAL 1
  455. #define SEREMU_INTERFACE 1 // Serial emulation
  456. #define SEREMU_TX_ENDPOINT 1
  457. #define SEREMU_TX_SIZE 64
  458. #define SEREMU_TX_INTERVAL 1
  459. #define SEREMU_RX_ENDPOINT 2
  460. #define SEREMU_RX_SIZE 32
  461. #define SEREMU_RX_INTERVAL 2
  462. #define ENDPOINT1_CONFIG ENDPOINT_TRANSIMIT_ONLY
  463. #define ENDPOINT2_CONFIG ENDPOINT_RECEIVE_ONLY
  464. #define ENDPOINT3_CONFIG ENDPOINT_TRANSIMIT_ONLY
  465. #define ENDPOINT4_CONFIG ENDPOINT_RECEIVE_ONLY
  466. #elif defined(USB_FLIGHTSIM)
  467. #define VENDOR_ID 0x16C0
  468. #define PRODUCT_ID 0x0488
  469. #define MANUFACTURER_NAME {'T','e','e','n','s','y','d','u','i','n','o'}
  470. #define MANUFACTURER_NAME_LEN 11
  471. #define PRODUCT_NAME {'T','e','e','n','s','y',' ','F','l','i','g','h','t',' ','S','i','m',' ','C','o','n','t','r','o','l','s'}
  472. #define PRODUCT_NAME_LEN 26
  473. #define EP0_SIZE 64
  474. #define NUM_ENDPOINTS 4
  475. #define NUM_USB_BUFFERS 20
  476. #define NUM_INTERFACE 2
  477. #define FLIGHTSIM_INTERFACE 0 // Flight Sim Control
  478. #define FLIGHTSIM_TX_ENDPOINT 3
  479. #define FLIGHTSIM_TX_SIZE 64
  480. #define FLIGHTSIM_TX_INTERVAL 1
  481. #define FLIGHTSIM_RX_ENDPOINT 4
  482. #define FLIGHTSIM_RX_SIZE 64
  483. #define FLIGHTSIM_RX_INTERVAL 1
  484. #define SEREMU_INTERFACE 1 // Serial emulation
  485. #define SEREMU_TX_ENDPOINT 1
  486. #define SEREMU_TX_SIZE 64
  487. #define SEREMU_TX_INTERVAL 1
  488. #define SEREMU_RX_ENDPOINT 2
  489. #define SEREMU_RX_SIZE 32
  490. #define SEREMU_RX_INTERVAL 2
  491. #define ENDPOINT1_CONFIG ENDPOINT_TRANSIMIT_ONLY
  492. #define ENDPOINT2_CONFIG ENDPOINT_RECEIVE_ONLY
  493. #define ENDPOINT3_CONFIG ENDPOINT_TRANSIMIT_ONLY
  494. #define ENDPOINT4_CONFIG ENDPOINT_RECEIVE_ONLY
  495. #elif defined(USB_FLIGHTSIM_JOYSTICK)
  496. #define VENDOR_ID 0x16C0
  497. #define PRODUCT_ID 0x04D9
  498. #define MANUFACTURER_NAME {'T','e','e','n','s','y','d','u','i','n','o'}
  499. #define MANUFACTURER_NAME_LEN 11
  500. #define PRODUCT_NAME {'T','e','e','n','s','y',' ','F','l','i','g','h','t',' ','S','i','m',' ','C','o','n','t','r','o','l','s'}
  501. #define PRODUCT_NAME_LEN 26
  502. #define EP0_SIZE 64
  503. #define NUM_ENDPOINTS 5
  504. #define NUM_USB_BUFFERS 20
  505. #define NUM_INTERFACE 3
  506. #define FLIGHTSIM_INTERFACE 0 // Flight Sim Control
  507. #define FLIGHTSIM_TX_ENDPOINT 3
  508. #define FLIGHTSIM_TX_SIZE 64
  509. #define FLIGHTSIM_TX_INTERVAL 1
  510. #define FLIGHTSIM_RX_ENDPOINT 4
  511. #define FLIGHTSIM_RX_SIZE 64
  512. #define FLIGHTSIM_RX_INTERVAL 1
  513. #define SEREMU_INTERFACE 1 // Serial emulation
  514. #define SEREMU_TX_ENDPOINT 1
  515. #define SEREMU_TX_SIZE 64
  516. #define SEREMU_TX_INTERVAL 1
  517. #define SEREMU_RX_ENDPOINT 2
  518. #define SEREMU_RX_SIZE 32
  519. #define SEREMU_RX_INTERVAL 2
  520. #define JOYSTICK_INTERFACE 2 // Joystick
  521. #define JOYSTICK_ENDPOINT 5
  522. #define JOYSTICK_SIZE 12 // 12 = normal, 64 = extreme joystick
  523. #define JOYSTICK_INTERVAL 1
  524. #define ENDPOINT1_CONFIG ENDPOINT_TRANSIMIT_ONLY
  525. #define ENDPOINT2_CONFIG ENDPOINT_RECEIVE_ONLY
  526. #define ENDPOINT3_CONFIG ENDPOINT_TRANSIMIT_ONLY
  527. #define ENDPOINT4_CONFIG ENDPOINT_RECEIVE_ONLY
  528. #define ENDPOINT5_CONFIG ENDPOINT_TRANSIMIT_ONLY
  529. #elif defined(USB_MTPDISK)
  530. #define VENDOR_ID 0x16C0
  531. #define PRODUCT_ID 0x04D1
  532. #define MANUFACTURER_NAME {'T','e','e','n','s','y','d','u','i','n','o'}
  533. #define MANUFACTURER_NAME_LEN 11
  534. #define PRODUCT_NAME {'T','e','e','n','s','y',' ','M','T','P',' ','D','i','s','k'}
  535. #define PRODUCT_NAME_LEN 15
  536. #define EP0_SIZE 64
  537. #define NUM_ENDPOINTS 4
  538. #define NUM_USB_BUFFERS 20
  539. #define NUM_INTERFACE 2
  540. #define MTP_INTERFACE 0 // MTP Disk
  541. #define MTP_TX_ENDPOINT 3
  542. #define MTP_TX_SIZE 64
  543. #define MTP_RX_ENDPOINT 3
  544. #define MTP_RX_SIZE 64
  545. #define MTP_EVENT_ENDPOINT 4
  546. #define MTP_EVENT_SIZE 16
  547. #define MTP_EVENT_INTERVAL 10
  548. #define SEREMU_INTERFACE 1 // Serial emulation
  549. #define SEREMU_TX_ENDPOINT 1
  550. #define SEREMU_TX_SIZE 64
  551. #define SEREMU_TX_INTERVAL 1
  552. #define SEREMU_RX_ENDPOINT 2
  553. #define SEREMU_RX_SIZE 32
  554. #define SEREMU_RX_INTERVAL 2
  555. #define ENDPOINT1_CONFIG ENDPOINT_TRANSIMIT_ONLY
  556. #define ENDPOINT2_CONFIG ENDPOINT_RECEIVE_ONLY
  557. #define ENDPOINT3_CONFIG ENDPOINT_TRANSMIT_AND_RECEIVE
  558. #define ENDPOINT4_CONFIG ENDPOINT_RECEIVE_ONLY
  559. #elif defined(USB_AUDIO)
  560. #define VENDOR_ID 0x16C0
  561. #define PRODUCT_ID 0x04D2
  562. #define MANUFACTURER_NAME {'T','e','e','n','s','y','d','u','i','n','o'}
  563. #define MANUFACTURER_NAME_LEN 11
  564. #define PRODUCT_NAME {'T','e','e','n','s','y',' ','A','u','d','i','o'}
  565. #define PRODUCT_NAME_LEN 12
  566. #define EP0_SIZE 64
  567. #define NUM_ENDPOINTS 5
  568. #define NUM_USB_BUFFERS 16
  569. #define NUM_INTERFACE 4
  570. #define SEREMU_INTERFACE 0 // Serial emulation
  571. #define SEREMU_TX_ENDPOINT 1
  572. #define SEREMU_TX_SIZE 64
  573. #define SEREMU_TX_INTERVAL 1
  574. #define SEREMU_RX_ENDPOINT 2
  575. #define SEREMU_RX_SIZE 32
  576. #define SEREMU_RX_INTERVAL 2
  577. #define AUDIO_INTERFACE 1 // Audio (uses 3 consecutive interfaces)
  578. #define AUDIO_TX_ENDPOINT 3
  579. #define AUDIO_TX_SIZE 180
  580. #define AUDIO_RX_ENDPOINT 4
  581. #define AUDIO_RX_SIZE 180
  582. #define AUDIO_SYNC_ENDPOINT 5
  583. #define ENDPOINT1_CONFIG ENDPOINT_TRANSIMIT_ONLY
  584. #define ENDPOINT2_CONFIG ENDPOINT_RECEIVE_ONLY
  585. #define ENDPOINT3_CONFIG ENDPOINT_TRANSMIT_ISOCHRONOUS
  586. #define ENDPOINT4_CONFIG ENDPOINT_RECEIVE_ISOCHRONOUS
  587. #define ENDPOINT5_CONFIG ENDPOINT_TRANSMIT_ISOCHRONOUS
  588. #elif defined(USB_MIDI_AUDIO_SERIAL)
  589. #define VENDOR_ID 0x16C0
  590. #define PRODUCT_ID 0x048A
  591. #define MANUFACTURER_NAME {'T','e','e','n','s','y','d','u','i','n','o'}
  592. #define MANUFACTURER_NAME_LEN 11
  593. #define PRODUCT_NAME {'T','e','e','n','s','y',' ','M','I','D','I','/','A','u','d','i','o'}
  594. #define PRODUCT_NAME_LEN 17
  595. #define EP0_SIZE 64
  596. #define NUM_ENDPOINTS 8
  597. #define NUM_USB_BUFFERS 30
  598. #define NUM_INTERFACE 6
  599. #define CDC_IAD_DESCRIPTOR 1
  600. #define CDC_STATUS_INTERFACE 0
  601. #define CDC_DATA_INTERFACE 1 // Serial
  602. #define CDC_ACM_ENDPOINT 1
  603. #define CDC_RX_ENDPOINT 2
  604. #define CDC_TX_ENDPOINT 3
  605. #define CDC_ACM_SIZE 16
  606. #define CDC_RX_SIZE 64
  607. #define CDC_TX_SIZE 64
  608. #define MIDI_INTERFACE 2 // MIDI
  609. #define MIDI_NUM_CABLES 1
  610. #define MIDI_TX_ENDPOINT 4
  611. #define MIDI_TX_SIZE 64
  612. #define MIDI_RX_ENDPOINT 5
  613. #define MIDI_RX_SIZE 64
  614. #define AUDIO_INTERFACE 3 // Audio (uses 3 consecutive interfaces)
  615. #define AUDIO_TX_ENDPOINT 6
  616. #define AUDIO_TX_SIZE 180
  617. #define AUDIO_RX_ENDPOINT 7
  618. #define AUDIO_RX_SIZE 180
  619. #define AUDIO_SYNC_ENDPOINT 8
  620. #define ENDPOINT1_CONFIG ENDPOINT_TRANSIMIT_ONLY
  621. #define ENDPOINT2_CONFIG ENDPOINT_RECEIVE_ONLY
  622. #define ENDPOINT3_CONFIG ENDPOINT_TRANSIMIT_ONLY
  623. #define ENDPOINT4_CONFIG ENDPOINT_TRANSIMIT_ONLY
  624. #define ENDPOINT5_CONFIG ENDPOINT_RECEIVE_ONLY
  625. #define ENDPOINT6_CONFIG ENDPOINT_TRANSMIT_ISOCHRONOUS
  626. #define ENDPOINT7_CONFIG ENDPOINT_RECEIVE_ISOCHRONOUS
  627. #define ENDPOINT8_CONFIG ENDPOINT_TRANSMIT_ISOCHRONOUS
  628. #elif defined(USB_MIDI_X8_AUDIO_SERIAL)
  629. #define VENDOR_ID 0x16C0
  630. #define PRODUCT_ID 0x048A
  631. #define BCD_DEVICE 0x0300
  632. #define MANUFACTURER_NAME {'T','e','e','n','s','y','d','u','i','n','o'}
  633. #define MANUFACTURER_NAME_LEN 11
  634. #define PRODUCT_NAME {'T','e','e','n','s','y',' ','M','I','D','I','x','8','/','A','u','d','i','o'}
  635. #define PRODUCT_NAME_LEN 17
  636. #define EP0_SIZE 64
  637. #define NUM_ENDPOINTS 8
  638. #define NUM_USB_BUFFERS 30
  639. #define NUM_INTERFACE 6
  640. #define CDC_IAD_DESCRIPTOR 1
  641. #define CDC_STATUS_INTERFACE 0
  642. #define CDC_DATA_INTERFACE 1 // Serial
  643. #define CDC_ACM_ENDPOINT 1
  644. #define CDC_RX_ENDPOINT 2
  645. #define CDC_TX_ENDPOINT 3
  646. #define CDC_ACM_SIZE 16
  647. #define CDC_RX_SIZE 64
  648. #define CDC_TX_SIZE 64
  649. #define MIDI_INTERFACE 2 // MIDI
  650. #define MIDI_NUM_CABLES 8
  651. #define MIDI_TX_ENDPOINT 4
  652. #define MIDI_TX_SIZE 64
  653. #define MIDI_RX_ENDPOINT 5
  654. #define MIDI_RX_SIZE 64
  655. #define AUDIO_INTERFACE 3 // Audio (uses 3 consecutive interfaces)
  656. #define AUDIO_TX_ENDPOINT 6
  657. #define AUDIO_TX_SIZE 180
  658. #define AUDIO_RX_ENDPOINT 7
  659. #define AUDIO_RX_SIZE 180
  660. #define AUDIO_SYNC_ENDPOINT 8
  661. #define ENDPOINT1_CONFIG ENDPOINT_TRANSIMIT_ONLY
  662. #define ENDPOINT2_CONFIG ENDPOINT_RECEIVE_ONLY
  663. #define ENDPOINT3_CONFIG ENDPOINT_TRANSIMIT_ONLY
  664. #define ENDPOINT4_CONFIG ENDPOINT_TRANSIMIT_ONLY
  665. #define ENDPOINT5_CONFIG ENDPOINT_RECEIVE_ONLY
  666. #define ENDPOINT6_CONFIG ENDPOINT_TRANSMIT_ISOCHRONOUS
  667. #define ENDPOINT7_CONFIG ENDPOINT_RECEIVE_ISOCHRONOUS
  668. #define ENDPOINT8_CONFIG ENDPOINT_TRANSMIT_ISOCHRONOUS
  669. #elif defined(USB_EVERYTHING)
  670. #define VENDOR_ID 0x16C0
  671. #define PRODUCT_ID 0x0476
  672. #define RAWHID_USAGE_PAGE 0xFFAB // recommended: 0xFF00 to 0xFFFF
  673. #define RAWHID_USAGE 0x0200 // recommended: 0x0100 to 0xFFFF
  674. #define DEVICE_CLASS 0xEF
  675. #define DEVICE_SUBCLASS 0x02
  676. #define DEVICE_PROTOCOL 0x01
  677. #define MANUFACTURER_NAME {'T','e','e','n','s','y','d','u','i','n','o'}
  678. #define MANUFACTURER_NAME_LEN 11
  679. #define PRODUCT_NAME {'A','l','l',' ','T','h','e',' ','T','h','i','n','g','s'}
  680. #define PRODUCT_NAME_LEN 14
  681. #define EP0_SIZE 64
  682. #define NUM_ENDPOINTS 15
  683. #define NUM_USB_BUFFERS 31
  684. #define NUM_INTERFACE 13
  685. #define CDC_IAD_DESCRIPTOR 1
  686. #define CDC_STATUS_INTERFACE 0
  687. #define CDC_DATA_INTERFACE 1 // Serial
  688. #define CDC_ACM_ENDPOINT 1
  689. #define CDC_RX_ENDPOINT 2
  690. #define CDC_TX_ENDPOINT 2
  691. #define CDC_ACM_SIZE 16
  692. #define CDC_RX_SIZE 64
  693. #define CDC_TX_SIZE 64
  694. #define MIDI_INTERFACE 2 // MIDI
  695. #define MIDI_NUM_CABLES 1
  696. #define MIDI_TX_ENDPOINT 3
  697. #define MIDI_TX_SIZE 64
  698. #define MIDI_RX_ENDPOINT 3
  699. #define MIDI_RX_SIZE 64
  700. #define KEYBOARD_INTERFACE 3 // Keyboard
  701. #define KEYBOARD_ENDPOINT 4
  702. #define KEYBOARD_SIZE 8
  703. #define KEYBOARD_INTERVAL 1
  704. #define MOUSE_INTERFACE 4 // Mouse
  705. #define MOUSE_ENDPOINT 5
  706. #define MOUSE_SIZE 8
  707. #define MOUSE_INTERVAL 2
  708. #define RAWHID_INTERFACE 5 // RawHID
  709. #define RAWHID_TX_ENDPOINT 6
  710. #define RAWHID_TX_SIZE 64
  711. #define RAWHID_TX_INTERVAL 1
  712. #define RAWHID_RX_ENDPOINT 6
  713. #define RAWHID_RX_SIZE 64
  714. #define RAWHID_RX_INTERVAL 1
  715. #define FLIGHTSIM_INTERFACE 6 // Flight Sim Control
  716. #define FLIGHTSIM_TX_ENDPOINT 9
  717. #define FLIGHTSIM_TX_SIZE 64
  718. #define FLIGHTSIM_TX_INTERVAL 1
  719. #define FLIGHTSIM_RX_ENDPOINT 9
  720. #define FLIGHTSIM_RX_SIZE 64
  721. #define FLIGHTSIM_RX_INTERVAL 1
  722. #define JOYSTICK_INTERFACE 7 // Joystick
  723. #define JOYSTICK_ENDPOINT 10
  724. #define JOYSTICK_SIZE 12 // 12 = normal, 64 = extreme joystick
  725. #define JOYSTICK_INTERVAL 1
  726. /*
  727. #define MTP_INTERFACE 8 // MTP Disk
  728. #define MTP_TX_ENDPOINT 11
  729. #define MTP_TX_SIZE 64
  730. #define MTP_RX_ENDPOINT 3
  731. #define MTP_RX_SIZE 64
  732. #define MTP_EVENT_ENDPOINT 11
  733. #define MTP_EVENT_SIZE 16
  734. #define MTP_EVENT_INTERVAL 10
  735. */
  736. #define KEYMEDIA_INTERFACE 8 // Keyboard Media Keys
  737. #define KEYMEDIA_ENDPOINT 12
  738. #define KEYMEDIA_SIZE 8
  739. #define KEYMEDIA_INTERVAL 4
  740. #define AUDIO_INTERFACE 9 // Audio (uses 3 consecutive interfaces)
  741. #define AUDIO_TX_ENDPOINT 13
  742. #define AUDIO_TX_SIZE 180
  743. #define AUDIO_RX_ENDPOINT 13
  744. #define AUDIO_RX_SIZE 180
  745. #define AUDIO_SYNC_ENDPOINT 14
  746. #define MULTITOUCH_INTERFACE 12 // Touchscreen
  747. #define MULTITOUCH_ENDPOINT 15
  748. #define MULTITOUCH_SIZE 9
  749. #define MULTITOUCH_FINGERS 10
  750. #define ENDPOINT1_CONFIG ENDPOINT_TRANSIMIT_ONLY
  751. #define ENDPOINT2_CONFIG ENDPOINT_TRANSMIT_AND_RECEIVE
  752. #define ENDPOINT3_CONFIG ENDPOINT_TRANSMIT_AND_RECEIVE
  753. #define ENDPOINT4_CONFIG ENDPOINT_TRANSIMIT_ONLY
  754. #define ENDPOINT5_CONFIG ENDPOINT_TRANSIMIT_ONLY
  755. #define ENDPOINT6_CONFIG ENDPOINT_TRANSMIT_AND_RECEIVE
  756. #define ENDPOINT7_CONFIG ENDPOINT_TRANSMIT_AND_RECEIVE
  757. #define ENDPOINT8_CONFIG ENDPOINT_TRANSIMIT_ONLY
  758. #define ENDPOINT9_CONFIG ENDPOINT_TRANSMIT_AND_RECEIVE
  759. #define ENDPOINT10_CONFIG ENDPOINT_TRANSIMIT_ONLY
  760. #define ENDPOINT11_CONFIG ENDPOINT_TRANSMIT_AND_RECEIVE
  761. #define ENDPOINT12_CONFIG ENDPOINT_TRANSIMIT_ONLY
  762. #define ENDPOINT13_CONFIG (ENDPOINT_RECEIVE_ISOCHRONOUS|ENDPOINT_TRANSMIT_ISOCHRONOUS)
  763. #define ENDPOINT14_CONFIG ENDPOINT_TRANSMIT_ISOCHRONOUS
  764. #define ENDPOINT15_CONFIG ENDPOINT_TRANSIMIT_ONLY
  765. #endif
  766. #ifdef USB_DESC_LIST_DEFINE
  767. #if defined(NUM_ENDPOINTS) && NUM_ENDPOINTS > 0
  768. // NUM_ENDPOINTS = number of non-zero endpoints (0 to 15)
  769. extern const uint8_t usb_endpoint_config_table[NUM_ENDPOINTS];
  770. typedef struct {
  771. uint16_t wValue;
  772. uint16_t wIndex;
  773. const uint8_t *addr;
  774. uint16_t length;
  775. } usb_descriptor_list_t;
  776. extern const usb_descriptor_list_t usb_descriptor_list[];
  777. #endif // NUM_ENDPOINTS
  778. #endif // USB_DESC_LIST_DEFINE
  779. #endif