diff options
| author | hathach <[email protected]> | 2019-09-09 00:41:17 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2019-09-09 00:41:17 +0700 |
| commit | c2d0d2d4d845dedb6cc745716e4b37b883f1ea90 (patch) | |
| tree | 823defd5cfa3eb0e8d17955f7f20a4049a719676 /examples/device | |
| parent | e123cad7bb561968cb563a7fc73848298ca5bea5 (diff) | |
update config
Diffstat (limited to 'examples/device')
| -rw-r--r-- | examples/device/cdc_msc_hid/src/tusb_config.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/examples/device/cdc_msc_hid/src/tusb_config.h b/examples/device/cdc_msc_hid/src/tusb_config.h index 544216da9..6eb6c10f1 100644 --- a/examples/device/cdc_msc_hid/src/tusb_config.h +++ b/examples/device/cdc_msc_hid/src/tusb_config.h @@ -75,12 +75,13 @@ #define CFG_TUD_CDC 1 #define CFG_TUD_MSC 1 -#if CFG_TUSB_MCU == OPT_MCU_STM32F4 -// STM32F4 does not have enough endpoints (4, including hardcoded control +// Some STM32 MCUs does not have enough endpoints (4, including control // endpoint) to enable CDC, MSC, and HID simultaneously, so disable HID as a compromise. -#define CFG_TUD_HID 0 +#if CFG_TUSB_MCU == OPT_MCU_STM32F4 + #include "stm32f4xx.h" + #define CFG_TUD_HID ((USB_OTG_FS_MAX_IN_ENDPOINTS > 4) ? 1 : 0) #else -#define CFG_TUD_HID 1 + #define CFG_TUD_HID 1 #endif #define CFG_TUD_MIDI 0 |
