Skip to content

Commit eda5d26

Browse files
committed
Update TinyUSB DCD Source
1 parent 1684457 commit eda5d26

File tree

3 files changed

+118
-390
lines changed

3 files changed

+118
-390
lines changed

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

+8-7
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-
@@ -316,6 +316,16 @@
3+
@@ -209,6 +209,17 @@
44
//--------------------------------------------------------------------
55
// Endpoint
66
//--------------------------------------------------------------------
@@ -14,10 +14,11 @@
1414
+ return 0;
1515
+}
1616
+#endif
17-
17+
+
1818
static void edpt_activate(uint8_t rhport, tusb_desc_endpoint_t const * p_endpoint_desc) {
1919
dwc2_regs_t* dwc2 = DWC2_REG(rhport);
20-
@@ -332,7 +342,19 @@
20+
uint8_t const epnum = tu_edpt_number(p_endpoint_desc->bEndpointAddress);
21+
@@ -224,7 +235,19 @@
2122
(p_endpoint_desc->bmAttributes.xfer != TUSB_XFER_ISOCHRONOUS ? DOEPCTL_SD0PID_SEVNFRM : 0) |
2223
(xfer->max_size << DOEPCTL_MPSIZ_Pos);
2324
if (dir == TUSB_DIR_IN) {
@@ -38,7 +39,7 @@
3839
}
3940

4041
dwc2_dep_t* dep = &dwc2->ep[1 - dir][epnum];
41-
@@ -840,6 +862,10 @@
42+
@@ -304,6 +327,10 @@
4243
}
4344
}
4445

@@ -49,7 +50,7 @@
4950
dfifo_flush_tx(dwc2, 0x10); // all tx fifo
5051
dfifo_flush_rx(dwc2);
5152

52-
@@ -1186,6 +1212,9 @@
53+
@@ -908,6 +935,9 @@
5354
if (int_status & GINTSTS_USBRST) {
5455
// USBRST is start of reset.
5556
dwc2->gintsts = GINTSTS_USBRST;
@@ -59,7 +60,7 @@
5960
bus_reset(rhport);
6061
}
6162

62-
@@ -1217,7 +1246,11 @@
63+
@@ -939,7 +969,11 @@
6364

6465
if (int_status & GINTSTS_USBSUSP) {
6566
dwc2->gintsts = GINTSTS_USBSUSP;
@@ -72,7 +73,7 @@
7273
}
7374

7475
if (int_status & GINTSTS_WKUINT) {
75-
@@ -1234,6 +1267,9 @@
76+
@@ -956,6 +990,9 @@
7677

7778
if (otg_int & GOTGINT_SEDET) {
7879
dcd_event_bus_signal(rhport, DCD_EVENT_UNPLUGGED, true);

0 commit comments

Comments
 (0)