Kiibohd Controller
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
Tento repozitář je archivovaný. Můžete prohlížet soubory, klonovat, ale nemůžete nahrávat a vytvářet nové úkoly a požadavky na natažení.

usb_desc.c 23KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513
  1. /* Teensyduino Core Library
  2. * http://www.pjrc.com/teensy/
  3. * Copyright (c) 2013 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. #include "usb_desc.h"
  31. // USB Descriptors are binary data which the USB host reads to
  32. // automatically detect a USB device's capabilities. The format
  33. // and meaning of every field is documented in numerous USB
  34. // standards. When working with USB descriptors, despite the
  35. // complexity of the standards and poor writing quality in many
  36. // of those documents, remember descriptors are nothing more
  37. // than constant binary data that tells the USB host what the
  38. // device can do. Computers will load drivers based on this data.
  39. // Those drivers then communicate on the endpoints specified by
  40. // the descriptors.
  41. // To configure a new combination of interfaces or make minor
  42. // changes to existing configuration (eg, change the name or ID
  43. // numbers), usually you would edit "usb_desc.h". This file
  44. // is meant to be configured by the header, so generally it is
  45. // only edited to add completely new USB interfaces or features.
  46. // **************************************************************
  47. // USB Device
  48. // **************************************************************
  49. #define LSB(n) ((n) & 255)
  50. #define MSB(n) (((n) >> 8) & 255)
  51. // USB Device Descriptor. The USB host reads this first, to learn
  52. // what type of device is connected.
  53. static uint8_t device_descriptor[] = {
  54. 18, // bLength
  55. 1, // bDescriptorType
  56. 0x00, 0x02, // bcdUSB
  57. #ifdef DEVICE_CLASS
  58. DEVICE_CLASS, // bDeviceClass
  59. #else
  60. 0,
  61. #endif
  62. #ifdef DEVICE_SUBCLASS
  63. DEVICE_SUBCLASS, // bDeviceSubClass
  64. #else
  65. 0,
  66. #endif
  67. #ifdef DEVICE_PROTOCOL
  68. DEVICE_PROTOCOL, // bDeviceProtocol
  69. #else
  70. 0,
  71. #endif
  72. EP0_SIZE, // bMaxPacketSize0
  73. LSB(VENDOR_ID), MSB(VENDOR_ID), // idVendor
  74. LSB(PRODUCT_ID), MSB(PRODUCT_ID), // idProduct
  75. 0x00, 0x01, // bcdDevice
  76. 1, // iManufacturer
  77. 2, // iProduct
  78. 3, // iSerialNumber
  79. 1 // bNumConfigurations
  80. };
  81. // These descriptors must NOT be "const", because the USB DMA
  82. // has trouble accessing flash memory with enough bandwidth
  83. // while the processor is executing from flash.
  84. // **************************************************************
  85. // HID Report Descriptors
  86. // **************************************************************
  87. // Each HID interface needs a special report descriptor that tells
  88. // the meaning and format of the data.
  89. #ifdef KEYBOARD_INTERFACE
  90. // Keyboard Protocol 1, HID 1.11 spec, Appendix B, page 59-60
  91. static uint8_t keyboard_report_desc[] = {
  92. 0x05, 0x01, // Usage Page (Generic Desktop),
  93. 0x09, 0x06, // Usage (Keyboard),
  94. 0xA1, 0x01, // Collection (Application),
  95. 0x75, 0x01, // Report Size (1),
  96. 0x95, 0x08, // Report Count (8),
  97. 0x05, 0x07, // Usage Page (Key Codes),
  98. 0x19, 0xE0, // Usage Minimum (224),
  99. 0x29, 0xE7, // Usage Maximum (231),
  100. 0x15, 0x00, // Logical Minimum (0),
  101. 0x25, 0x01, // Logical Maximum (1),
  102. 0x81, 0x02, // Input (Data, Variable, Absolute), ;Modifier byte
  103. 0x95, 0x08, // Report Count (8),
  104. 0x75, 0x01, // Report Size (1),
  105. 0x15, 0x00, // Logical Minimum (0),
  106. 0x25, 0x01, // Logical Maximum (1),
  107. 0x05, 0x0C, // Usage Page (Consumer),
  108. 0x09, 0xE9, // Usage (Volume Increment),
  109. 0x09, 0xEA, // Usage (Volume Decrement),
  110. 0x09, 0xE2, // Usage (Mute),
  111. 0x09, 0xCD, // Usage (Play/Pause),
  112. 0x09, 0xB5, // Usage (Scan Next Track),
  113. 0x09, 0xB6, // Usage (Scan Previous Track),
  114. 0x09, 0xB7, // Usage (Stop),
  115. 0x09, 0xB8, // Usage (Eject),
  116. 0x81, 0x02, // Input (Data, Variable, Absolute), ;Media keys
  117. 0x95, 0x05, // Report Count (5),
  118. 0x75, 0x01, // Report Size (1),
  119. 0x05, 0x08, // Usage Page (LEDs),
  120. 0x19, 0x01, // Usage Minimum (1),
  121. 0x29, 0x05, // Usage Maximum (5),
  122. 0x91, 0x02, // Output (Data, Variable, Absolute), ;LED report
  123. 0x95, 0x01, // Report Count (1),
  124. 0x75, 0x03, // Report Size (3),
  125. 0x91, 0x03, // Output (Constant), ;LED report padding
  126. 0x95, 0x06, // Report Count (6),
  127. 0x75, 0x08, // Report Size (8),
  128. 0x15, 0x00, // Logical Minimum (0),
  129. 0x25, 0x7F, // Logical Maximum(104),
  130. 0x05, 0x07, // Usage Page (Key Codes),
  131. 0x19, 0x00, // Usage Minimum (0),
  132. 0x29, 0x7F, // Usage Maximum (104),
  133. 0x81, 0x00, // Input (Data, Array), ;Normal keys
  134. 0xc0 // End Collection
  135. };
  136. #endif
  137. #ifdef MOUSE_INTERFACE
  138. // Mouse Protocol 1, HID 1.11 spec, Appendix B, page 59-60, with wheel extension
  139. static uint8_t mouse_report_desc[] = {
  140. 0x05, 0x01, // Usage Page (Generic Desktop)
  141. 0x09, 0x02, // Usage (Mouse)
  142. 0xA1, 0x01, // Collection (Application)
  143. 0x05, 0x09, // Usage Page (Button)
  144. 0x19, 0x01, // Usage Minimum (Button #1)
  145. 0x29, 0x03, // Usage Maximum (Button #3)
  146. 0x15, 0x00, // Logical Minimum (0)
  147. 0x25, 0x01, // Logical Maximum (1)
  148. 0x95, 0x03, // Report Count (3)
  149. 0x75, 0x01, // Report Size (1)
  150. 0x81, 0x02, // Input (Data, Variable, Absolute)
  151. 0x95, 0x01, // Report Count (1)
  152. 0x75, 0x05, // Report Size (5)
  153. 0x81, 0x03, // Input (Constant)
  154. 0x05, 0x01, // Usage Page (Generic Desktop)
  155. 0x09, 0x30, // Usage (X)
  156. 0x09, 0x31, // Usage (Y)
  157. 0x15, 0x00, // Logical Minimum (0)
  158. 0x26, 0xFF, 0x7F, // Logical Maximum (32767)
  159. 0x75, 0x10, // Report Size (16),
  160. 0x95, 0x02, // Report Count (2),
  161. 0x81, 0x02, // Input (Data, Variable, Absolute)
  162. 0x09, 0x38, // Usage (Wheel)
  163. 0x15, 0x81, // Logical Minimum (-127)
  164. 0x25, 0x7F, // Logical Maximum (127)
  165. 0x75, 0x08, // Report Size (8),
  166. 0x95, 0x01, // Report Count (1),
  167. 0x81, 0x06, // Input (Data, Variable, Relative)
  168. 0xC0 // End Collection
  169. };
  170. #endif
  171. // **************************************************************
  172. // USB Configuration
  173. // **************************************************************
  174. // USB Configuration Descriptor. This huge descriptor tells all
  175. // of the devices capbilities.
  176. static uint8_t config_descriptor[CONFIG_DESC_SIZE] = {
  177. // configuration descriptor, USB spec 9.6.3, page 264-266, Table 9-10
  178. 9, // bLength;
  179. 2, // bDescriptorType;
  180. LSB(CONFIG_DESC_SIZE), // wTotalLength
  181. MSB(CONFIG_DESC_SIZE),
  182. NUM_INTERFACE, // bNumInterfaces
  183. 1, // bConfigurationValue
  184. 0, // iConfiguration
  185. 0xC0, // bmAttributes
  186. 50, // bMaxPower
  187. #ifdef CDC_IAD_DESCRIPTOR
  188. // interface association descriptor, USB ECN, Table 9-Z
  189. 8, // bLength
  190. 11, // bDescriptorType
  191. CDC_STATUS_INTERFACE, // bFirstInterface
  192. 2, // bInterfaceCount
  193. 0x02, // bFunctionClass
  194. 0x02, // bFunctionSubClass
  195. 0x01, // bFunctionProtocol
  196. 4, // iFunction
  197. #endif
  198. #ifdef CDC_DATA_INTERFACE
  199. // interface descriptor, USB spec 9.6.5, page 267-269, Table 9-12
  200. 9, // bLength
  201. 4, // bDescriptorType
  202. CDC_STATUS_INTERFACE, // bInterfaceNumber
  203. 0, // bAlternateSetting
  204. 1, // bNumEndpoints
  205. 0x02, // bInterfaceClass
  206. 0x02, // bInterfaceSubClass
  207. 0x01, // bInterfaceProtocol
  208. 0, // iInterface
  209. // CDC Header Functional Descriptor, CDC Spec 5.2.3.1, Table 26
  210. 5, // bFunctionLength
  211. 0x24, // bDescriptorType
  212. 0x00, // bDescriptorSubtype
  213. 0x10, 0x01, // bcdCDC
  214. // Call Management Functional Descriptor, CDC Spec 5.2.3.2, Table 27
  215. 5, // bFunctionLength
  216. 0x24, // bDescriptorType
  217. 0x01, // bDescriptorSubtype
  218. 0x01, // bmCapabilities
  219. 1, // bDataInterface
  220. // Abstract Control Management Functional Descriptor, CDC Spec 5.2.3.3, Table 28
  221. 4, // bFunctionLength
  222. 0x24, // bDescriptorType
  223. 0x02, // bDescriptorSubtype
  224. 0x06, // bmCapabilities
  225. // Union Functional Descriptor, CDC Spec 5.2.3.8, Table 33
  226. 5, // bFunctionLength
  227. 0x24, // bDescriptorType
  228. 0x06, // bDescriptorSubtype
  229. CDC_STATUS_INTERFACE, // bMasterInterface
  230. CDC_DATA_INTERFACE, // bSlaveInterface0
  231. // endpoint descriptor, USB spec 9.6.6, page 269-271, Table 9-13
  232. 7, // bLength
  233. 5, // bDescriptorType
  234. CDC_ACM_ENDPOINT | 0x80, // bEndpointAddress
  235. 0x03, // bmAttributes (0x03=intr)
  236. CDC_ACM_SIZE, 0, // wMaxPacketSize
  237. 64, // bInterval
  238. // interface descriptor, USB spec 9.6.5, page 267-269, Table 9-12
  239. 9, // bLength
  240. 4, // bDescriptorType
  241. CDC_DATA_INTERFACE, // bInterfaceNumber
  242. 0, // bAlternateSetting
  243. 2, // bNumEndpoints
  244. 0x0A, // bInterfaceClass
  245. 0x00, // bInterfaceSubClass
  246. 0x00, // bInterfaceProtocol
  247. 0, // iInterface
  248. // endpoint descriptor, USB spec 9.6.6, page 269-271, Table 9-13
  249. 7, // bLength
  250. 5, // bDescriptorType
  251. CDC_RX_ENDPOINT, // bEndpointAddress
  252. 0x02, // bmAttributes (0x02=bulk)
  253. CDC_RX_SIZE, 0, // wMaxPacketSize
  254. 0, // bInterval
  255. // endpoint descriptor, USB spec 9.6.6, page 269-271, Table 9-13
  256. 7, // bLength
  257. 5, // bDescriptorType
  258. CDC_TX_ENDPOINT | 0x80, // bEndpointAddress
  259. 0x02, // bmAttributes (0x02=bulk)
  260. CDC_TX_SIZE, 0, // wMaxPacketSize
  261. 0, // bInterval
  262. #endif // CDC_DATA_INTERFACE
  263. #ifdef KEYBOARD_INTERFACE
  264. // interface descriptor, USB spec 9.6.5, page 267-269, Table 9-12
  265. 9, // bLength
  266. 4, // bDescriptorType
  267. KEYBOARD_INTERFACE, // bInterfaceNumber
  268. 0, // bAlternateSetting
  269. 1, // bNumEndpoints
  270. 0x03, // bInterfaceClass (0x03 = HID)
  271. 0x01, // bInterfaceSubClass (0x01 = Boot)
  272. 0x01, // bInterfaceProtocol (0x01 = Keyboard)
  273. 0, // iInterface
  274. // HID interface descriptor, HID 1.11 spec, section 6.2.1
  275. 9, // bLength
  276. 0x21, // bDescriptorType
  277. 0x11, 0x01, // bcdHID
  278. 0, // bCountryCode
  279. 1, // bNumDescriptors
  280. 0x22, // bDescriptorType
  281. LSB(sizeof(keyboard_report_desc)), // wDescriptorLength
  282. MSB(sizeof(keyboard_report_desc)),
  283. // endpoint descriptor, USB spec 9.6.6, page 269-271, Table 9-13
  284. 7, // bLength
  285. 5, // bDescriptorType
  286. KEYBOARD_ENDPOINT | 0x80, // bEndpointAddress
  287. 0x03, // bmAttributes (0x03=intr)
  288. KEYBOARD_SIZE, 0, // wMaxPacketSize
  289. KEYBOARD_INTERVAL, // bInterval
  290. #endif // KEYBOARD_INTERFACE
  291. #ifdef MOUSE_INTERFACE
  292. // interface descriptor, USB spec 9.6.5, page 267-269, Table 9-12
  293. 9, // bLength
  294. 4, // bDescriptorType
  295. MOUSE_INTERFACE, // bInterfaceNumber
  296. 0, // bAlternateSetting
  297. 1, // bNumEndpoints
  298. 0x03, // bInterfaceClass (0x03 = HID)
  299. 0x00, // bInterfaceSubClass (0x01 = Boot)
  300. 0x00, // bInterfaceProtocol (0x02 = Mouse)
  301. 0, // iInterface
  302. // HID interface descriptor, HID 1.11 spec, section 6.2.1
  303. 9, // bLength
  304. 0x21, // bDescriptorType
  305. 0x11, 0x01, // bcdHID
  306. 0, // bCountryCode
  307. 1, // bNumDescriptors
  308. 0x22, // bDescriptorType
  309. LSB(sizeof(mouse_report_desc)), // wDescriptorLength
  310. MSB(sizeof(mouse_report_desc)),
  311. // endpoint descriptor, USB spec 9.6.6, page 269-271, Table 9-13
  312. 7, // bLength
  313. 5, // bDescriptorType
  314. MOUSE_ENDPOINT | 0x80, // bEndpointAddress
  315. 0x03, // bmAttributes (0x03=intr)
  316. MOUSE_SIZE, 0, // wMaxPacketSize
  317. MOUSE_INTERVAL, // bInterval
  318. #endif // MOUSE_INTERFACE
  319. };
  320. // **************************************************************
  321. // String Descriptors
  322. // **************************************************************
  323. // The descriptors above can provide human readable strings,
  324. // referenced by index numbers. These descriptors are the
  325. // actual string data
  326. struct usb_string_descriptor_struct {
  327. uint8_t bLength;
  328. uint8_t bDescriptorType;
  329. uint16_t wString[];
  330. };
  331. extern struct usb_string_descriptor_struct usb_string_manufacturer_name
  332. __attribute__ ((weak, alias("usb_string_manufacturer_name_default")));
  333. extern struct usb_string_descriptor_struct usb_string_product_name
  334. __attribute__ ((weak, alias("usb_string_product_name_default")));
  335. extern struct usb_string_descriptor_struct usb_string_serial_number
  336. __attribute__ ((weak, alias("usb_string_serial_number_default")));
  337. struct usb_string_descriptor_struct string0 = {
  338. 4,
  339. 3,
  340. {0x0409}
  341. };
  342. struct usb_string_descriptor_struct usb_string_manufacturer_name_default = {
  343. sizeof(STR_MANUFACTURER),
  344. 3,
  345. STR_MANUFACTURER
  346. };
  347. struct usb_string_descriptor_struct usb_string_product_name_default = {
  348. sizeof(STR_PRODUCT),
  349. 3,
  350. STR_PRODUCT
  351. };
  352. struct usb_string_descriptor_struct usb_string_serial_number_default = {
  353. sizeof(STR_SERIAL),
  354. 3,
  355. STR_SERIAL
  356. };
  357. // **************************************************************
  358. // Descriptors List
  359. // **************************************************************
  360. // This table provides access to all the descriptor data above.
  361. const usb_descriptor_list_t usb_descriptor_list[] = {
  362. //wValue, wIndex, address, length
  363. {0x0100, 0x0000, device_descriptor, sizeof(device_descriptor)},
  364. {0x0200, 0x0000, config_descriptor, sizeof(config_descriptor)},
  365. #ifdef KEYBOARD_INTERFACE
  366. {0x2200, KEYBOARD_INTERFACE, keyboard_report_desc, sizeof(keyboard_report_desc)},
  367. {0x2100, KEYBOARD_INTERFACE, config_descriptor+KEYBOARD_DESC_OFFSET, 9},
  368. #endif
  369. #ifdef MOUSE_INTERFACE
  370. {0x2200, MOUSE_INTERFACE, mouse_report_desc, sizeof(mouse_report_desc)},
  371. {0x2100, MOUSE_INTERFACE, config_descriptor+MOUSE_DESC_OFFSET, 9},
  372. #endif
  373. {0x0300, 0x0000, (const uint8_t *)&string0, 0},
  374. {0x0301, 0x0409, (const uint8_t *)&usb_string_manufacturer_name, 0},
  375. {0x0302, 0x0409, (const uint8_t *)&usb_string_product_name, 0},
  376. {0x0303, 0x0409, (const uint8_t *)&usb_string_serial_number, 0},
  377. {0, 0, NULL, 0}
  378. };
  379. // **************************************************************
  380. // Endpoint Configuration
  381. // **************************************************************
  382. #if 0
  383. // 0x00 = not used
  384. // 0x19 = Recieve only
  385. // 0x15 = Transmit only
  386. // 0x1D = Transmit & Recieve
  387. //
  388. const uint8_t usb_endpoint_config_table[NUM_ENDPOINTS] =
  389. {
  390. 0x00, 0x15, 0x19, 0x15, 0x00, 0x00, 0x00, 0x00,
  391. 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  392. };
  393. #endif
  394. const uint8_t usb_endpoint_config_table[NUM_ENDPOINTS] =
  395. {
  396. #if (defined(ENDPOINT1_CONFIG) && NUM_ENDPOINTS >= 1)
  397. ENDPOINT1_CONFIG,
  398. #elif (NUM_ENDPOINTS >= 1)
  399. ENDPOINT_UNUSED,
  400. #endif
  401. #if (defined(ENDPOINT2_CONFIG) && NUM_ENDPOINTS >= 2)
  402. ENDPOINT2_CONFIG,
  403. #elif (NUM_ENDPOINTS >= 2)
  404. ENDPOINT_UNUSED,
  405. #endif
  406. #if (defined(ENDPOINT3_CONFIG) && NUM_ENDPOINTS >= 3)
  407. ENDPOINT3_CONFIG,
  408. #elif (NUM_ENDPOINTS >= 3)
  409. ENDPOINT_UNUSED,
  410. #endif
  411. #if (defined(ENDPOINT4_CONFIG) && NUM_ENDPOINTS >= 4)
  412. ENDPOINT4_CONFIG,
  413. #elif (NUM_ENDPOINTS >= 4)
  414. ENDPOINT_UNUSED,
  415. #endif
  416. #if (defined(ENDPOINT5_CONFIG) && NUM_ENDPOINTS >= 5)
  417. ENDPOINT5_CONFIG,
  418. #elif (NUM_ENDPOINTS >= 5)
  419. ENDPOINT_UNUSED,
  420. #endif
  421. #if (defined(ENDPOINT6_CONFIG) && NUM_ENDPOINTS >= 6)
  422. ENDPOINT6_CONFIG,
  423. #elif (NUM_ENDPOINTS >= 6)
  424. ENDPOINT_UNUSED,
  425. #endif
  426. #if (defined(ENDPOINT7_CONFIG) && NUM_ENDPOINTS >= 7)
  427. ENDPOINT7_CONFIG,
  428. #elif (NUM_ENDPOINTS >= 7)
  429. ENDPOINT_UNUSED,
  430. #endif
  431. #if (defined(ENDPOINT8_CONFIG) && NUM_ENDPOINTS >= 8)
  432. ENDPOINT8_CONFIG,
  433. #elif (NUM_ENDPOINTS >= 8)
  434. ENDPOINT_UNUSED,
  435. #endif
  436. #if (defined(ENDPOINT9_CONFIG) && NUM_ENDPOINTS >= 9)
  437. ENDPOINT9_CONFIG,
  438. #elif (NUM_ENDPOINTS >= 9)
  439. ENDPOINT_UNUSED,
  440. #endif
  441. #if (defined(ENDPOINT10_CONFIG) && NUM_ENDPOINTS >= 10)
  442. ENDPOINT10_CONFIG,
  443. #elif (NUM_ENDPOINTS >= 10)
  444. ENDPOINT_UNUSED,
  445. #endif
  446. #if (defined(ENDPOINT11_CONFIG) && NUM_ENDPOINTS >= 11)
  447. ENDPOINT11_CONFIG,
  448. #elif (NUM_ENDPOINTS >= 11)
  449. ENDPOINT_UNUSED,
  450. #endif
  451. #if (defined(ENDPOINT12_CONFIG) && NUM_ENDPOINTS >= 12)
  452. ENDPOINT12_CONFIG,
  453. #elif (NUM_ENDPOINTS >= 12)
  454. ENDPOINT_UNUSED,
  455. #endif
  456. #if (defined(ENDPOINT13_CONFIG) && NUM_ENDPOINTS >= 13)
  457. ENDPOINT13_CONFIG,
  458. #elif (NUM_ENDPOINTS >= 13)
  459. ENDPOINT_UNUSED,
  460. #endif
  461. #if (defined(ENDPOINT14_CONFIG) && NUM_ENDPOINTS >= 14)
  462. ENDPOINT14_CONFIG,
  463. #elif (NUM_ENDPOINTS >= 14)
  464. ENDPOINT_UNUSED,
  465. #endif
  466. #if (defined(ENDPOINT15_CONFIG) && NUM_ENDPOINTS >= 15)
  467. ENDPOINT15_CONFIG,
  468. #elif (NUM_ENDPOINTS >= 15)
  469. ENDPOINT_UNUSED,
  470. #endif
  471. };