summaryrefslogtreecommitdiff
path: root/examples/device/printer_to_cdc/src
diff options
context:
space:
mode:
authorHiFiPhile <[email protected]>2026-05-22 15:23:37 +0200
committerHiFiPhile <[email protected]>2026-05-22 15:23:37 +0200
commitd1672d8d0942b0a5d073a3a1ad42cb53f0c9cdb8 (patch)
treed11cf1e3a5ef5eb7fb97b5710ab4887b0491c635 /examples/device/printer_to_cdc/src
parent7258db344e99398a5e10f4c65b24d38c6b94b92b (diff)
parent4c87db341e4af7d53ce9cbbdf693593a520dc538 (diff)
Merge remote-tracking branch 'tinyusb/master' into mickabrig7/master
Diffstat (limited to 'examples/device/printer_to_cdc/src')
-rw-r--r--examples/device/printer_to_cdc/src/usb_descriptors.c21
1 files changed, 15 insertions, 6 deletions
diff --git a/examples/device/printer_to_cdc/src/usb_descriptors.c b/examples/device/printer_to_cdc/src/usb_descriptors.c
index 30d309ed4..db7bfe97a 100644
--- a/examples/device/printer_to_cdc/src/usb_descriptors.c
+++ b/examples/device/printer_to_cdc/src/usb_descriptors.c
@@ -67,12 +67,21 @@ uint8_t const *tud_descriptor_device_cb(void) {
//--------------------------------------------------------------------+
// Endpoint numbers
-#if defined(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 CFG_TUD_ENDPOINT_ONE_DIRECTION_ONLY
+ #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