Skip to content

Commit 086e375

Browse files
committed
Update TinyUSB DCD
1 parent 4aaf14c commit 086e375

File tree

2 files changed

+100
-62
lines changed

2 files changed

+100
-62
lines changed

Diff for: components/arduino_tinyusb/patches/dcd_dwc2.patch

+8-8
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,7 +49,7 @@
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;
@@ -59,7 +59,7 @@
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;
@@ -72,7 +72,7 @@
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);

0 commit comments

Comments
 (0)