We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a1654a8 commit 0df4f35Copy full SHA for 0df4f35
components/arduino_tinyusb/src/dcd_esp32sx.c
@@ -37,10 +37,21 @@
37
#include "soc/dport_reg.h"
38
#include "soc/gpio_sig_map.h"
39
#include "soc/usb_periph.h"
40
+#include "soc/usb_reg.h"
41
+#include "soc/usb_struct.h"
42
#include "soc/periph_defs.h" // for interrupt source
43
+#include "soc/usb_wrap_struct.h"
44
45
#include "device/dcd.h"
46
47
+#ifndef USB_OUT_EP_NUM
48
+#define USB_OUT_EP_NUM ((int) (sizeof(USB0.out_ep_reg) / sizeof(USB0.out_ep_reg[0])))
49
+#endif
50
+
51
+#ifndef USB_IN_EP_NUM
52
+#define USB_IN_EP_NUM ((int) (sizeof(USB0.in_ep_reg) / sizeof(USB0.in_ep_reg[0])))
53
54
55
// Max number of bi-directional endpoints including EP0
56
// Note: ESP32S2 specs say there are only up to 5 IN active endpoints include EP0
57
// We should probably prohibit enabling Endpoint IN > 4 (not done yet)
0 commit comments