Skip to content

Commit c223c1b

Browse files
committed
Merge remote-tracking branch 'upstream/release/v5.3' into release/v5.3
2 parents 799669c + 9f26bc4 commit c223c1b

File tree

3 files changed

+101
-66
lines changed

3 files changed

+101
-66
lines changed

components/arduino_tinyusb/patches/dcd_dwc2.patch

+11-11
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
--- a/components/arduino_tinyusb/src/dcd_dwc2.c 2024-10-02 12:17:40.000000000 +0300
22
+++ b/components/arduino_tinyusb/src/dcd_dwc2.c 2024-10-02 12:19:48.000000000 +0300
3-
@@ -215,6 +215,17 @@
3+
@@ -243,6 +243,17 @@
44
//--------------------------------------------------------------------
55
// Endpoint
66
//--------------------------------------------------------------------
@@ -14,11 +14,11 @@
1414
+ return 0;
1515
+}
1616
+#endif
17-
+
18-
static void edpt_activate(uint8_t rhport, tusb_desc_endpoint_t const * p_endpoint_desc) {
17+
+
18+
static void edpt_activate(uint8_t rhport, const tusb_desc_endpoint_t* p_endpoint_desc) {
1919
dwc2_regs_t* dwc2 = DWC2_REG(rhport);
2020
const uint8_t epnum = tu_edpt_number(p_endpoint_desc->bEndpointAddress);
21-
@@ -238,7 +249,18 @@
21+
@@ -266,7 +277,18 @@
2222
depctl.bm.set_data0_iso_even = 1;
2323
}
2424
if (dir == TUSB_DIR_IN) {
@@ -38,7 +38,7 @@
3838
}
3939

4040
dwc2_dep_t* dep = &dwc2->ep[dir == TUSB_DIR_IN ? 0 : 1][epnum];
41-
@@ -523,6 +545,10 @@
41+
@@ -557,6 +579,10 @@
4242
}
4343
}
4444

@@ -49,35 +49,35 @@
4949
dfifo_flush_tx(dwc2, 0x10); // all tx fifo
5050
dfifo_flush_rx(dwc2);
5151

52-
@@ -959,6 +985,9 @@
52+
@@ -997,6 +1023,9 @@
5353
if (gintsts & GINTSTS_USBRST) {
5454
// USBRST is start of reset.
5555
dwc2->gintsts = GINTSTS_USBRST;
5656
+#if TU_CHECK_MCU(OPT_MCU_ESP32S2, OPT_MCU_ESP32S3)
57-
+ allocated_fifos = 1;
57+
+ _allocated_fifos = 1;
5858
+#endif
5959
handle_bus_reset(rhport);
6060
}
6161

62-
@@ -970,7 +999,11 @@
62+
@@ -1008,7 +1037,11 @@
6363

6464
if (gintsts & GINTSTS_USBSUSP) {
6565
dwc2->gintsts = GINTSTS_USBSUSP;
6666
- dcd_event_bus_signal(rhport, DCD_EVENT_SUSPEND, true);
6767
+ //dcd_event_bus_signal(rhport, DCD_EVENT_SUSPEND, true);
6868
+ dcd_event_bus_signal(rhport, DCD_EVENT_UNPLUGGED, true);
6969
+#if TU_CHECK_MCU(OPT_MCU_ESP32S2, OPT_MCU_ESP32S3)
70-
+ allocated_fifos = 1;
70+
+ _allocated_fifos = 1;
7171
+#endif
7272
}
7373

7474
if (gintsts & GINTSTS_WKUINT) {
75-
@@ -987,6 +1020,9 @@
75+
@@ -1025,6 +1058,9 @@
7676

7777
if (otg_int & GOTGINT_SEDET) {
7878
dcd_event_bus_signal(rhport, DCD_EVENT_UNPLUGGED, true);
7979
+#if TU_CHECK_MCU(OPT_MCU_ESP32S2, OPT_MCU_ESP32S3)
80-
+ allocated_fifos = 1;
80+
+ _allocated_fifos = 1;
8181
+#endif
8282
}
8383

0 commit comments

Comments
 (0)