Skip to content

Commit 1437ad1

Browse files
committed
Add endpoint definitions for more example projects.
1 parent fe63e30 commit 1437ad1

File tree

4 files changed

+32
-0
lines changed

4 files changed

+32
-0
lines changed

examples/device/dynamic_configuration/src/usb_descriptors.c

+13
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,19 @@ enum
145145
#define EPNUM_1_MSC_OUT 0x01
146146
#define EPNUM_1_MSC_IN 0x82
147147

148+
#elif CFG_TUSB_MCU == OPT_MCU_FT90X || CFG_TUSB_MCU == OPT_MCU_FT93X
149+
// FT9XX doesn't support a same endpoint number with different direction IN and OUT
150+
// e.g EP1 OUT & EP1 IN cannot exist together
151+
#define EPNUM_0_CDC_NOTIF 0x81
152+
#define EPNUM_0_CDC_OUT 0x02
153+
#define EPNUM_0_CDC_IN 0x83
154+
155+
#define EPNUM_0_MIDI_OUT 0x04
156+
#define EPNUM_0_MIDI_IN 0x85
157+
158+
#define EPNUM_1_MSC_OUT 0x01
159+
#define EPNUM_1_MSC_IN 0x82
160+
148161
#else
149162
#define EPNUM_0_CDC_NOTIF 0x81
150163
#define EPNUM_0_CDC_OUT 0x02

examples/device/msc_dual_lun/src/usb_descriptors.c

+6
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,12 @@ enum
9090
#define EPNUM_MSC_OUT 0x01
9191
#define EPNUM_MSC_IN 0x82
9292

93+
#elif CFG_TUSB_MCU == OPT_MCU_FT90X || CFG_TUSB_MCU == OPT_MCU_FT93X
94+
// FT9XX doesn't support a same endpoint number with different direction IN and OUT
95+
// e.g EP1 OUT & EP1 IN cannot exist together
96+
#define EPNUM_MSC_OUT 0x01
97+
#define EPNUM_MSC_IN 0x82
98+
9399
#else
94100
#define EPNUM_MSC_OUT 0x01
95101
#define EPNUM_MSC_IN 0x81

examples/device/uac2_headset/src/usb_descriptors.c

+6
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,12 @@ uint8_t const * tud_descriptor_device_cb(void)
9393
#define EPNUM_AUDIO_IN 0x01
9494
#define EPNUM_AUDIO_OUT 0x02
9595

96+
#elif CFG_TUSB_MCU == OPT_MCU_FT90X || CFG_TUSB_MCU == OPT_MCU_FT93X
97+
// FT9XX doesn't support a same endpoint number with different direction IN and OUT
98+
// e.g EP1 OUT & EP1 IN cannot exist together
99+
#define EPNUM_AUDIO_IN 0x01
100+
#define EPNUM_AUDIO_OUT 0x02
101+
96102
#else
97103
#define EPNUM_AUDIO_IN 0x01
98104
#define EPNUM_AUDIO_OUT 0x01

examples/device/webusb_serial/src/usb_descriptors.c

+7
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,13 @@ enum
9797
#define EPNUM_CDC_OUT 3
9898
#define EPNUM_VENDOR_IN 4
9999
#define EPNUM_VENDOR_OUT 5
100+
#elif CFG_TUSB_MCU == OPT_MCU_FT90X || CFG_TUSB_MCU == OPT_MCU_FT93X
101+
// FT9XX doesn't support a same endpoint number with different direction IN and OUT
102+
// e.g EP1 OUT & EP1 IN cannot exist together
103+
#define EPNUM_CDC_IN 2
104+
#define EPNUM_CDC_OUT 3
105+
#define EPNUM_VENDOR_IN 4
106+
#define EPNUM_VENDOR_OUT 5
100107
#else
101108
#define EPNUM_CDC_IN 2
102109
#define EPNUM_CDC_OUT 2

0 commit comments

Comments
 (0)