Skip to content

Commit cca3631

Browse files
committed
Merge branch 'release/v5.1' of github.com:espressif/esp32-arduino-lib-builder into release/v5.1
2 parents 2293387 + 6a7dcd1 commit cca3631

File tree

10 files changed

+634
-758
lines changed

10 files changed

+634
-758
lines changed

.github/workflows/cron.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ on:
1212
# │ │ │ │ │
1313
# * * * * *
1414
- cron: '0 */6 * * *'
15-
workflow_dispatch: # For testing
15+
workflow_dispatch: # For manually rebuilding the libraries
1616

1717
defaults:
1818
run:
@@ -21,6 +21,7 @@ defaults:
2121
jobs:
2222
build-libs:
2323
name: Build with IDF ${{ matrix.idf_branch }}
24+
if: github.repository_owner == 'espressif'
2425
uses: ./.github/workflows/cron_build.yml
2526
with:
2627
idf_branch: ${{ matrix.idf_branch }}

.github/workflows/cron_build.yml

-1
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,6 @@ jobs:
132132
compression-level: 0
133133

134134
- name: Push changes
135-
if: github.repository == 'espressif/esp32-arduino-lib-builder'
136135
env:
137136
GITHUB_TOKEN: ${{ secrets.PUSH_TOKEN }}
138137
GIT_AUTHOR_EMAIL: ${{ secrets.PUSH_EMAIL }}

components/arduino_tinyusb/CMakeLists.txt

+2-1
Original file line numberDiff line numberDiff 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"

components/arduino_tinyusb/patches/dcd_dwc2.patch

+19-19
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+
@@ -243,6 +243,17 @@
44
//--------------------------------------------------------------------
55
// Endpoint
66
//--------------------------------------------------------------------
@@ -14,15 +14,16 @@
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);
20-
@@ -332,7 +342,19 @@
21-
(p_endpoint_desc->bmAttributes.xfer != TUSB_XFER_ISOCHRONOUS ? DOEPCTL_SD0PID_SEVNFRM : 0) |
22-
(xfer->max_size << DOEPCTL_MPSIZ_Pos);
20+
const uint8_t epnum = tu_edpt_number(p_endpoint_desc->bEndpointAddress);
21+
@@ -266,7 +277,18 @@
22+
depctl.bm.set_data0_iso_even = 1;
23+
}
2324
if (dir == TUSB_DIR_IN) {
24-
- epctl |= (epnum << DIEPCTL_TXFNUM_Pos);
25-
+ //epctl |= (epnum << DIEPCTL_TXFNUM_Pos);
25+
- depctl.bm.tx_fifo_num = epnum;
26+
+ //depctl.bm.tx_fifo_num = epnum;
2627
+ uint8_t fifo_num = epnum;
2728
+#if defined(TUP_USBIP_DWC2_ESP32)
2829
+ // Special Case for EP5, which is used by CDC but not actually called by the driver
@@ -32,13 +33,12 @@
3233
+ } else {
3334
+ fifo_num = get_free_fifo();
3435
+ }
35-
+ //TU_ASSERT(fifo_num != 0);
3636
+#endif
37-
+ epctl |= (fifo_num << DIEPCTL_TXFNUM_Pos);
37+
+ depctl.bm.tx_fifo_num = fifo_num;
3838
}
3939

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

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

52-
@@ -1186,6 +1212,9 @@
53-
if (int_status & GINTSTS_USBRST) {
52+
@@ -997,6 +1023,9 @@
53+
if (gintsts & GINTSTS_USBRST) {
5454
// USBRST is start of reset.
5555
dwc2->gintsts = GINTSTS_USBRST;
5656
+#if defined(TUP_USBIP_DWC2_ESP32)
5757
+ _allocated_fifos = 1;
5858
+#endif
59-
bus_reset(rhport);
59+
handle_bus_reset(rhport);
6060
}
6161

62-
@@ -1217,7 +1246,11 @@
62+
@@ -1008,7 +1037,11 @@
6363

64-
if (int_status & GINTSTS_USBSUSP) {
64+
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);
@@ -71,8 +71,8 @@
7171
+#endif
7272
}
7373

74-
if (int_status & GINTSTS_WKUINT) {
75-
@@ -1234,6 +1267,9 @@
74+
if (gintsts & GINTSTS_WKUINT) {
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)