diff options
| author | Ha Thach <[email protected]> | 2026-04-28 22:02:31 +0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2026-04-28 22:02:31 +0700 |
| commit | 4a4420cd070f4460f6f5ed3c17011d78c325d7c0 (patch) | |
| tree | 7595327abe8468e63eb470bf73a4531fb1c87495 /examples/device/cdc_uac2/src | |
| parent | 4c7fd70e53b34bf63ef9334f2b5624cac48299f1 (diff) | |
| parent | f2654a675b67b0b83337dd4df13afd498c3a0809 (diff) | |
Merge pull request #3605 from hathach/musb-followup-3594
Enhance dcd musb, double packet, refactor EP0, fix DATAEND race with EP0
Diffstat (limited to 'examples/device/cdc_uac2/src')
| -rw-r--r-- | examples/device/cdc_uac2/src/usb_descriptors.c | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/examples/device/cdc_uac2/src/usb_descriptors.c b/examples/device/cdc_uac2/src/usb_descriptors.c index e6caaa971..fdffc761e 100644 --- a/examples/device/cdc_uac2/src/usb_descriptors.c +++ b/examples/device/cdc_uac2/src/usb_descriptors.c @@ -97,15 +97,25 @@ uint8_t const * tud_descriptor_device_cb(void) #define EPNUM_CDC_OUT 0x02 #define EPNUM_CDC_IN 0x82 -#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_AUDIO_IN 0x01 - #define EPNUM_AUDIO_OUT 0x02 + #if TU_CHECK_MCU(OPT_MCU_MAX32650, OPT_MCU_MAX32666, OPT_MCU_MAX32690, OPT_MCU_MAX78002) + // Put CDC bulk on EP>=8 and audio iso on EP10/11 so the 2048/4096-byte FIFOs can back double packet buffering + #define EPNUM_AUDIO_OUT 0x0A + #define EPNUM_AUDIO_IN 0x0B - #define EPNUM_CDC_NOTIF 0x83 - #define EPNUM_CDC_OUT 0x04 - #define EPNUM_CDC_IN 0x85 + #define EPNUM_CDC_NOTIF 0x83 + #define EPNUM_CDC_OUT 0x08 + #define EPNUM_CDC_IN 0x89 + #else + #define EPNUM_AUDIO_IN 0x01 + #define EPNUM_AUDIO_OUT 0x02 + + #define EPNUM_CDC_NOTIF 0x83 + #define EPNUM_CDC_OUT 0x04 + #define EPNUM_CDC_IN 0x85 + #endif #else #define EPNUM_AUDIO_IN 0x01 |
