Teensy 4.1 core updated for C++20
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.

821 lines
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.
  85. You may edit the Vendor and Product ID numbers, and strings. If
  86. the numbers are changed, Teensyduino may not be able to automatically
  87. find and reboot your board when you click the Upload button in
  88. the Arduino IDE. You will need to press the Program button on
  89. Teensy to initiate programming.
  90. Some operating systems, especially Windows, may cache USB device
  91. info. Changes to the device name may not update on the same
  92. computer unless the vendor or product ID numbers change, or the
  93. "bcdDevice" revision code is increased.
  94. If these instructions are missing steps or could be improved, please
  95. let me know? http://forum.pjrc.com/forums/4-Suggestions-amp-Bug-Reports
  96. */
  97. #if defined(USB_SERIAL)
  98. #define VENDOR_ID 0x16C0
  99. #define PRODUCT_ID 0x0483
  100. #define DEVICE_CLASS 2 // 2 = Communication Class
  101. #define MANUFACTURER_NAME {'T','e','e','n','s','y','d','u','i','n','o'}
  102. #define MANUFACTURER_NAME_LEN 11
  103. #define PRODUCT_NAME {'U','S','B',' ','S','e','r','i','a','l'}
  104. #define PRODUCT_NAME_LEN 10
  105. #define EP0_SIZE 64
  106. #define NUM_ENDPOINTS 4
  107. #define NUM_USB_BUFFERS 12
  108. #define NUM_INTERFACE 2
  109. #define CDC_STATUS_INTERFACE 0
  110. #define CDC_DATA_INTERFACE 1
  111. #define CDC_ACM_ENDPOINT 2
  112. #define CDC_RX_ENDPOINT 3
  113. #define CDC_TX_ENDPOINT 4
  114. #define CDC_ACM_SIZE 16
  115. #define CDC_RX_SIZE 64
  116. #define CDC_TX_SIZE 64
  117. #define ENDPOINT2_CONFIG ENDPOINT_TRANSIMIT_ONLY
  118. #define ENDPOINT3_CONFIG ENDPOINT_RECEIVE_ONLY
  119. #define ENDPOINT4_CONFIG ENDPOINT_TRANSIMIT_ONLY
  120. #elif defined(USB_KEYBOARDONLY)
  121. #define VENDOR_ID 0x16C0
  122. #define PRODUCT_ID 0x04D0
  123. #define MANUFACTURER_NAME {'T','e','e','n','s','y','d','u','i','n','o'}
  124. #define MANUFACTURER_NAME_LEN 11
  125. #define PRODUCT_NAME {'K','e','y','b','o','a','r','d'}
  126. #define PRODUCT_NAME_LEN 8
  127. #define EP0_SIZE 64
  128. #define NUM_ENDPOINTS 4
  129. #define NUM_USB_BUFFERS 14
  130. #define NUM_INTERFACE 3
  131. #define SEREMU_INTERFACE 1 // Serial emulation
  132. #define SEREMU_TX_ENDPOINT 1
  133. #define SEREMU_TX_SIZE 64
  134. #define SEREMU_TX_INTERVAL 1
  135. #define SEREMU_RX_ENDPOINT 2
  136. #define SEREMU_RX_SIZE 32
  137. #define SEREMU_RX_INTERVAL 2
  138. #define KEYBOARD_INTERFACE 0 // Keyboard
  139. #define KEYBOARD_ENDPOINT 3
  140. #define KEYBOARD_SIZE 8
  141. #define KEYBOARD_INTERVAL 1
  142. #define KEYMEDIA_INTERFACE 2 // Keyboard Media Keys
  143. #define KEYMEDIA_ENDPOINT 4
  144. #define KEYMEDIA_SIZE 8
  145. #define KEYMEDIA_INTERVAL 4
  146. #define ENDPOINT1_CONFIG ENDPOINT_TRANSIMIT_ONLY
  147. #define ENDPOINT2_CONFIG ENDPOINT_RECEIVE_ONLY
  148. #define ENDPOINT3_CONFIG ENDPOINT_TRANSIMIT_ONLY
  149. #define ENDPOINT4_CONFIG ENDPOINT_TRANSIMIT_ONLY
  150. #define ENDPOINT5_CONFIG ENDPOINT_TRANSIMIT_ONLY
  151. #define ENDPOINT6_CONFIG ENDPOINT_TRANSIMIT_ONLY
  152. #elif defined(USB_HID)
  153. #define VENDOR_ID 0x16C0
  154. #define PRODUCT_ID 0x0482
  155. #define MANUFACTURER_NAME {'T','e','e','n','s','y','d','u','i','n','o'}
  156. #define MANUFACTURER_NAME_LEN 11
  157. #define PRODUCT_NAME {'K','e','y','b','o','a','r','d','/','M','o','u','s','e','/','J','o','y','s','t','i','c','k'}
  158. #define PRODUCT_NAME_LEN 23
  159. #define EP0_SIZE 64
  160. #define NUM_ENDPOINTS 6
  161. #define NUM_USB_BUFFERS 24
  162. #define NUM_INTERFACE 5
  163. #define SEREMU_INTERFACE 2 // Serial emulation
  164. #define SEREMU_TX_ENDPOINT 1
  165. #define SEREMU_TX_SIZE 64
  166. #define SEREMU_TX_INTERVAL 1
  167. #define SEREMU_RX_ENDPOINT 2
  168. #define SEREMU_RX_SIZE 32
  169. #define SEREMU_RX_INTERVAL 2
  170. #define KEYBOARD_INTERFACE 0 // Keyboard
  171. #define KEYBOARD_ENDPOINT 3
  172. #define KEYBOARD_SIZE 8
  173. #define KEYBOARD_INTERVAL 1
  174. #define KEYMEDIA_INTERFACE 4 // Keyboard Media Keys
  175. #define KEYMEDIA_ENDPOINT 6
  176. #define KEYMEDIA_SIZE 8
  177. #define KEYMEDIA_INTERVAL 4
  178. #define MOUSE_INTERFACE 1 // Mouse
  179. #define MOUSE_ENDPOINT 5
  180. #define MOUSE_SIZE 8
  181. #define MOUSE_INTERVAL 1
  182. #define JOYSTICK_INTERFACE 3 // Joystick
  183. #define JOYSTICK_ENDPOINT 4
  184. #define JOYSTICK_SIZE 12 // 12 = normal, 64 = extreme joystick
  185. #define JOYSTICK_INTERVAL 2
  186. #define ENDPOINT1_CONFIG ENDPOINT_TRANSIMIT_ONLY
  187. #define ENDPOINT2_CONFIG ENDPOINT_RECEIVE_ONLY
  188. #define ENDPOINT3_CONFIG ENDPOINT_TRANSIMIT_ONLY
  189. #define ENDPOINT4_CONFIG ENDPOINT_TRANSIMIT_ONLY
  190. #define ENDPOINT5_CONFIG ENDPOINT_TRANSIMIT_ONLY
  191. #define ENDPOINT6_CONFIG ENDPOINT_TRANSIMIT_ONLY
  192. #elif defined(USB_SERIAL_HID)
  193. #define VENDOR_ID 0x16C0
  194. #define PRODUCT_ID 0x0487
  195. #define DEVICE_CLASS 0xEF
  196. #define DEVICE_SUBCLASS 0x02
  197. #define DEVICE_PROTOCOL 0x01
  198. #define MANUFACTURER_NAME {'T','e','e','n','s','y','d','u','i','n','o'}
  199. #define MANUFACTURER_NAME_LEN 11
  200. #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'}
  201. #define PRODUCT_NAME_LEN 30
  202. #define EP0_SIZE 64
  203. #define NUM_ENDPOINTS 7
  204. #define NUM_USB_BUFFERS 30
  205. #define NUM_INTERFACE 6
  206. #define CDC_IAD_DESCRIPTOR 1
  207. #define CDC_STATUS_INTERFACE 0
  208. #define CDC_DATA_INTERFACE 1 // Serial
  209. #define CDC_ACM_ENDPOINT 2
  210. #define CDC_RX_ENDPOINT 3
  211. #define CDC_TX_ENDPOINT 4
  212. #define CDC_ACM_SIZE 16
  213. #define CDC_RX_SIZE 64
  214. #define CDC_TX_SIZE 64
  215. #define KEYBOARD_INTERFACE 2 // Keyboard
  216. #define KEYBOARD_ENDPOINT 1
  217. #define KEYBOARD_SIZE 8
  218. #define KEYBOARD_INTERVAL 1
  219. #define KEYMEDIA_INTERFACE 5 // Keyboard Media Keys
  220. #define KEYMEDIA_ENDPOINT 7
  221. #define KEYMEDIA_SIZE 8
  222. #define KEYMEDIA_INTERVAL 4
  223. #define MOUSE_INTERFACE 3 // Mouse
  224. #define MOUSE_ENDPOINT 5
  225. #define MOUSE_SIZE 8
  226. #define MOUSE_INTERVAL 2
  227. #define JOYSTICK_INTERFACE 4 // Joystick
  228. #define JOYSTICK_ENDPOINT 6
  229. #define JOYSTICK_SIZE 12 // 12 = normal, 64 = extreme joystick
  230. #define JOYSTICK_INTERVAL 1
  231. #define ENDPOINT1_CONFIG ENDPOINT_TRANSIMIT_ONLY
  232. #define ENDPOINT2_CONFIG ENDPOINT_TRANSIMIT_ONLY
  233. #define ENDPOINT3_CONFIG ENDPOINT_RECEIVE_ONLY
  234. #define ENDPOINT4_CONFIG ENDPOINT_TRANSIMIT_ONLY
  235. #define ENDPOINT5_CONFIG ENDPOINT_TRANSIMIT_ONLY
  236. #define ENDPOINT6_CONFIG ENDPOINT_TRANSIMIT_ONLY
  237. #define ENDPOINT7_CONFIG ENDPOINT_TRANSIMIT_ONLY
  238. #elif defined(USB_TOUCHSCREEN)
  239. #define VENDOR_ID 0x16C0
  240. #define PRODUCT_ID 0x04D3
  241. #define MANUFACTURER_NAME {'T','e','e','n','s','y','d','u','i','n','o'}
  242. #define MANUFACTURER_NAME_LEN 11
  243. #define PRODUCT_NAME {'K','e','y','b','o','a','r','d','/','T','o','u','c','h','s','c','r','e','e','n'}
  244. #define PRODUCT_NAME_LEN 20
  245. #define EP0_SIZE 64
  246. #define NUM_ENDPOINTS 5
  247. #define NUM_USB_BUFFERS 15
  248. #define NUM_INTERFACE 4
  249. #define SEREMU_INTERFACE 1 // Serial emulation
  250. #define SEREMU_TX_ENDPOINT 1
  251. #define SEREMU_TX_SIZE 64
  252. #define SEREMU_TX_INTERVAL 1
  253. #define SEREMU_RX_ENDPOINT 2
  254. #define SEREMU_RX_SIZE 32
  255. #define SEREMU_RX_INTERVAL 2
  256. #define KEYBOARD_INTERFACE 0 // Keyboard
  257. #define KEYBOARD_ENDPOINT 3
  258. #define KEYBOARD_SIZE 8
  259. #define KEYBOARD_INTERVAL 1
  260. #define KEYMEDIA_INTERFACE 2 // Keyboard Media Keys
  261. #define KEYMEDIA_ENDPOINT 4
  262. #define KEYMEDIA_SIZE 8
  263. #define KEYMEDIA_INTERVAL 4
  264. #define MULTITOUCH_INTERFACE 3 // Touchscreen
  265. #define MULTITOUCH_ENDPOINT 5
  266. #define MULTITOUCH_SIZE 9
  267. #define MULTITOUCH_FINGERS 10
  268. #define ENDPOINT1_CONFIG ENDPOINT_TRANSIMIT_ONLY
  269. #define ENDPOINT2_CONFIG ENDPOINT_RECEIVE_ONLY
  270. #define ENDPOINT3_CONFIG ENDPOINT_TRANSIMIT_ONLY
  271. #define ENDPOINT4_CONFIG ENDPOINT_TRANSIMIT_ONLY
  272. #define ENDPOINT5_CONFIG ENDPOINT_TRANSIMIT_ONLY
  273. #elif defined(USB_HID_TOUCHSCREEN)
  274. #define VENDOR_ID 0x16C0
  275. #define PRODUCT_ID 0x04D4
  276. #define MANUFACTURER_NAME {'T','e','e','n','s','y','d','u','i','n','o'}
  277. #define MANUFACTURER_NAME_LEN 11
  278. #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'}
  279. #define PRODUCT_NAME_LEN 26
  280. #define EP0_SIZE 64
  281. #define NUM_ENDPOINTS 6
  282. #define NUM_USB_BUFFERS 20
  283. #define NUM_INTERFACE 5
  284. #define SEREMU_INTERFACE 2 // Serial emulation
  285. #define SEREMU_TX_ENDPOINT 1
  286. #define SEREMU_TX_SIZE 64
  287. #define SEREMU_TX_INTERVAL 1
  288. #define SEREMU_RX_ENDPOINT 2
  289. #define SEREMU_RX_SIZE 32
  290. #define SEREMU_RX_INTERVAL 2
  291. #define KEYBOARD_INTERFACE 0 // Keyboard
  292. #define KEYBOARD_ENDPOINT 3
  293. #define KEYBOARD_SIZE 8
  294. #define KEYBOARD_INTERVAL 1
  295. #define KEYMEDIA_INTERFACE 3 // Keyboard Media Keys
  296. #define KEYMEDIA_ENDPOINT 4
  297. #define KEYMEDIA_SIZE 8
  298. #define KEYMEDIA_INTERVAL 4
  299. #define MOUSE_INTERFACE 1 // Mouse
  300. #define MOUSE_ENDPOINT 6
  301. #define MOUSE_SIZE 8
  302. #define MOUSE_INTERVAL 2
  303. #define MULTITOUCH_INTERFACE 4 // Touchscreen
  304. #define MULTITOUCH_ENDPOINT 5
  305. #define MULTITOUCH_SIZE 9
  306. #define MULTITOUCH_FINGERS 10
  307. #define ENDPOINT1_CONFIG ENDPOINT_TRANSIMIT_ONLY
  308. #define ENDPOINT2_CONFIG ENDPOINT_RECEIVE_ONLY
  309. #define ENDPOINT3_CONFIG ENDPOINT_TRANSIMIT_ONLY
  310. #define ENDPOINT4_CONFIG ENDPOINT_TRANSIMIT_ONLY
  311. #define ENDPOINT5_CONFIG ENDPOINT_TRANSIMIT_ONLY
  312. #define ENDPOINT6_CONFIG ENDPOINT_TRANSIMIT_ONLY
  313. #elif defined(USB_MIDI)
  314. #define VENDOR_ID 0x16C0
  315. #define PRODUCT_ID 0x0485
  316. #define MANUFACTURER_NAME {'T','e','e','n','s','y','d','u','i','n','o'}
  317. #define MANUFACTURER_NAME_LEN 11
  318. #define PRODUCT_NAME {'T','e','e','n','s','y',' ','M','I','D','I'}
  319. #define PRODUCT_NAME_LEN 11
  320. #define EP0_SIZE 64
  321. #define NUM_ENDPOINTS 4
  322. #define NUM_USB_BUFFERS 16
  323. #define NUM_INTERFACE 2
  324. #define SEREMU_INTERFACE 1 // Serial emulation
  325. #define SEREMU_TX_ENDPOINT 1
  326. #define SEREMU_TX_SIZE 64
  327. #define SEREMU_TX_INTERVAL 1
  328. #define SEREMU_RX_ENDPOINT 2
  329. #define SEREMU_RX_SIZE 32
  330. #define SEREMU_RX_INTERVAL 2
  331. #define MIDI_INTERFACE 0 // MIDI
  332. #define MIDI_NUM_CABLES 1
  333. #define MIDI_TX_ENDPOINT 3
  334. #define MIDI_TX_SIZE 64
  335. #define MIDI_RX_ENDPOINT 4
  336. #define MIDI_RX_SIZE 64
  337. #define ENDPOINT1_CONFIG ENDPOINT_TRANSIMIT_ONLY
  338. #define ENDPOINT2_CONFIG ENDPOINT_RECEIVE_ONLY
  339. #define ENDPOINT3_CONFIG ENDPOINT_TRANSIMIT_ONLY
  340. #define ENDPOINT4_CONFIG ENDPOINT_RECEIVE_ONLY
  341. #elif defined(USB_MIDI_X8)
  342. #define VENDOR_ID 0x16C0
  343. #define PRODUCT_ID 0x0485
  344. #define BCD_DEVICE 0x0300
  345. #define MANUFACTURER_NAME {'T','e','e','n','s','y','d','u','i','n','o'}
  346. #define MANUFACTURER_NAME_LEN 11
  347. #define PRODUCT_NAME {'T','e','e','n','s','y',' ','M','I','D','I','x','8'}
  348. #define PRODUCT_NAME_LEN 13
  349. #define EP0_SIZE 64
  350. #define NUM_ENDPOINTS 4
  351. #define NUM_USB_BUFFERS 16
  352. #define NUM_INTERFACE 2
  353. #define SEREMU_INTERFACE 1 // Serial emulation
  354. #define SEREMU_TX_ENDPOINT 1
  355. #define SEREMU_TX_SIZE 64
  356. #define SEREMU_TX_INTERVAL 1
  357. #define SEREMU_RX_ENDPOINT 2
  358. #define SEREMU_RX_SIZE 32
  359. #define SEREMU_RX_INTERVAL 2
  360. #define MIDI_INTERFACE 0 // MIDI
  361. #define MIDI_NUM_CABLES 8
  362. #define MIDI_TX_ENDPOINT 3
  363. #define MIDI_TX_SIZE 64
  364. #define MIDI_RX_ENDPOINT 4
  365. #define MIDI_RX_SIZE 64
  366. #define ENDPOINT1_CONFIG ENDPOINT_TRANSIMIT_ONLY
  367. #define ENDPOINT2_CONFIG ENDPOINT_RECEIVE_ONLY
  368. #define ENDPOINT3_CONFIG ENDPOINT_TRANSIMIT_ONLY
  369. #define ENDPOINT4_CONFIG ENDPOINT_RECEIVE_ONLY
  370. #elif defined(USB_MIDI_SERIAL)
  371. #define VENDOR_ID 0x16C0
  372. #define PRODUCT_ID 0x0489
  373. #define MANUFACTURER_NAME {'T','e','e','n','s','y','d','u','i','n','o'}
  374. #define MANUFACTURER_NAME_LEN 11
  375. #define PRODUCT_NAME {'T','e','e','n','s','y',' ','M','I','D','I'}
  376. #define PRODUCT_NAME_LEN 11
  377. #define EP0_SIZE 64
  378. #define NUM_ENDPOINTS 5
  379. #define NUM_USB_BUFFERS 30
  380. #define NUM_INTERFACE 3
  381. #define CDC_IAD_DESCRIPTOR 1
  382. #define CDC_STATUS_INTERFACE 0
  383. #define CDC_DATA_INTERFACE 1 // Serial
  384. #define CDC_ACM_ENDPOINT 1
  385. #define CDC_RX_ENDPOINT 2
  386. #define CDC_TX_ENDPOINT 3
  387. #define CDC_ACM_SIZE 16
  388. #define CDC_RX_SIZE 64
  389. #define CDC_TX_SIZE 64
  390. #define MIDI_INTERFACE 2 // MIDI
  391. #define MIDI_NUM_CABLES 1
  392. #define MIDI_TX_ENDPOINT 4
  393. #define MIDI_TX_SIZE 64
  394. #define MIDI_RX_ENDPOINT 5
  395. #define MIDI_RX_SIZE 64
  396. #define ENDPOINT1_CONFIG ENDPOINT_TRANSIMIT_ONLY
  397. #define ENDPOINT2_CONFIG ENDPOINT_RECEIVE_ONLY
  398. #define ENDPOINT3_CONFIG ENDPOINT_TRANSIMIT_ONLY
  399. #define ENDPOINT4_CONFIG ENDPOINT_TRANSIMIT_ONLY
  400. #define ENDPOINT5_CONFIG ENDPOINT_RECEIVE_ONLY
  401. #elif defined(USB_MIDI_X8_SERIAL)
  402. #define VENDOR_ID 0x16C0
  403. #define PRODUCT_ID 0x0489
  404. #define BCD_DEVICE 0x0300
  405. #define MANUFACTURER_NAME {'T','e','e','n','s','y','d','u','i','n','o'}
  406. #define MANUFACTURER_NAME_LEN 11
  407. #define PRODUCT_NAME {'T','e','e','n','s','y',' ','M','I','D','I','x','8'}
  408. #define PRODUCT_NAME_LEN 13
  409. #define EP0_SIZE 64
  410. #define NUM_ENDPOINTS 5
  411. #define NUM_USB_BUFFERS 30
  412. #define NUM_INTERFACE 3
  413. #define CDC_IAD_DESCRIPTOR 1
  414. #define CDC_STATUS_INTERFACE 0
  415. #define CDC_DATA_INTERFACE 1 // Serial
  416. #define CDC_ACM_ENDPOINT 1
  417. #define CDC_RX_ENDPOINT 2
  418. #define CDC_TX_ENDPOINT 3
  419. #define CDC_ACM_SIZE 16
  420. #define CDC_RX_SIZE 64
  421. #define CDC_TX_SIZE 64
  422. #define MIDI_INTERFACE 2 // MIDI
  423. #define MIDI_NUM_CABLES 8
  424. #define MIDI_TX_ENDPOINT 4
  425. #define MIDI_TX_SIZE 64
  426. #define MIDI_RX_ENDPOINT 5
  427. #define MIDI_RX_SIZE 64
  428. #define ENDPOINT1_CONFIG ENDPOINT_TRANSIMIT_ONLY
  429. #define ENDPOINT2_CONFIG ENDPOINT_RECEIVE_ONLY
  430. #define ENDPOINT3_CONFIG ENDPOINT_TRANSIMIT_ONLY
  431. #define ENDPOINT4_CONFIG ENDPOINT_TRANSIMIT_ONLY
  432. #define ENDPOINT5_CONFIG ENDPOINT_RECEIVE_ONLY
  433. #elif defined(USB_RAWHID)
  434. #define VENDOR_ID 0x16C0
  435. #define PRODUCT_ID 0x0486
  436. #define RAWHID_USAGE_PAGE 0xFFAB // recommended: 0xFF00 to 0xFFFF
  437. #define RAWHID_USAGE 0x0200 // recommended: 0x0100 to 0xFFFF
  438. #define MANUFACTURER_NAME {'T','e','e','n','s','y','d','u','i','n','o'}
  439. #define MANUFACTURER_NAME_LEN 11
  440. #define PRODUCT_NAME {'T','e','e','n','s','y','d','u','i','n','o',' ','R','a','w','H','I','D'}
  441. #define PRODUCT_NAME_LEN 18
  442. #define EP0_SIZE 64
  443. #define NUM_ENDPOINTS 4
  444. #define NUM_USB_BUFFERS 12
  445. #define NUM_INTERFACE 2
  446. #define RAWHID_INTERFACE 0 // RawHID
  447. #define RAWHID_TX_ENDPOINT 3
  448. #define RAWHID_TX_SIZE 64
  449. #define RAWHID_TX_INTERVAL 1
  450. #define RAWHID_RX_ENDPOINT 4
  451. #define RAWHID_RX_SIZE 64
  452. #define RAWHID_RX_INTERVAL 1
  453. #define SEREMU_INTERFACE 1 // Serial emulation
  454. #define SEREMU_TX_ENDPOINT 1
  455. #define SEREMU_TX_SIZE 64
  456. #define SEREMU_TX_INTERVAL 1
  457. #define SEREMU_RX_ENDPOINT 2
  458. #define SEREMU_RX_SIZE 32
  459. #define SEREMU_RX_INTERVAL 2
  460. #define ENDPOINT1_CONFIG ENDPOINT_TRANSIMIT_ONLY
  461. #define ENDPOINT2_CONFIG ENDPOINT_RECEIVE_ONLY
  462. #define ENDPOINT3_CONFIG ENDPOINT_TRANSIMIT_ONLY
  463. #define ENDPOINT4_CONFIG ENDPOINT_RECEIVE_ONLY
  464. #elif defined(USB_FLIGHTSIM)
  465. #define VENDOR_ID 0x16C0
  466. #define PRODUCT_ID 0x0488
  467. #define MANUFACTURER_NAME {'T','e','e','n','s','y','d','u','i','n','o'}
  468. #define MANUFACTURER_NAME_LEN 11
  469. #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'}
  470. #define PRODUCT_NAME_LEN 26
  471. #define EP0_SIZE 64
  472. #define NUM_ENDPOINTS 4
  473. #define NUM_USB_BUFFERS 20
  474. #define NUM_INTERFACE 2
  475. #define FLIGHTSIM_INTERFACE 0 // Flight Sim Control
  476. #define FLIGHTSIM_TX_ENDPOINT 3
  477. #define FLIGHTSIM_TX_SIZE 64
  478. #define FLIGHTSIM_TX_INTERVAL 1
  479. #define FLIGHTSIM_RX_ENDPOINT 4
  480. #define FLIGHTSIM_RX_SIZE 64
  481. #define FLIGHTSIM_RX_INTERVAL 1
  482. #define SEREMU_INTERFACE 1 // Serial emulation
  483. #define SEREMU_TX_ENDPOINT 1
  484. #define SEREMU_TX_SIZE 64
  485. #define SEREMU_TX_INTERVAL 1
  486. #define SEREMU_RX_ENDPOINT 2
  487. #define SEREMU_RX_SIZE 32
  488. #define SEREMU_RX_INTERVAL 2
  489. #define ENDPOINT1_CONFIG ENDPOINT_TRANSIMIT_ONLY
  490. #define ENDPOINT2_CONFIG ENDPOINT_RECEIVE_ONLY
  491. #define ENDPOINT3_CONFIG ENDPOINT_TRANSIMIT_ONLY
  492. #define ENDPOINT4_CONFIG ENDPOINT_RECEIVE_ONLY
  493. #elif defined(USB_FLIGHTSIM_JOYSTICK)
  494. #define VENDOR_ID 0x16C0
  495. #define PRODUCT_ID 0x04D9
  496. #define MANUFACTURER_NAME {'T','e','e','n','s','y','d','u','i','n','o'}
  497. #define MANUFACTURER_NAME_LEN 11
  498. #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'}
  499. #define PRODUCT_NAME_LEN 26
  500. #define EP0_SIZE 64
  501. #define NUM_ENDPOINTS 5
  502. #define NUM_USB_BUFFERS 20
  503. #define NUM_INTERFACE 3
  504. #define FLIGHTSIM_INTERFACE 0 // Flight Sim Control
  505. #define FLIGHTSIM_TX_ENDPOINT 3
  506. #define FLIGHTSIM_TX_SIZE 64
  507. #define FLIGHTSIM_TX_INTERVAL 1
  508. #define FLIGHTSIM_RX_ENDPOINT 4
  509. #define FLIGHTSIM_RX_SIZE 64
  510. #define FLIGHTSIM_RX_INTERVAL 1
  511. #define SEREMU_INTERFACE 1 // Serial emulation
  512. #define SEREMU_TX_ENDPOINT 1
  513. #define SEREMU_TX_SIZE 64
  514. #define SEREMU_TX_INTERVAL 1
  515. #define SEREMU_RX_ENDPOINT 2
  516. #define SEREMU_RX_SIZE 32
  517. #define SEREMU_RX_INTERVAL 2
  518. #define JOYSTICK_INTERFACE 2 // Joystick
  519. #define JOYSTICK_ENDPOINT 5
  520. #define JOYSTICK_SIZE 12 // 12 = normal, 64 = extreme joystick
  521. #define JOYSTICK_INTERVAL 1
  522. #define ENDPOINT1_CONFIG ENDPOINT_TRANSIMIT_ONLY
  523. #define ENDPOINT2_CONFIG ENDPOINT_RECEIVE_ONLY
  524. #define ENDPOINT3_CONFIG ENDPOINT_TRANSIMIT_ONLY
  525. #define ENDPOINT4_CONFIG ENDPOINT_RECEIVE_ONLY
  526. #define ENDPOINT5_CONFIG ENDPOINT_TRANSIMIT_ONLY
  527. #elif defined(USB_MTPDISK)
  528. #define VENDOR_ID 0x16C0
  529. #define PRODUCT_ID 0x04D1
  530. #define MANUFACTURER_NAME {'T','e','e','n','s','y','d','u','i','n','o'}
  531. #define MANUFACTURER_NAME_LEN 11
  532. #define PRODUCT_NAME {'T','e','e','n','s','y',' ','M','T','P',' ','D','i','s','k'}
  533. #define PRODUCT_NAME_LEN 15
  534. #define EP0_SIZE 64
  535. #define NUM_ENDPOINTS 4
  536. #define NUM_USB_BUFFERS 20
  537. #define NUM_INTERFACE 2
  538. #define MTP_INTERFACE 0 // MTP Disk
  539. #define MTP_TX_ENDPOINT 3
  540. #define MTP_TX_SIZE 64
  541. #define MTP_RX_ENDPOINT 3
  542. #define MTP_RX_SIZE 64
  543. #define MTP_EVENT_ENDPOINT 4
  544. #define MTP_EVENT_SIZE 16
  545. #define MTP_EVENT_INTERVAL 10
  546. #define SEREMU_INTERFACE 1 // Serial emulation
  547. #define SEREMU_TX_ENDPOINT 1
  548. #define SEREMU_TX_SIZE 64
  549. #define SEREMU_TX_INTERVAL 1
  550. #define SEREMU_RX_ENDPOINT 2
  551. #define SEREMU_RX_SIZE 32
  552. #define SEREMU_RX_INTERVAL 2
  553. #define ENDPOINT1_CONFIG ENDPOINT_TRANSIMIT_ONLY
  554. #define ENDPOINT2_CONFIG ENDPOINT_RECEIVE_ONLY
  555. #define ENDPOINT3_CONFIG ENDPOINT_TRANSMIT_AND_RECEIVE
  556. #define ENDPOINT4_CONFIG ENDPOINT_RECEIVE_ONLY
  557. #elif defined(USB_AUDIO)
  558. #define VENDOR_ID 0x16C0
  559. #define PRODUCT_ID 0x04D2
  560. #define MANUFACTURER_NAME {'T','e','e','n','s','y','d','u','i','n','o'}
  561. #define MANUFACTURER_NAME_LEN 11
  562. #define PRODUCT_NAME {'T','e','e','n','s','y',' ','A','u','d','i','o'}
  563. #define PRODUCT_NAME_LEN 12
  564. #define EP0_SIZE 64
  565. #define NUM_ENDPOINTS 5
  566. #define NUM_USB_BUFFERS 16
  567. #define NUM_INTERFACE 4
  568. #define SEREMU_INTERFACE 0 // Serial emulation
  569. #define SEREMU_TX_ENDPOINT 1
  570. #define SEREMU_TX_SIZE 64
  571. #define SEREMU_TX_INTERVAL 1
  572. #define SEREMU_RX_ENDPOINT 2
  573. #define SEREMU_RX_SIZE 32
  574. #define SEREMU_RX_INTERVAL 2
  575. #define AUDIO_INTERFACE 1 // Audio (uses 3 consecutive interfaces)
  576. #define AUDIO_TX_ENDPOINT 3
  577. #define AUDIO_TX_SIZE 180
  578. #define AUDIO_RX_ENDPOINT 4
  579. #define AUDIO_RX_SIZE 180
  580. #define AUDIO_SYNC_ENDPOINT 5
  581. #define ENDPOINT1_CONFIG ENDPOINT_TRANSIMIT_ONLY
  582. #define ENDPOINT2_CONFIG ENDPOINT_RECEIVE_ONLY
  583. #define ENDPOINT3_CONFIG ENDPOINT_TRANSMIT_ISOCHRONOUS
  584. #define ENDPOINT4_CONFIG ENDPOINT_RECEIVE_ISOCHRONOUS
  585. #define ENDPOINT5_CONFIG ENDPOINT_TRANSMIT_ISOCHRONOUS
  586. #elif defined(USB_MIDI_AUDIO_SERIAL)
  587. #define VENDOR_ID 0x16C0
  588. #define PRODUCT_ID 0x048A
  589. #define MANUFACTURER_NAME {'T','e','e','n','s','y','d','u','i','n','o'}
  590. #define MANUFACTURER_NAME_LEN 11
  591. #define PRODUCT_NAME {'T','e','e','n','s','y',' ','M','I','D','I','/','A','u','d','i','o'}
  592. #define PRODUCT_NAME_LEN 17
  593. #define EP0_SIZE 64
  594. #define NUM_ENDPOINTS 8
  595. #define NUM_USB_BUFFERS 30
  596. #define NUM_INTERFACE 6
  597. #define CDC_IAD_DESCRIPTOR 1
  598. #define CDC_STATUS_INTERFACE 0
  599. #define CDC_DATA_INTERFACE 1 // Serial
  600. #define CDC_ACM_ENDPOINT 1
  601. #define CDC_RX_ENDPOINT 2
  602. #define CDC_TX_ENDPOINT 3
  603. #define CDC_ACM_SIZE 16
  604. #define CDC_RX_SIZE 64
  605. #define CDC_TX_SIZE 64
  606. #define MIDI_INTERFACE 2 // MIDI
  607. #define MIDI_NUM_CABLES 1
  608. #define MIDI_TX_ENDPOINT 4
  609. #define MIDI_TX_SIZE 64
  610. #define MIDI_RX_ENDPOINT 5
  611. #define MIDI_RX_SIZE 64
  612. #define AUDIO_INTERFACE 3 // Audio (uses 3 consecutive interfaces)
  613. #define AUDIO_TX_ENDPOINT 6
  614. #define AUDIO_TX_SIZE 180
  615. #define AUDIO_RX_ENDPOINT 7
  616. #define AUDIO_RX_SIZE 180
  617. #define AUDIO_SYNC_ENDPOINT 8
  618. #define ENDPOINT1_CONFIG ENDPOINT_TRANSIMIT_ONLY
  619. #define ENDPOINT2_CONFIG ENDPOINT_RECEIVE_ONLY
  620. #define ENDPOINT3_CONFIG ENDPOINT_TRANSIMIT_ONLY
  621. #define ENDPOINT4_CONFIG ENDPOINT_TRANSIMIT_ONLY
  622. #define ENDPOINT5_CONFIG ENDPOINT_RECEIVE_ONLY
  623. #define ENDPOINT6_CONFIG ENDPOINT_TRANSMIT_ISOCHRONOUS
  624. #define ENDPOINT7_CONFIG ENDPOINT_RECEIVE_ISOCHRONOUS
  625. #define ENDPOINT8_CONFIG ENDPOINT_TRANSMIT_ISOCHRONOUS
  626. #elif defined(USB_MIDI_X8_AUDIO_SERIAL)
  627. #define VENDOR_ID 0x16C0
  628. #define PRODUCT_ID 0x048A
  629. #define BCD_DEVICE 0x0300
  630. #define MANUFACTURER_NAME {'T','e','e','n','s','y','d','u','i','n','o'}
  631. #define MANUFACTURER_NAME_LEN 11
  632. #define PRODUCT_NAME {'T','e','e','n','s','y',' ','M','I','D','I','x','8','/','A','u','d','i','o'}
  633. #define PRODUCT_NAME_LEN 17
  634. #define EP0_SIZE 64
  635. #define NUM_ENDPOINTS 8
  636. #define NUM_USB_BUFFERS 30
  637. #define NUM_INTERFACE 6
  638. #define CDC_IAD_DESCRIPTOR 1
  639. #define CDC_STATUS_INTERFACE 0
  640. #define CDC_DATA_INTERFACE 1 // Serial
  641. #define CDC_ACM_ENDPOINT 1
  642. #define CDC_RX_ENDPOINT 2
  643. #define CDC_TX_ENDPOINT 3
  644. #define CDC_ACM_SIZE 16
  645. #define CDC_RX_SIZE 64
  646. #define CDC_TX_SIZE 64
  647. #define MIDI_INTERFACE 2 // MIDI
  648. #define MIDI_NUM_CABLES 8
  649. #define MIDI_TX_ENDPOINT 4
  650. #define MIDI_TX_SIZE 64
  651. #define MIDI_RX_ENDPOINT 5
  652. #define MIDI_RX_SIZE 64
  653. #define AUDIO_INTERFACE 3 // Audio (uses 3 consecutive interfaces)
  654. #define AUDIO_TX_ENDPOINT 6
  655. #define AUDIO_TX_SIZE 180
  656. #define AUDIO_RX_ENDPOINT 7
  657. #define AUDIO_RX_SIZE 180
  658. #define AUDIO_SYNC_ENDPOINT 8
  659. #define ENDPOINT1_CONFIG ENDPOINT_TRANSIMIT_ONLY
  660. #define ENDPOINT2_CONFIG ENDPOINT_RECEIVE_ONLY
  661. #define ENDPOINT3_CONFIG ENDPOINT_TRANSIMIT_ONLY
  662. #define ENDPOINT4_CONFIG ENDPOINT_TRANSIMIT_ONLY
  663. #define ENDPOINT5_CONFIG ENDPOINT_RECEIVE_ONLY
  664. #define ENDPOINT6_CONFIG ENDPOINT_TRANSMIT_ISOCHRONOUS
  665. #define ENDPOINT7_CONFIG ENDPOINT_RECEIVE_ISOCHRONOUS
  666. #define ENDPOINT8_CONFIG ENDPOINT_TRANSMIT_ISOCHRONOUS
  667. #elif defined(USB_EVERYTHING)
  668. #define VENDOR_ID 0x16C0
  669. #define PRODUCT_ID 0x0476
  670. #define RAWHID_USAGE_PAGE 0xFFAB // recommended: 0xFF00 to 0xFFFF
  671. #define RAWHID_USAGE 0x0200 // recommended: 0x0100 to 0xFFFF
  672. #define DEVICE_CLASS 0xEF
  673. #define DEVICE_SUBCLASS 0x02
  674. #define DEVICE_PROTOCOL 0x01
  675. #define MANUFACTURER_NAME {'T','e','e','n','s','y','d','u','i','n','o'}
  676. #define MANUFACTURER_NAME_LEN 11
  677. #define PRODUCT_NAME {'A','l','l',' ','T','h','e',' ','T','h','i','n','g','s'}
  678. #define PRODUCT_NAME_LEN 14
  679. #define EP0_SIZE 64
  680. #define NUM_ENDPOINTS 15
  681. #define NUM_USB_BUFFERS 31
  682. #define NUM_INTERFACE 13
  683. #define CDC_IAD_DESCRIPTOR 1
  684. #define CDC_STATUS_INTERFACE 0
  685. #define CDC_DATA_INTERFACE 1 // Serial
  686. #define CDC_ACM_ENDPOINT 1
  687. #define CDC_RX_ENDPOINT 2
  688. #define CDC_TX_ENDPOINT 2
  689. #define CDC_ACM_SIZE 16
  690. #define CDC_RX_SIZE 64
  691. #define CDC_TX_SIZE 64
  692. #define MIDI_INTERFACE 2 // MIDI
  693. #define MIDI_NUM_CABLES 1
  694. #define MIDI_TX_ENDPOINT 3
  695. #define MIDI_TX_SIZE 64
  696. #define MIDI_RX_ENDPOINT 3
  697. #define MIDI_RX_SIZE 64
  698. #define KEYBOARD_INTERFACE 3 // Keyboard
  699. #define KEYBOARD_ENDPOINT 4
  700. #define KEYBOARD_SIZE 8
  701. #define KEYBOARD_INTERVAL 1
  702. #define MOUSE_INTERFACE 4 // Mouse
  703. #define MOUSE_ENDPOINT 5
  704. #define MOUSE_SIZE 8
  705. #define MOUSE_INTERVAL 2
  706. #define RAWHID_INTERFACE 5 // RawHID
  707. #define RAWHID_TX_ENDPOINT 6
  708. #define RAWHID_TX_SIZE 64
  709. #define RAWHID_TX_INTERVAL 1
  710. #define RAWHID_RX_ENDPOINT 6
  711. #define RAWHID_RX_SIZE 64
  712. #define RAWHID_RX_INTERVAL 1
  713. #define FLIGHTSIM_INTERFACE 6 // Flight Sim Control
  714. #define FLIGHTSIM_TX_ENDPOINT 9
  715. #define FLIGHTSIM_TX_SIZE 64
  716. #define FLIGHTSIM_TX_INTERVAL 1
  717. #define FLIGHTSIM_RX_ENDPOINT 9
  718. #define FLIGHTSIM_RX_SIZE 64
  719. #define FLIGHTSIM_RX_INTERVAL 1
  720. #define JOYSTICK_INTERFACE 7 // Joystick
  721. #define JOYSTICK_ENDPOINT 10
  722. #define JOYSTICK_SIZE 12 // 12 = normal, 64 = extreme joystick
  723. #define JOYSTICK_INTERVAL 1
  724. /*
  725. #define MTP_INTERFACE 8 // MTP Disk
  726. #define MTP_TX_ENDPOINT 11
  727. #define MTP_TX_SIZE 64
  728. #define MTP_RX_ENDPOINT 3
  729. #define MTP_RX_SIZE 64
  730. #define MTP_EVENT_ENDPOINT 11
  731. #define MTP_EVENT_SIZE 16
  732. #define MTP_EVENT_INTERVAL 10
  733. */
  734. #define KEYMEDIA_INTERFACE 8 // Keyboard Media Keys
  735. #define KEYMEDIA_ENDPOINT 12
  736. #define KEYMEDIA_SIZE 8
  737. #define KEYMEDIA_INTERVAL 4
  738. #define AUDIO_INTERFACE 9 // Audio (uses 3 consecutive interfaces)
  739. #define AUDIO_TX_ENDPOINT 13
  740. #define AUDIO_TX_SIZE 180
  741. #define AUDIO_RX_ENDPOINT 13
  742. #define AUDIO_RX_SIZE 180
  743. #define AUDIO_SYNC_ENDPOINT 14
  744. #define MULTITOUCH_INTERFACE 12 // Touchscreen
  745. #define MULTITOUCH_ENDPOINT 15
  746. #define MULTITOUCH_SIZE 9
  747. #define MULTITOUCH_FINGERS 10
  748. #define ENDPOINT1_CONFIG ENDPOINT_TRANSIMIT_ONLY
  749. #define ENDPOINT2_CONFIG ENDPOINT_TRANSMIT_AND_RECEIVE
  750. #define ENDPOINT3_CONFIG ENDPOINT_TRANSMIT_AND_RECEIVE
  751. #define ENDPOINT4_CONFIG ENDPOINT_TRANSIMIT_ONLY
  752. #define ENDPOINT5_CONFIG ENDPOINT_TRANSIMIT_ONLY
  753. #define ENDPOINT6_CONFIG ENDPOINT_TRANSMIT_AND_RECEIVE
  754. #define ENDPOINT7_CONFIG ENDPOINT_TRANSMIT_AND_RECEIVE
  755. #define ENDPOINT8_CONFIG ENDPOINT_TRANSIMIT_ONLY
  756. #define ENDPOINT9_CONFIG ENDPOINT_TRANSMIT_AND_RECEIVE
  757. #define ENDPOINT10_CONFIG ENDPOINT_TRANSIMIT_ONLY
  758. #define ENDPOINT11_CONFIG ENDPOINT_TRANSMIT_AND_RECEIVE
  759. #define ENDPOINT12_CONFIG ENDPOINT_TRANSIMIT_ONLY
  760. #define ENDPOINT13_CONFIG (ENDPOINT_RECEIVE_ISOCHRONOUS|ENDPOINT_TRANSMIT_ISOCHRONOUS)
  761. #define ENDPOINT14_CONFIG ENDPOINT_TRANSMIT_ISOCHRONOUS
  762. #define ENDPOINT15_CONFIG ENDPOINT_TRANSIMIT_ONLY
  763. #endif
  764. #ifdef USB_DESC_LIST_DEFINE
  765. #if defined(NUM_ENDPOINTS) && NUM_ENDPOINTS > 0
  766. // NUM_ENDPOINTS = number of non-zero endpoints (0 to 15)
  767. extern const uint8_t usb_endpoint_config_table[NUM_ENDPOINTS];
  768. typedef struct {
  769. uint16_t wValue;
  770. uint16_t wIndex;
  771. const uint8_t *addr;
  772. uint16_t length;
  773. } usb_descriptor_list_t;
  774. extern const usb_descriptor_list_t usb_descriptor_list[];
  775. #endif // NUM_ENDPOINTS
  776. #endif // USB_DESC_LIST_DEFINE
  777. #endif