File tree Expand file tree Collapse file tree 4 files changed +120
-395
lines changed
components/arduino_tinyusb Expand file tree Collapse file tree 4 files changed +120
-395
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,8 @@ if(CONFIG_TINYUSB_ENABLED)
2727 # espressif:
2828 "${COMPONENT_DIR} /src/dcd_dwc2.c"
2929 # tusb:
30- #"{COMPONENT_DIR}/tinyusb/src/portable/synopsys/dwc2/dcd_dwc2.c"
30+ #"${COMPONENT_DIR}/tinyusb/src/portable/synopsys/dwc2/dcd_dwc2.c"
31+ "${COMPONENT_DIR} /tinyusb/src/portable/synopsys/dwc2/dwc2_common.c"
3132 "${COMPONENT_DIR} /tinyusb/src/class/cdc/cdc_device.c"
3233 "${COMPONENT_DIR} /tinyusb/src/class/hid/hid_device.c"
3334 "${COMPONENT_DIR} /tinyusb/src/class/midi/midi_device.c"
Original file line number Diff line number Diff line change 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 //--------------------------------------------------------------------
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) {
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
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;
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;
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);
You can’t perform that action at this time.
0 commit comments