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.

преди 7 години
преди 7 години
преди 9 години
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287
  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_TRANSIMIT_ONLY
  43. #undef ENDPOINT_TRANSIMIT_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 DEVICE_CLASS
  58. #undef DEVICE_CLASS
  59. #endif
  60. #ifdef MANUFACTURER_NAME
  61. #undef MANUFACTURER_NAME
  62. #endif
  63. #ifdef MANUFACTURER_NAME_LEN
  64. #undef MANUFACTURER_NAME_LEN
  65. #endif
  66. #ifdef PRODUCT_NAME
  67. #undef PRODUCT_NAME
  68. #endif
  69. #ifdef PRODUCT_NAME_LEN
  70. #undef PRODUCT_NAME_LEN
  71. #endif
  72. #ifdef EP0_SIZE
  73. #undef EP0_SIZE
  74. #endif
  75. #ifdef NUM_ENDPOINTS
  76. #undef NUM_ENDPOINTS
  77. #endif
  78. #ifdef NUM_USB_BUFFERS
  79. #undef NUM_USB_BUFFERS
  80. #endif
  81. #ifdef NUM_INTERFACE
  82. #undef NUM_INTERFACE
  83. #endif
  84. #ifdef CDC_STATUS_INTERFACE
  85. #undef CDC_STATUS_INTERFACE
  86. #endif
  87. #ifdef CDC_DATA_INTERFACE
  88. #undef CDC_DATA_INTERFACE
  89. #endif
  90. #ifdef CDC_ACM_ENDPOINT
  91. #undef CDC_ACM_ENDPOINT
  92. #endif
  93. #ifdef CDC_RX_ENDPOINT
  94. #undef CDC_RX_ENDPOINT
  95. #endif
  96. #ifdef CDC_TX_ENDPOINT
  97. #undef CDC_TX_ENDPOINT
  98. #endif
  99. #ifdef CDC_ACM_SIZE
  100. #undef CDC_ACM_SIZE
  101. #endif
  102. #ifdef CDC_RX_SIZE
  103. #undef CDC_RX_SIZE
  104. #endif
  105. #ifdef CDC_TX_SIZE
  106. #undef CDC_TX_SIZE
  107. #endif
  108. #ifdef SEREMU_INTERFACE
  109. #undef SEREMU_INTERFACE
  110. #endif
  111. #ifdef SEREMU_TX_ENDPOINT
  112. #undef SEREMU_TX_ENDPOINT
  113. #endif
  114. #ifdef SEREMU_TX_SIZE
  115. #undef SEREMU_TX_SIZE
  116. #endif
  117. #ifdef SEREMU_TX_INTERVAL
  118. #undef SEREMU_TX_INTERVAL
  119. #endif
  120. #ifdef SEREMU_RX_ENDPOINT
  121. #undef SEREMU_RX_ENDPOINT
  122. #endif
  123. #ifdef SEREMU_RX_SIZE
  124. #undef SEREMU_RX_SIZE
  125. #endif
  126. #ifdef SEREMU_RX_INTERVAL
  127. #undef SEREMU_RX_INTERVAL
  128. #endif
  129. #ifdef KEYBOARD_INTERFACE
  130. #undef KEYBOARD_INTERFACE
  131. #endif
  132. #ifdef KEYBOARD_ENDPOINT
  133. #undef KEYBOARD_ENDPOINT
  134. #endif
  135. #ifdef KEYBOARD_SIZE
  136. #undef KEYBOARD_SIZE
  137. #endif
  138. #ifdef KEYBOARD_INTERVAL
  139. #undef KEYBOARD_INTERVAL
  140. #endif
  141. #ifdef MOUSE_INTERFACE
  142. #undef MOUSE_INTERFACE
  143. #endif
  144. #ifdef MOUSE_ENDPOINT
  145. #undef MOUSE_ENDPOINT
  146. #endif
  147. #ifdef MOUSE_SIZE
  148. #undef MOUSE_SIZE
  149. #endif
  150. #ifdef MOUSE_INTERVAL
  151. #undef MOUSE_INTERVAL
  152. #endif
  153. #ifdef JOYSTICK_INTERFACE
  154. #undef JOYSTICK_INTERFACE
  155. #endif
  156. #ifdef JOYSTICK_ENDPOINT
  157. #undef JOYSTICK_ENDPOINT
  158. #endif
  159. #ifdef JOYSTICK_SIZE
  160. #undef JOYSTICK_SIZE
  161. #endif
  162. #ifdef JOYSTICK_INTERVAL
  163. #undef JOYSTICK_INTERVAL
  164. #endif
  165. #ifdef CDC_IAD_DESCRIPTOR
  166. #undef CDC_IAD_DESCRIPTOR
  167. #endif
  168. #ifdef MIDI_INTERFACE
  169. #undef MIDI_TX_ENDPOINT
  170. #endif
  171. #ifdef MIDI_TX_SIZE
  172. #undef MIDI_TX_SIZE
  173. #endif
  174. #ifdef MIDI_RX_ENDPOINT
  175. #undef MIDI_RX_ENDPOINT
  176. #endif
  177. #ifdef MIDI_RX_SIZE
  178. #undef MIDI_RX_SIZE
  179. #endif
  180. #ifdef RAWHID_INTERFACE
  181. #undef RAWHID_INTERFACE
  182. #endif
  183. #ifdef RAWHID_TX_ENDPOINT
  184. #undef RAWHID_TX_ENDPOINT
  185. #endif
  186. #ifdef RAWHID_TX_SIZE
  187. #undef RAWHID_TX_SIZE
  188. #endif
  189. #ifdef RAWHID_TX_INTERVAL
  190. #undef RAWHID_TX_INTERVAL
  191. #endif
  192. #ifdef RAWHID_RX_ENDPOINT
  193. #undef RAWHID_RX_ENDPOINT
  194. #endif
  195. #ifdef RAWHID_RX_SIZE
  196. #undef RAWHID_RX_SIZE
  197. #endif
  198. #ifdef RAWHID_RX_INTERVAL
  199. #undef RAWHID_RX_INTERVAL
  200. #endif
  201. #ifdef FLIGHTSIM_INTERFACE
  202. #undef FLIGHTSIM_TX_ENDPOINT
  203. #endif
  204. #ifdef FLIGHTSIM_TX_SIZE
  205. #undef FLIGHTSIM_TX_SIZE
  206. #endif
  207. #ifdef FLIGHTSIM_TX_INTERVAL
  208. #undef FLIGHTSIM_TX_INTERVAL
  209. #endif
  210. #ifdef FLIGHTSIM_RX_ENDPOINT
  211. #undef FLIGHTSIM_RX_ENDPOINT
  212. #endif
  213. #ifdef FLIGHTSIM_RX_SIZE
  214. #undef FLIGHTSIM_RX_SIZE
  215. #endif
  216. #ifdef MTP_INTERFACE
  217. #undef MTP_INTERFACE
  218. #endif
  219. #ifdef MTP_TX_ENDPOINT
  220. #undef MTP_TX_ENDPOINT
  221. #endif
  222. #ifdef MTP_TX_SIZE
  223. #undef MTP_TX_SIZE
  224. #endif
  225. #ifdef MTP_RX_ENDPOINT
  226. #undef MTP_RX_ENDPOINT
  227. #endif
  228. #ifdef MTP_RX_SIZE
  229. #undef MTP_RX_SIZE
  230. #endif
  231. #ifdef MTP_EVENT_ENDPOINT
  232. #undef MTP_EVENT_ENDPOINT
  233. #endif
  234. #ifdef MTP_EVENT_SIZE
  235. #undef MTP_EVENT_SIZE
  236. #endif
  237. #ifdef MTP_EVENT_INTERVAL
  238. #undef MTP_EVENT_INTERVAL
  239. #endif
  240. #ifdef ENDPOINT1_CONFIG
  241. #undef ENDPOINT1_CONFIG
  242. #endif
  243. #ifdef ENDPOINT2_CONFIG
  244. #undef ENDPOINT2_CONFIG
  245. #endif
  246. #ifdef ENDPOINT3_CONFIG
  247. #undef ENDPOINT3_CONFIG
  248. #endif
  249. #ifdef ENDPOINT4_CONFIG
  250. #undef ENDPOINT4_CONFIG
  251. #endif
  252. #ifdef ENDPOINT5_CONFIG
  253. #undef ENDPOINT5_CONFIG
  254. #endif
  255. #ifdef ENDPOINT6_CONFIG
  256. #undef ENDPOINT6_CONFIG
  257. #endif
  258. #ifdef ENDPOINT7_CONFIG
  259. #undef ENDPOINT7_CONFIG
  260. #endif
  261. #ifdef ENDPOINT8_CONFIG
  262. #undef ENDPOINT8_CONFIG
  263. #endif
  264. #ifdef ENDPOINT9_CONFIG
  265. #undef ENDPOINT9_CONFIG
  266. #endif
  267. #ifdef ENDPOINT10_CONFIG
  268. #undef ENDPOINT10_CONFIG
  269. #endif
  270. #ifdef ENDPOINT11_CONFIG
  271. #undef ENDPOINT11_CONFIG
  272. #endif
  273. #ifdef ENDPOINT12_CONFIG
  274. #undef ENDPOINT12_CONFIG
  275. #endif
  276. #ifdef ENDPOINT13_CONFIG
  277. #undef ENDPOINT13_CONFIG
  278. #endif
  279. #ifdef ENDPOINT14_CONFIG
  280. #undef ENDPOINT14_CONFIG
  281. #endif
  282. #ifdef ENDPOINT15_CONFIG
  283. #undef ENDPOINT15_CONFIG
  284. #endif