diff options
| author | hathach <[email protected]> | 2026-04-26 10:34:50 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2026-04-26 11:42:52 +0700 |
| commit | dd107171535c20272e80e2b11e3bc2a368f531d3 (patch) | |
| tree | 3971919220ac60a7ff3c83be00d1cfb9f8387466 /examples/device/printer_to_cdc/src | |
| parent | 5ba472d5c9777e83523d7db718743e3cd5c8761a (diff) | |
max32 change bulk endpoint to EP8,9 (2KB FIFO) and Audio ISO to EP10, 11 (4KB FIFO)
Diffstat (limited to 'examples/device/printer_to_cdc/src')
| -rw-r--r-- | examples/device/printer_to_cdc/src/usb_descriptors.c | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/examples/device/printer_to_cdc/src/usb_descriptors.c b/examples/device/printer_to_cdc/src/usb_descriptors.c index 2e6b3f6c3..db7bfe97a 100644 --- a/examples/device/printer_to_cdc/src/usb_descriptors.c +++ b/examples/device/printer_to_cdc/src/usb_descriptors.c @@ -68,11 +68,20 @@ uint8_t const *tud_descriptor_device_cb(void) { // Endpoint numbers #if CFG_TUD_ENDPOINT_ONE_DIRECTION_ONLY - #define EPNUM_CDC_NOTIF 0x81 - #define EPNUM_CDC_OUT 0x02 - #define EPNUM_CDC_IN 0x83 - #define EPNUM_PRINTER_OUT 0x04 - #define EPNUM_PRINTER_IN 0x85 + #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_PRINTER_OUT 0x0A + #define EPNUM_PRINTER_IN 0x8B + #else + #define EPNUM_CDC_NOTIF 0x81 + #define EPNUM_CDC_OUT 0x02 + #define EPNUM_CDC_IN 0x83 + #define EPNUM_PRINTER_OUT 0x04 + #define EPNUM_PRINTER_IN 0x85 + #endif #else #define EPNUM_CDC_NOTIF 0x81 #define EPNUM_CDC_OUT 0x02 |
