diff options
| author | hathach <[email protected]> | 2026-04-28 22:08:28 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2026-04-28 22:08:28 +0700 |
| commit | 7d556a3ae108fcc43515e1ef2c5ea613ec324551 (patch) | |
| tree | 5e02238c6b8cad4880b2ba2a9fa9983bc79e4a6e /examples/device/cdc_msc/src | |
| parent | d3107be360b45c4b8dbc223dcc5e5f57b582c5ff (diff) | |
| parent | 4a4420cd070f4460f6f5ed3c17011d78c325d7c0 (diff) | |
Merge branch 'master' into fork/kira-live/master
# Conflicts:
# src/device/usbd_control.c
Diffstat (limited to 'examples/device/cdc_msc/src')
| -rw-r--r-- | examples/device/cdc_msc/src/usb_descriptors.c | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/examples/device/cdc_msc/src/usb_descriptors.c b/examples/device/cdc_msc/src/usb_descriptors.c index c668ea3a7..5dc80dee3 100644 --- a/examples/device/cdc_msc/src/usb_descriptors.c +++ b/examples/device/cdc_msc/src/usb_descriptors.c @@ -102,15 +102,25 @@ enum { #define EPNUM_MSC_OUT 0x05 #define EPNUM_MSC_IN 0x84 -#elif defined(TUD_ENDPOINT_ONE_DIRECTION_ONLY) +#elif CFG_TUD_ENDPOINT_ONE_DIRECTION_ONLY // MCUs that don't support a same endpoint number with different direction IN and OUT defined in tusb_mcu.h // e.g EP1 OUT & EP1 IN cannot exist together - #define EPNUM_CDC_NOTIF 0x81 - #define EPNUM_CDC_OUT 0x02 - #define EPNUM_CDC_IN 0x83 + #if TU_CHECK_MCU(OPT_MCU_MAX32650, OPT_MCU_MAX32666, OPT_MCU_MAX32690, OPT_MCU_MAX78002) + // Put bulk on EP>=8 so the 2048/4096-byte FIFOs can back double packet buffering + #define EPNUM_CDC_NOTIF 0x81 + #define EPNUM_CDC_OUT 0x08 + #define EPNUM_CDC_IN 0x89 - #define EPNUM_MSC_OUT 0x04 - #define EPNUM_MSC_IN 0x85 + #define EPNUM_MSC_OUT 0x0A + #define EPNUM_MSC_IN 0x8B + #else + #define EPNUM_CDC_NOTIF 0x81 + #define EPNUM_CDC_OUT 0x02 + #define EPNUM_CDC_IN 0x83 + + #define EPNUM_MSC_OUT 0x04 + #define EPNUM_MSC_IN 0x85 + #endif #else #define EPNUM_CDC_NOTIF 0x81 |
