Skip to content

Commit ca07ce6

Browse files
committed
pkg/tinyusb: migration to ESP-IDF v.54
1 parent ce1d35f commit ca07ce6

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
From 93a725df6169ba66124079d84490e44575e1793a Mon Sep 17 00:00:00 2001
2+
From: Gunar Schorcht <[email protected]>
3+
Date: Tue, 18 Mar 2025 13:43:15 +0100
4+
Subject: [PATCH 6/6] src/portable/espressif: migration to ESP-IDF v5.4
5+
6+
---
7+
src/portable/espressif/esp32sx/dcd_esp32sx.c | 10 ++++++++++
8+
1 file changed, 10 insertions(+)
9+
10+
diff --git a/src/portable/espressif/esp32sx/dcd_esp32sx.c b/src/portable/espressif/esp32sx/dcd_esp32sx.c
11+
index 717ac707221..e9bff871815 100644
12+
--- a/src/portable/espressif/esp32sx/dcd_esp32sx.c
13+
+++ b/src/portable/espressif/esp32sx/dcd_esp32sx.c
14+
@@ -38,10 +38,20 @@
15+
#include "soc/dport_reg.h"
16+
#include "soc/gpio_sig_map.h"
17+
#include "soc/usb_periph.h"
18+
+#include "soc/usb_reg.h"
19+
+#include "soc/usb_struct.h"
20+
#include "soc/periph_defs.h" // for interrupt source
21+
22+
#include "device/dcd.h"
23+
24+
+#ifndef USB_OUT_EP_NUM
25+
+#define USB_OUT_EP_NUM ((int) (sizeof(USB0.out_ep_reg) / sizeof(USB0.out_ep_reg[0])))
26+
+#endif
27+
+
28+
+#ifndef USB_IN_EP_NUM
29+
+#define USB_IN_EP_NUM ((int) (sizeof(USB0.in_ep_reg) / sizeof(USB0.in_ep_reg[0])))
30+
+#endif
31+
+
32+
// Max number of bi-directional endpoints including EP0
33+
// Note: ESP32S2 specs say there are only up to 5 IN active endpoints include EP0
34+
// We should probably prohibit enabling Endpoint IN > 4 (not done yet)
35+
--
36+
2.34.1
37+

0 commit comments

Comments
 (0)