Open FFBoard
Open source force feedback firmware
tusb_option.h
Go to the documentation of this file.
1/*
2 * The MIT License (MIT)
3 *
4 * Copyright (c) 2019 Ha Thach (tinyusb.org)
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a copy
7 * of this software and associated documentation files (the "Software"), to deal
8 * in the Software without restriction, including without limitation the rights
9 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 * copies of the Software, and to permit persons to whom the Software is
11 * furnished to do so, subject to the following conditions:
12 *
13 * The above copyright notice and this permission notice shall be included in
14 * all copies or substantial portions of the Software.
15 *
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 * THE SOFTWARE.
23 *
24 * This file is part of the TinyUSB stack.
25 */
26
27#ifndef _TUSB_OPTION_H_
28#define _TUSB_OPTION_H_
29
31
32// Version is release as major.minor.revision eg 1.0.0
33#define TUSB_VERSION_MAJOR 0
34#define TUSB_VERSION_MINOR 17
35#define TUSB_VERSION_REVISION 0
36
37#define TUSB_VERSION_NUMBER (TUSB_VERSION_MAJOR * 10000 + TUSB_VERSION_MINOR * 100 + TUSB_VERSION_REVISION)
38#define TUSB_VERSION_STRING TU_STRING(TUSB_VERSION_MAJOR) "." TU_STRING(TUSB_VERSION_MINOR) "." TU_STRING(TUSB_VERSION_REVISION)
39
40//--------------------------------------------------------------------+
41// Supported MCUs
42// CFG_TUSB_MCU must be defined to one of following value
43//--------------------------------------------------------------------+
44
45#define OPT_MCU_NONE 0
46
47// LPC
48#define OPT_MCU_LPC11UXX 1
49#define OPT_MCU_LPC13XX 2
50#define OPT_MCU_LPC15XX 3
51#define OPT_MCU_LPC175X_6X 4
52#define OPT_MCU_LPC177X_8X 5
53#define OPT_MCU_LPC18XX 6
54#define OPT_MCU_LPC40XX 7
55#define OPT_MCU_LPC43XX 8
56#define OPT_MCU_LPC51 9
57#define OPT_MCU_LPC51UXX OPT_MCU_LPC51
58#define OPT_MCU_LPC54 10
59#define OPT_MCU_LPC55 11
60// legacy naming
61#define OPT_MCU_LPC54XXX OPT_MCU_LPC54
62#define OPT_MCU_LPC55XX OPT_MCU_LPC55
63
64// NRF
65#define OPT_MCU_NRF5X 100
66
67// SAM
68#define OPT_MCU_SAMD21 200
69#define OPT_MCU_SAMD51 201
70#define OPT_MCU_SAMG 202
71#define OPT_MCU_SAME5X 203
72#define OPT_MCU_SAMD11 204
73#define OPT_MCU_SAML22 205
74#define OPT_MCU_SAML21 206
75#define OPT_MCU_SAMX7X 207
76
77// STM32
78#define OPT_MCU_STM32F0 300
79#define OPT_MCU_STM32F1 301
80#define OPT_MCU_STM32F2 302
81#define OPT_MCU_STM32F3 303
82#define OPT_MCU_STM32F4 304
83#define OPT_MCU_STM32F7 305
84#define OPT_MCU_STM32H7 306
85#define OPT_MCU_STM32L1 308
86#define OPT_MCU_STM32L0 307
87#define OPT_MCU_STM32L4 309
88#define OPT_MCU_STM32G0 310
89#define OPT_MCU_STM32G4 311
90#define OPT_MCU_STM32WB 312
91#define OPT_MCU_STM32U5 313
92#define OPT_MCU_STM32L5 314
93#define OPT_MCU_STM32H5 315
94#define OPT_MCU_STM32U0 316
95#define OPT_MCU_STM32H7RS 317
96
97// Sony
98#define OPT_MCU_CXD56 400
99
100// TI
101#define OPT_MCU_MSP430x5xx 500
102#define OPT_MCU_MSP432E4 510
103#define OPT_MCU_TM4C123 511
104#define OPT_MCU_TM4C129 512
105
106// ValentyUSB eptri
107#define OPT_MCU_VALENTYUSB_EPTRI 600
108
109// NXP iMX RT
110#define OPT_MCU_MIMXRT1XXX 700
111#define OPT_MCU_MIMXRT10XX OPT_MCU_MIMXRT1XXX
112#define OPT_MCU_MIMXRT11XX OPT_MCU_MIMXRT1XXX
113
114// Nuvoton
115#define OPT_MCU_NUC121 800
116#define OPT_MCU_NUC126 801
117#define OPT_MCU_NUC120 802
118#define OPT_MCU_NUC505 803
119
120// Espressif
121#define OPT_MCU_ESP32S2 900
122#define OPT_MCU_ESP32S3 901
123#define OPT_MCU_ESP32 902
124#define OPT_MCU_ESP32C3 903
125#define OPT_MCU_ESP32C6 904
126#define OPT_MCU_ESP32C2 905
127#define OPT_MCU_ESP32H2 906
128#define OPT_MCU_ESP32P4 907
129#define TUSB_MCU_VENDOR_ESPRESSIF (CFG_TUSB_MCU >= 900 && CFG_TUSB_MCU < 1000) // check if Espressif MCU
130#define TUP_MCU_ESPRESSIF TUSB_MCU_VENDOR_ESPRESSIF // for backward compatibility
131
132// Dialog
133#define OPT_MCU_DA1469X 1000
134
135// Raspberry Pi
136#define OPT_MCU_RP2040 1100
137
138// NXP Kinetis
139#define OPT_MCU_KINETIS_KL 1200
140#define OPT_MCU_KINETIS_K32L 1201
141#define OPT_MCU_KINETIS_K32 1201
142#define OPT_MCU_KINETIS_K 1202
143
144#define OPT_MCU_MKL25ZXX 1200
145#define OPT_MCU_K32L2BXX 1201
146
147// Silabs
148#define OPT_MCU_EFM32GG 1300
149
150// Renesas RX
151#define OPT_MCU_RX63X 1400
152#define OPT_MCU_RX65X 1401
153#define OPT_MCU_RX72N 1402
154#define OPT_MCU_RAXXX 1403
155
156// Mind Motion
157#define OPT_MCU_MM32F327X 1500
158
159// GigaDevice
160#define OPT_MCU_GD32VF103 1600
161
162// Broadcom
163#define OPT_MCU_BCM2711 1700
164#define OPT_MCU_BCM2835 1701
165#define OPT_MCU_BCM2837 1702
166
167// Infineon
168#define OPT_MCU_XMC4000 1800
169
170// PIC
171#define OPT_MCU_PIC32MZ 1900
172#define OPT_MCU_PIC32MM 1901
173#define OPT_MCU_PIC32MX 1902
174#define OPT_MCU_PIC32MK 1903
175#define OPT_MCU_PIC24 1910
176#define OPT_MCU_DSPIC33 1911
177
178// BridgeTek
179#define OPT_MCU_FT90X 2000
180#define OPT_MCU_FT93X 2001
181
182// Allwinner
183#define OPT_MCU_F1C100S 2100
184
185// WCH
186#define OPT_MCU_CH32V307 2200
187#define OPT_MCU_CH32F20X 2210
188#define OPT_MCU_CH32V20X 2220
189#define OPT_MCU_CH32V103 2230
190
191// NXP LPC MCX
192#define OPT_MCU_MCXN9 2300
193#define OPT_MCU_MCXA15 2301
194
195// Analog Devices
196#define OPT_MCU_MAX32690 2400
197#define OPT_MCU_MAX32666 2401
198#define OPT_MCU_MAX32650 2402
199#define OPT_MCU_MAX78002 2403
200
201// Check if configured MCU is one of listed
202// Apply _TU_CHECK_MCU with || as separator to list of input
203#define _TU_CHECK_MCU(_m) (CFG_TUSB_MCU == _m)
204#define TU_CHECK_MCU(...) (TU_ARGS_APPLY(_TU_CHECK_MCU, ||, __VA_ARGS__))
205
206//--------------------------------------------------------------------+
207// Supported OS
208//--------------------------------------------------------------------+
209
210#define OPT_OS_NONE 1
211#define OPT_OS_FREERTOS 2
212#define OPT_OS_MYNEWT 3
213#define OPT_OS_CUSTOM 4
214#define OPT_OS_PICO 5
215#define OPT_OS_RTTHREAD 6
216#define OPT_OS_RTX4 7
217
218//--------------------------------------------------------------------+
219// Mode and Speed
220//--------------------------------------------------------------------+
221
222// Low byte is operational mode
223#define OPT_MODE_NONE 0x0000
224#define OPT_MODE_DEVICE 0x0001
225#define OPT_MODE_HOST 0x0002
226
227// High byte is max operational speed (corresponding to tusb_speed_t)
228#define OPT_MODE_DEFAULT_SPEED 0x0000
229#define OPT_MODE_LOW_SPEED 0x0100
230#define OPT_MODE_FULL_SPEED 0x0200
231#define OPT_MODE_HIGH_SPEED 0x0400
232#define OPT_MODE_SPEED_MASK 0xff00
233
234//--------------------------------------------------------------------+
235// Include tusb_config.h
236//--------------------------------------------------------------------+
237
238// Allow to use command line to change the config name/location
239#ifdef CFG_TUSB_CONFIG_FILE
240 #include CFG_TUSB_CONFIG_FILE
241#else
242 #include "tusb_config.h"
243#endif
244
245#include "common/tusb_mcu.h"
246
247//--------------------------------------------------------------------+
248// USBIP
249//--------------------------------------------------------------------+
250
251// DWC2 controller: use DMA for data transfer
252// For processors with data cache enabled, USB endpoint buffer region
253// (defined by CFG_TUSB_MEM_SECTION) must be declared as non-cacheable.
254// For example, on Cortex-M7 the MPU region can be configured as normal
255// non-cacheable, with RASR register value: TEX=1 C=0 B=0 S=0.
256#ifndef CFG_TUD_DWC2_DMA
257 #define CFG_TUD_DWC2_DMA 0
258#endif
259
260// Enable DWC2 Slave mode for host
261#ifndef CFG_TUH_DWC2_SLAVE_ENABLE
262 #ifndef CFG_TUH_DWC2_SLAVE_ENABLE_DEFAULT
263 #define CFG_TUH_DWC2_SLAVE_ENABLE_DEFAULT 1
264 #endif
265 #define CFG_TUH_DWC2_SLAVE_ENABLE CFG_TUH_DWC2_SLAVE_ENABLE_DEFAULT
266#endif
267
268// Enable DWC2 DMA for host
269#ifndef CFG_TUH_DWC2_DMA_ENABLE
270 #ifndef CFG_TUH_DWC2_DMA_ENABLE_DEFAULT
271 #define CFG_TUH_DWC2_DMA_ENABLE_DEFAULT 1
272 #endif
273 #define CFG_TUH_DWC2_DMA_ENABLE CFG_TUH_DWC2_DMA_ENABLE_DEFAULT
274#endif
275
276// Enable PIO-USB software host controller
277#ifndef CFG_TUH_RPI_PIO_USB
278 #define CFG_TUH_RPI_PIO_USB 0
279#endif
280
281#ifndef CFG_TUD_RPI_PIO_USB
282 #define CFG_TUD_RPI_PIO_USB 0
283#endif
284
285// MAX3421 Host controller option
286#ifndef CFG_TUH_MAX3421
287 #define CFG_TUH_MAX3421 0
288#endif
289
290
291//--------------------------------------------------------------------
292// RootHub Mode detection
293//--------------------------------------------------------------------
294
295//------------- Root hub as Device -------------//
296
297#if defined(CFG_TUSB_RHPORT0_MODE) && ((CFG_TUSB_RHPORT0_MODE) & OPT_MODE_DEVICE)
298 #define TUD_RHPORT_MODE (CFG_TUSB_RHPORT0_MODE)
299 #define TUD_OPT_RHPORT 0
300#elif defined(CFG_TUSB_RHPORT1_MODE) && ((CFG_TUSB_RHPORT1_MODE) & OPT_MODE_DEVICE)
301 #define TUD_RHPORT_MODE (CFG_TUSB_RHPORT1_MODE)
302 #define TUD_OPT_RHPORT 1
303#else
304 #define TUD_RHPORT_MODE OPT_MODE_NONE
305#endif
306
307#ifndef CFG_TUD_ENABLED
308 // fallback to use CFG_TUSB_RHPORTx_MODE
309 #define CFG_TUD_ENABLED (TUD_RHPORT_MODE & OPT_MODE_DEVICE)
310#endif
311
312#ifndef CFG_TUD_MAX_SPEED
313 // fallback to use CFG_TUSB_RHPORTx_MODE
314 #define CFG_TUD_MAX_SPEED (TUD_RHPORT_MODE & OPT_MODE_SPEED_MASK)
315#endif
316
317// For backward compatible
318#define TUSB_OPT_DEVICE_ENABLED CFG_TUD_ENABLED
319
320// highspeed support indicator
321#define TUD_OPT_HIGH_SPEED (CFG_TUD_MAX_SPEED ? (CFG_TUD_MAX_SPEED & OPT_MODE_HIGH_SPEED) : TUP_RHPORT_HIGHSPEED)
322
323//------------- Root hub as Host -------------//
324
325#if defined(CFG_TUSB_RHPORT0_MODE) && ((CFG_TUSB_RHPORT0_MODE) & OPT_MODE_HOST)
326 #define TUH_RHPORT_MODE (CFG_TUSB_RHPORT0_MODE)
327 #define TUH_OPT_RHPORT 0
328#elif defined(CFG_TUSB_RHPORT1_MODE) && ((CFG_TUSB_RHPORT1_MODE) & OPT_MODE_HOST)
329 #define TUH_RHPORT_MODE (CFG_TUSB_RHPORT1_MODE)
330 #define TUH_OPT_RHPORT 1
331#else
332 #define TUH_RHPORT_MODE OPT_MODE_NONE
333#endif
334
335#ifndef CFG_TUH_ENABLED
336 // fallback to use CFG_TUSB_RHPORTx_MODE
337 #define CFG_TUH_ENABLED (TUH_RHPORT_MODE & OPT_MODE_HOST)
338#endif
339
340#ifndef CFG_TUH_MAX_SPEED
341 // fallback to use CFG_TUSB_RHPORTx_MODE
342 #define CFG_TUH_MAX_SPEED (TUH_RHPORT_MODE & OPT_MODE_SPEED_MASK)
343#endif
344
345// For backward compatible
346#define TUSB_OPT_HOST_ENABLED CFG_TUH_ENABLED
347
348// highspeed support indicator
349#define TUH_OPT_HIGH_SPEED (CFG_TUH_MAX_SPEED ? (CFG_TUH_MAX_SPEED & OPT_MODE_HIGH_SPEED) : TUP_RHPORT_HIGHSPEED)
350
351
352//--------------------------------------------------------------------+
353// TODO move later
354//--------------------------------------------------------------------+
355
356// TUP_MCU_STRICT_ALIGN will overwrite TUP_ARCH_STRICT_ALIGN.
357// In case TUP_MCU_STRICT_ALIGN = 1 and TUP_ARCH_STRICT_ALIGN =0, we will not reply on compiler
358// to generate unaligned access code.
359// LPC_IP3511 Highspeed cannot access unaligned memory on USB_RAM
360#if TUD_OPT_HIGH_SPEED && TU_CHECK_MCU(OPT_MCU_LPC54XXX, OPT_MCU_LPC55XX)
361 #define TUP_MCU_STRICT_ALIGN 1
362#else
363 #define TUP_MCU_STRICT_ALIGN 0
364#endif
365
366
367//--------------------------------------------------------------------+
368// Common Options (Default)
369//--------------------------------------------------------------------+
370
371// Debug enable to print out error message
372#ifndef CFG_TUSB_DEBUG
373 #define CFG_TUSB_DEBUG 0
374#endif
375
376// Level where CFG_TUSB_DEBUG must be at least for USBH is logged
377#ifndef CFG_TUH_LOG_LEVEL
378 #define CFG_TUH_LOG_LEVEL 2
379#endif
380
381// Level where CFG_TUSB_DEBUG must be at least for USBD is logged
382#ifndef CFG_TUD_LOG_LEVEL
383 #define CFG_TUD_LOG_LEVEL 2
384#endif
385
386// Memory section for placing buffer used for usb transferring. If MEM_SECTION is different for
387// host and device use: CFG_TUD_MEM_SECTION, CFG_TUH_MEM_SECTION instead
388#ifndef CFG_TUSB_MEM_SECTION
389 #define CFG_TUSB_MEM_SECTION
390#endif
391
392// Alignment requirement of buffer used for usb transferring. if MEM_ALIGN is different for
393// host and device controller use: CFG_TUD_MEM_ALIGN, CFG_TUH_MEM_ALIGN instead
394#ifndef CFG_TUSB_MEM_ALIGN
395 #define CFG_TUSB_MEM_ALIGN TU_ATTR_ALIGNED(4)
396#endif
397
398// OS selection
399#ifndef CFG_TUSB_OS
400 #define CFG_TUSB_OS OPT_OS_NONE
401#endif
402
403#ifndef CFG_TUSB_OS_INC_PATH
404 #define CFG_TUSB_OS_INC_PATH
405#endif
406
407//--------------------------------------------------------------------
408// Device Options (Default)
409//--------------------------------------------------------------------
410
411// Attribute to place data in accessible RAM for device controller (default: CFG_TUSB_MEM_SECTION)
412#ifndef CFG_TUD_MEM_SECTION
413 #define CFG_TUD_MEM_SECTION CFG_TUSB_MEM_SECTION
414#endif
415
416// Attribute to align memory for device controller (default: CFG_TUSB_MEM_ALIGN)
417#ifndef CFG_TUD_MEM_ALIGN
418 #define CFG_TUD_MEM_ALIGN CFG_TUSB_MEM_ALIGN
419#endif
420
421#ifndef CFG_TUD_ENDPOINT0_SIZE
422 #define CFG_TUD_ENDPOINT0_SIZE 64
423#endif
424
425#ifndef CFG_TUD_INTERFACE_MAX
426 #define CFG_TUD_INTERFACE_MAX 16
427#endif
428
429// default to max hardware endpoint, but can be smaller to save RAM
430#ifndef CFG_TUD_ENDPPOINT_MAX
431 #define CFG_TUD_ENDPPOINT_MAX TUP_DCD_ENDPOINT_MAX
432#endif
433
434#if CFG_TUD_ENDPPOINT_MAX > TUP_DCD_ENDPOINT_MAX
435 #error "CFG_TUD_ENDPPOINT_MAX must be less than or equal to TUP_DCD_ENDPOINT_MAX"
436#endif
437
438// USB 2.0 7.1.20: compliance test mode support
439#ifndef CFG_TUD_TEST_MODE
440 #define CFG_TUD_TEST_MODE 0
441#endif
442
443//------------- Device Class Driver -------------//
444#ifndef CFG_TUD_BTH
445 #define CFG_TUD_BTH 0
446#endif
447
448#if CFG_TUD_BTH && !defined(CFG_TUD_BTH_ISO_ALT_COUNT)
449#error CFG_TUD_BTH_ISO_ALT_COUNT must be defined to tell Bluetooth driver the number of ISO endpoints to use
450#endif
451
452#ifndef CFG_TUD_CDC
453 #define CFG_TUD_CDC 0
454#endif
455
456#ifndef CFG_TUD_MSC
457 #define CFG_TUD_MSC 0
458#endif
459
460#ifndef CFG_TUD_HID
461 #define CFG_TUD_HID 0
462#endif
463
464#ifndef CFG_TUD_AUDIO
465 #define CFG_TUD_AUDIO 0
466#endif
467
468#ifndef CFG_TUD_VIDEO
469 #define CFG_TUD_VIDEO 0
470#endif
471
472#ifndef CFG_TUD_MIDI
473 #define CFG_TUD_MIDI 0
474#endif
475
476#ifndef CFG_TUD_VENDOR
477 #define CFG_TUD_VENDOR 0
478#endif
479
480#ifndef CFG_TUD_USBTMC
481 #define CFG_TUD_USBTMC 0
482#endif
483
484#ifndef CFG_TUD_DFU_RUNTIME
485 #define CFG_TUD_DFU_RUNTIME 0
486#endif
487
488#ifndef CFG_TUD_DFU
489 #define CFG_TUD_DFU 0
490#endif
491
492#ifndef CFG_TUD_ECM_RNDIS
493 #ifdef CFG_TUD_NET
494 #warning "CFG_TUD_NET is renamed to CFG_TUD_ECM_RNDIS"
495 #define CFG_TUD_ECM_RNDIS CFG_TUD_NET
496 #else
497 #define CFG_TUD_ECM_RNDIS 0
498 #endif
499#endif
500
501#ifndef CFG_TUD_NCM
502 #define CFG_TUD_NCM 0
503#endif
504
505//--------------------------------------------------------------------
506// Host Options (Default)
507//--------------------------------------------------------------------
508#if CFG_TUH_ENABLED
509 #ifndef CFG_TUH_DEVICE_MAX
510 #define CFG_TUH_DEVICE_MAX 1
511 #endif
512
513 #ifndef CFG_TUH_ENUMERATION_BUFSIZE
514 #define CFG_TUH_ENUMERATION_BUFSIZE 256
515 #endif
516#endif // CFG_TUH_ENABLED
517
518// Attribute to place data in accessible RAM for host controller (default: CFG_TUSB_MEM_SECTION)
519#ifndef CFG_TUH_MEM_SECTION
520 #define CFG_TUH_MEM_SECTION CFG_TUSB_MEM_SECTION
521#endif
522
523// Attribute to align memory for host controller
524#ifndef CFG_TUH_MEM_ALIGN
525 #define CFG_TUH_MEM_ALIGN CFG_TUSB_MEM_ALIGN
526#endif
527
528//------------- CLASS -------------//
529
530#ifndef CFG_TUH_HUB
531 #define CFG_TUH_HUB 0
532#endif
533
534#ifndef CFG_TUH_CDC
535 #define CFG_TUH_CDC 0
536#endif
537
538// FTDI is not part of CDC class, only to re-use CDC driver API
539#ifndef CFG_TUH_CDC_FTDI
540 #define CFG_TUH_CDC_FTDI 0
541#endif
542
543// List of product IDs that can use the FTDI CDC driver. 0x0403 is FTDI's VID
544#ifndef CFG_TUH_CDC_FTDI_VID_PID_LIST
545 #define CFG_TUH_CDC_FTDI_VID_PID_LIST \
546 {0x0403, 0x6001}, {0x0403, 0x6006}, {0x0403, 0x6010}, {0x0403, 0x6011}, \
547 {0x0403, 0x6014}, {0x0403, 0x6015}, {0x0403, 0x8372}, {0x0403, 0xFBFA}, \
548 {0x0403, 0xCD18}
549#endif
550
551// CP210X is not part of CDC class, only to re-use CDC driver API
552#ifndef CFG_TUH_CDC_CP210X
553 #define CFG_TUH_CDC_CP210X 0
554#endif
555
556// List of product IDs that can use the CP210X CDC driver. 0x10C4 is Silicon Labs' VID
557#ifndef CFG_TUH_CDC_CP210X_VID_PID_LIST
558 #define CFG_TUH_CDC_CP210X_VID_PID_LIST \
559 {0x10C4, 0xEA60}, {0x10C4, 0xEA70}
560#endif
561
562#ifndef CFG_TUH_CDC_CH34X
563 // CH34X is not part of CDC class, only to re-use CDC driver API
564 #define CFG_TUH_CDC_CH34X 0
565#endif
566
567// List of product IDs that can use the CH34X CDC driver
568#ifndef CFG_TUH_CDC_CH34X_VID_PID_LIST
569 #define CFG_TUH_CDC_CH34X_VID_PID_LIST \
570 { 0x1a86, 0x5523 }, /* ch341 chip */ \
571 { 0x1a86, 0x7522 }, /* ch340k chip */ \
572 { 0x1a86, 0x7523 }, /* ch340 chip */ \
573 { 0x1a86, 0xe523 }, /* ch330 chip */ \
574 { 0x4348, 0x5523 }, /* ch340 custom chip */ \
575 { 0x2184, 0x0057 }, /* overtaken from Linux Kernel driver /drivers/usb/serial/ch341.c */ \
576 { 0x9986, 0x7523 } /* overtaken from Linux Kernel driver /drivers/usb/serial/ch341.c */
577#endif
578
579#ifndef CFG_TUH_HID
580 #define CFG_TUH_HID 0
581#endif
582
583#ifndef CFG_TUH_MIDI
584 #define CFG_TUH_MIDI 0
585#endif
586
587#ifndef CFG_TUH_MSC
588 #define CFG_TUH_MSC 0
589#endif
590
591#ifndef CFG_TUH_VENDOR
592 #define CFG_TUH_VENDOR 0
593#endif
594
595#ifndef CFG_TUH_API_EDPT_XFER
596 #define CFG_TUH_API_EDPT_XFER 0
597#endif
598
599//--------------------------------------------------------------------+
600// TypeC Options (Default)
601//--------------------------------------------------------------------+
602
603#ifndef CFG_TUC_ENABLED
604#define CFG_TUC_ENABLED 0
605
606#define tuc_int_handler(_p)
607#endif
608
609//------------------------------------------------------------------
610// Configuration Validation
611//------------------------------------------------------------------
612#if CFG_TUD_ENDPOINT0_SIZE > 64
613 #error Control Endpoint Max Packet Size cannot be larger than 64
614#endif
615
616// To avoid GCC compiler warnings when -pedantic option is used (strict ISO C)
618
619#endif /* _TUSB_OPTION_H_ */
620
int make_iso_compilers_happy
Definition: tusb_option.h:617