summaryrefslogtreecommitdiff
path: root/examples/device
diff options
context:
space:
mode:
authorGordon McNab <[email protected]>2022-11-29 18:49:23 +0000
committerGordon McNab <[email protected]>2022-11-29 18:49:23 +0000
commit7d8d3eca730552355b5ad442f58b5a6b070d4d03 (patch)
treec9b97f40cbd86d7b8baea31b8e331d1b1cfb8c66 /examples/device
parent1fce76ad472fe1936eedea0688960c76bd42fd40 (diff)
Fix transfers issues with FT9xx
Correct USB FIFO use for setup data phases (OUT transfers). We cannot stop traffic on the control endpoint so we set a flag and pull data from host when tinyUSB requests it from the USB FIFO. Extend this for all endpoints although currently not required. Rename all instances of ft90x which can apply to ft93x as ft9xx. Add support for the cdc_dual_ports example for ft9xx. Add LED pin definition for board LED in a simple to access place on the Bridgetek MM900EVx boards.
Diffstat (limited to 'examples/device')
-rw-r--r--examples/device/cdc_dual_ports/src/usb_descriptors.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/examples/device/cdc_dual_ports/src/usb_descriptors.c b/examples/device/cdc_dual_ports/src/usb_descriptors.c
index 9f212c78f..5a8dea553 100644
--- a/examples/device/cdc_dual_ports/src/usb_descriptors.c
+++ b/examples/device/cdc_dual_ports/src/usb_descriptors.c
@@ -97,7 +97,7 @@ enum
#define EPNUM_CDC_1_OUT 0x05
#define EPNUM_CDC_1_IN 0x85
-#elif CFG_TUSB_MCU == OPT_MCU_SAMG || CFG_TUSB_MCU == OPT_MCU_SAMX7X || CFG_TUSB_MCU == OPT_MCU_FT90X || CFG_TUSB_MCU == OPT_MCU_FT93X
+#elif CFG_TUSB_MCU == OPT_MCU_SAMG || CFG_TUSB_MCU == OPT_MCU_SAMX7X
// SAMG & SAME70 don't support a same endpoint number with different direction IN and OUT
// e.g EP1 OUT & EP1 IN cannot exist together
#define EPNUM_CDC_0_NOTIF 0x81
@@ -108,6 +108,16 @@ enum
#define EPNUM_CDC_1_OUT 0x05
#define EPNUM_CDC_1_IN 0x86
+#elif CFG_TUSB_MCU == OPT_MCU_FT90X || CFG_TUSB_MCU == OPT_MCU_FT93X
+ // FT9XX doesn't support a same endpoint number with different direction IN and OUT
+ // e.g EP1 OUT & EP1 IN cannot exist together
+ #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
+
#else
#define EPNUM_CDC_0_NOTIF 0x81
#define EPNUM_CDC_0_OUT 0x02