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.

6 jaren geleden
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347
  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. // This header is meant to undo the effect of having included
  31. // usb_desc.h. Everything usb_desc.h, usb_undef.h undefines.
  32. // This stuff is not supposed to be made visible to user level
  33. // programs, but it's nice if we can use it within the headers
  34. // included by user programs, to automatically define only the
  35. // appropriate APIs for the types of USB interfaces used.
  36. #ifdef _usb_desc_h_
  37. #undef _usb_desc_h_
  38. #endif
  39. #ifdef ENDPOINT_UNUSED
  40. #undef ENDPOINT_UNUSED
  41. #endif
  42. #ifdef ENDPOINT_TRANSMIT_ONLY
  43. #undef ENDPOINT_TRANSMIT_ONLY
  44. #endif
  45. #ifdef ENDPOINT_RECEIVE_ONLY
  46. #undef ENDPOINT_RECEIVE_ONLY
  47. #endif
  48. #ifdef ENDPOINT_TRANSMIT_AND_RECEIVE
  49. #undef ENDPOINT_TRANSMIT_AND_RECEIVE
  50. #endif
  51. #ifdef VENDOR_ID
  52. #undef VENDOR_ID
  53. #endif
  54. #ifdef PRODUCT_ID
  55. #undef PRODUCT_ID
  56. #endif
  57. #ifdef BCD_DEVICE
  58. #undef BCD_DEVICE
  59. #endif
  60. #ifdef DEVICE_CLASS
  61. #undef DEVICE_CLASS
  62. #endif
  63. #ifdef MANUFACTURER_NAME
  64. #undef MANUFACTURER_NAME
  65. #endif
  66. #ifdef MANUFACTURER_NAME_LEN
  67. #undef MANUFACTURER_NAME_LEN
  68. #endif
  69. #ifdef PRODUCT_NAME
  70. #undef PRODUCT_NAME
  71. #endif
  72. #ifdef PRODUCT_NAME_LEN
  73. #undef PRODUCT_NAME_LEN
  74. #endif
  75. #ifdef EP0_SIZE
  76. #undef EP0_SIZE
  77. #endif
  78. #ifdef NUM_ENDPOINTS
  79. #undef NUM_ENDPOINTS
  80. #endif
  81. #ifdef NUM_USB_BUFFERS
  82. #undef NUM_USB_BUFFERS
  83. #endif
  84. #ifdef NUM_INTERFACE
  85. #undef NUM_INTERFACE
  86. #endif
  87. #ifdef CDC_STATUS_INTERFACE
  88. #undef CDC_STATUS_INTERFACE
  89. #endif
  90. #ifdef CDC_DATA_INTERFACE
  91. #undef CDC_DATA_INTERFACE
  92. #endif
  93. #ifdef CDC_ACM_ENDPOINT
  94. #undef CDC_ACM_ENDPOINT
  95. #endif
  96. #ifdef CDC_RX_ENDPOINT
  97. #undef CDC_RX_ENDPOINT
  98. #endif
  99. #ifdef CDC_TX_ENDPOINT
  100. #undef CDC_TX_ENDPOINT
  101. #endif
  102. #ifdef CDC_ACM_SIZE
  103. #undef CDC_ACM_SIZE
  104. #endif
  105. #ifdef CDC_RX_SIZE
  106. #undef CDC_RX_SIZE
  107. #endif
  108. #ifdef CDC_TX_SIZE
  109. #undef CDC_TX_SIZE
  110. #endif
  111. #ifdef CDC2_STATUS_INTERFACE
  112. #undef CDC2_STATUS_INTERFACE
  113. #endif
  114. #ifdef CDC2_DATA_INTERFACE
  115. #undef CDC2_DATA_INTERFACE
  116. #endif
  117. #ifdef CDC2_ACM_ENDPOINT
  118. #undef CDC2_ACM_ENDPOINT
  119. #endif
  120. #ifdef CDC2_RX_ENDPOINT
  121. #undef CDC2_RX_ENDPOINT
  122. #endif
  123. #ifdef CDC2_TX_ENDPOINT
  124. #undef CDC2_TX_ENDPOINT
  125. #endif
  126. #ifdef CDC2_ACM_SIZE
  127. #undef CDC2_ACM_SIZE
  128. #endif
  129. #ifdef CDC2_RX_SIZE
  130. #undef CDC2_RX_SIZE
  131. #endif
  132. #ifdef CDC2_TX_SIZE
  133. #undef CDC2_TX_SIZE
  134. #endif
  135. #ifdef CDC3_STATUS_INTERFACE
  136. #undef CDC3_STATUS_INTERFACE
  137. #endif
  138. #ifdef CDC3_DATA_INTERFACE
  139. #undef CDC3_DATA_INTERFACE
  140. #endif
  141. #ifdef CDC3_ACM_ENDPOINT
  142. #undef CDC3_ACM_ENDPOINT
  143. #endif
  144. #ifdef CDC3_RX_ENDPOINT
  145. #undef CDC3_RX_ENDPOINT
  146. #endif
  147. #ifdef CDC3_TX_ENDPOINT
  148. #undef CDC3_TX_ENDPOINT
  149. #endif
  150. #ifdef CDC3_ACM_SIZE
  151. #undef CDC3_ACM_SIZE
  152. #endif
  153. #ifdef CDC3_RX_SIZE
  154. #undef CDC3_RX_SIZE
  155. #endif
  156. #ifdef CDC3_TX_SIZE
  157. #undef CDC3_TX_SIZE
  158. #endif
  159. #ifdef SEREMU_INTERFACE
  160. #undef SEREMU_INTERFACE
  161. #endif
  162. #ifdef SEREMU_TX_ENDPOINT
  163. #undef SEREMU_TX_ENDPOINT
  164. #endif
  165. #ifdef SEREMU_TX_SIZE
  166. #undef SEREMU_TX_SIZE
  167. #endif
  168. #ifdef SEREMU_TX_INTERVAL
  169. #undef SEREMU_TX_INTERVAL
  170. #endif
  171. #ifdef SEREMU_RX_ENDPOINT
  172. #undef SEREMU_RX_ENDPOINT
  173. #endif
  174. #ifdef SEREMU_RX_SIZE
  175. #undef SEREMU_RX_SIZE
  176. #endif
  177. #ifdef SEREMU_RX_INTERVAL
  178. #undef SEREMU_RX_INTERVAL
  179. #endif
  180. #ifdef KEYBOARD_INTERFACE
  181. #undef KEYBOARD_INTERFACE
  182. #endif
  183. #ifdef KEYBOARD_ENDPOINT
  184. #undef KEYBOARD_ENDPOINT
  185. #endif
  186. #ifdef KEYBOARD_SIZE
  187. #undef KEYBOARD_SIZE
  188. #endif
  189. #ifdef KEYBOARD_INTERVAL
  190. #undef KEYBOARD_INTERVAL
  191. #endif
  192. #ifdef MOUSE_INTERFACE
  193. #undef MOUSE_INTERFACE
  194. #endif
  195. #ifdef MOUSE_ENDPOINT
  196. #undef MOUSE_ENDPOINT
  197. #endif
  198. #ifdef MOUSE_SIZE
  199. #undef MOUSE_SIZE
  200. #endif
  201. #ifdef MOUSE_INTERVAL
  202. #undef MOUSE_INTERVAL
  203. #endif
  204. #ifdef JOYSTICK_INTERFACE
  205. #undef JOYSTICK_INTERFACE
  206. #endif
  207. #ifdef JOYSTICK_ENDPOINT
  208. #undef JOYSTICK_ENDPOINT
  209. #endif
  210. #ifdef JOYSTICK_SIZE
  211. #undef JOYSTICK_SIZE
  212. #endif
  213. #ifdef JOYSTICK_INTERVAL
  214. #undef JOYSTICK_INTERVAL
  215. #endif
  216. #ifdef CDC_IAD_DESCRIPTOR
  217. #undef CDC_IAD_DESCRIPTOR
  218. #endif
  219. #ifdef MIDI_INTERFACE
  220. #undef MIDI_INTERFACE
  221. #endif
  222. #ifdef MIDI_NUM_CABLES
  223. #undef MIDI_NUM_CABLES
  224. #endif
  225. #ifdef MIDI_INTERFACE_JACK_PAIR
  226. #undef MIDI_INTERFACE_JACK_PAIR
  227. #endif
  228. #ifdef MIDI_TX_ENDPOINT
  229. #undef MIDI_TX_ENDPOINT
  230. #endif
  231. #ifdef MIDI_TX_SIZE
  232. #undef MIDI_TX_SIZE
  233. #endif
  234. #ifdef MIDI_RX_ENDPOINT
  235. #undef MIDI_RX_ENDPOINT
  236. #endif
  237. #ifdef MIDI_RX_SIZE
  238. #undef MIDI_RX_SIZE
  239. #endif
  240. #ifdef RAWHID_INTERFACE
  241. #undef RAWHID_INTERFACE
  242. #endif
  243. #ifdef RAWHID_TX_ENDPOINT
  244. #undef RAWHID_TX_ENDPOINT
  245. #endif
  246. #ifdef RAWHID_TX_SIZE
  247. #undef RAWHID_TX_SIZE
  248. #endif
  249. #ifdef RAWHID_TX_INTERVAL
  250. #undef RAWHID_TX_INTERVAL
  251. #endif
  252. #ifdef RAWHID_RX_ENDPOINT
  253. #undef RAWHID_RX_ENDPOINT
  254. #endif
  255. #ifdef RAWHID_RX_SIZE
  256. #undef RAWHID_RX_SIZE
  257. #endif
  258. #ifdef RAWHID_RX_INTERVAL
  259. #undef RAWHID_RX_INTERVAL
  260. #endif
  261. #ifdef FLIGHTSIM_INTERFACE
  262. #undef FLIGHTSIM_TX_ENDPOINT
  263. #endif
  264. #ifdef FLIGHTSIM_TX_SIZE
  265. #undef FLIGHTSIM_TX_SIZE
  266. #endif
  267. #ifdef FLIGHTSIM_TX_INTERVAL
  268. #undef FLIGHTSIM_TX_INTERVAL
  269. #endif
  270. #ifdef FLIGHTSIM_RX_ENDPOINT
  271. #undef FLIGHTSIM_RX_ENDPOINT
  272. #endif
  273. #ifdef FLIGHTSIM_RX_SIZE
  274. #undef FLIGHTSIM_RX_SIZE
  275. #endif
  276. #ifdef MTP_INTERFACE
  277. #undef MTP_INTERFACE
  278. #endif
  279. #ifdef MTP_TX_ENDPOINT
  280. #undef MTP_TX_ENDPOINT
  281. #endif
  282. #ifdef MTP_TX_SIZE
  283. #undef MTP_TX_SIZE
  284. #endif
  285. #ifdef MTP_RX_ENDPOINT
  286. #undef MTP_RX_ENDPOINT
  287. #endif
  288. #ifdef MTP_RX_SIZE
  289. #undef MTP_RX_SIZE
  290. #endif
  291. #ifdef MTP_EVENT_ENDPOINT
  292. #undef MTP_EVENT_ENDPOINT
  293. #endif
  294. #ifdef MTP_EVENT_SIZE
  295. #undef MTP_EVENT_SIZE
  296. #endif
  297. #ifdef MTP_EVENT_INTERVAL
  298. #undef MTP_EVENT_INTERVAL
  299. #endif
  300. #ifdef ENDPOINT1_CONFIG
  301. #undef ENDPOINT1_CONFIG
  302. #endif
  303. #ifdef ENDPOINT2_CONFIG
  304. #undef ENDPOINT2_CONFIG
  305. #endif
  306. #ifdef ENDPOINT3_CONFIG
  307. #undef ENDPOINT3_CONFIG
  308. #endif
  309. #ifdef ENDPOINT4_CONFIG
  310. #undef ENDPOINT4_CONFIG
  311. #endif
  312. #ifdef ENDPOINT5_CONFIG
  313. #undef ENDPOINT5_CONFIG
  314. #endif
  315. #ifdef ENDPOINT6_CONFIG
  316. #undef ENDPOINT6_CONFIG
  317. #endif
  318. #ifdef ENDPOINT7_CONFIG
  319. #undef ENDPOINT7_CONFIG
  320. #endif
  321. #ifdef ENDPOINT8_CONFIG
  322. #undef ENDPOINT8_CONFIG
  323. #endif
  324. #ifdef ENDPOINT9_CONFIG
  325. #undef ENDPOINT9_CONFIG
  326. #endif
  327. #ifdef ENDPOINT10_CONFIG
  328. #undef ENDPOINT10_CONFIG
  329. #endif
  330. #ifdef ENDPOINT11_CONFIG
  331. #undef ENDPOINT11_CONFIG
  332. #endif
  333. #ifdef ENDPOINT12_CONFIG
  334. #undef ENDPOINT12_CONFIG
  335. #endif
  336. #ifdef ENDPOINT13_CONFIG
  337. #undef ENDPOINT13_CONFIG
  338. #endif
  339. #ifdef ENDPOINT14_CONFIG
  340. #undef ENDPOINT14_CONFIG
  341. #endif
  342. #ifdef ENDPOINT15_CONFIG
  343. #undef ENDPOINT15_CONFIG
  344. #endif