Skip to content

Release/v5.1 #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/cron.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
# │ │ │ │ │
# * * * * *
- cron: '0 */6 * * *'
workflow_dispatch: # For testing
workflow_dispatch: # For manually rebuilding the libraries

defaults:
run:
Expand All @@ -21,6 +21,7 @@ defaults:
jobs:
build-libs:
name: Build with IDF ${{ matrix.idf_branch }}
if: github.repository_owner == 'espressif'
uses: ./.github/workflows/cron_build.yml
with:
idf_branch: ${{ matrix.idf_branch }}
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/cron_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,6 @@ jobs:
compression-level: 0

- name: Push changes
if: github.repository == 'espressif/esp32-arduino-lib-builder'
env:
GITHUB_TOKEN: ${{ secrets.PUSH_TOKEN }}
GIT_AUTHOR_EMAIL: ${{ secrets.PUSH_EMAIL }}
Expand Down
3 changes: 2 additions & 1 deletion components/arduino_tinyusb/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ if(CONFIG_TINYUSB_ENABLED)
# espressif:
"${COMPONENT_DIR}/src/dcd_dwc2.c"
# tusb:
#"{COMPONENT_DIR}/tinyusb/src/portable/synopsys/dwc2/dcd_dwc2.c"
#"${COMPONENT_DIR}/tinyusb/src/portable/synopsys/dwc2/dcd_dwc2.c"
"${COMPONENT_DIR}/tinyusb/src/portable/synopsys/dwc2/dwc2_common.c"
"${COMPONENT_DIR}/tinyusb/src/class/cdc/cdc_device.c"
"${COMPONENT_DIR}/tinyusb/src/class/hid/hid_device.c"
"${COMPONENT_DIR}/tinyusb/src/class/midi/midi_device.c"
Expand Down
38 changes: 19 additions & 19 deletions components/arduino_tinyusb/patches/dcd_dwc2.patch
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- a/components/arduino_tinyusb/src/dcd_dwc2.c 2024-10-02 12:17:40.000000000 +0300
+++ b/components/arduino_tinyusb/src/dcd_dwc2.c 2024-10-02 12:19:48.000000000 +0300
@@ -316,6 +316,16 @@
@@ -243,6 +243,17 @@
//--------------------------------------------------------------------
// Endpoint
//--------------------------------------------------------------------
Expand All @@ -14,15 +14,16 @@
+ return 0;
+}
+#endif
static void edpt_activate(uint8_t rhport, tusb_desc_endpoint_t const * p_endpoint_desc) {
+
static void edpt_activate(uint8_t rhport, const tusb_desc_endpoint_t* p_endpoint_desc) {
dwc2_regs_t* dwc2 = DWC2_REG(rhport);
@@ -332,7 +342,19 @@
(p_endpoint_desc->bmAttributes.xfer != TUSB_XFER_ISOCHRONOUS ? DOEPCTL_SD0PID_SEVNFRM : 0) |
(xfer->max_size << DOEPCTL_MPSIZ_Pos);
const uint8_t epnum = tu_edpt_number(p_endpoint_desc->bEndpointAddress);
@@ -266,7 +277,18 @@
depctl.bm.set_data0_iso_even = 1;
}
if (dir == TUSB_DIR_IN) {
- epctl |= (epnum << DIEPCTL_TXFNUM_Pos);
+ //epctl |= (epnum << DIEPCTL_TXFNUM_Pos);
- depctl.bm.tx_fifo_num = epnum;
+ //depctl.bm.tx_fifo_num = epnum;
+ uint8_t fifo_num = epnum;
+#if defined(TUP_USBIP_DWC2_ESP32)
+ // Special Case for EP5, which is used by CDC but not actually called by the driver
Expand All @@ -32,13 +33,12 @@
+ } else {
+ fifo_num = get_free_fifo();
+ }
+ //TU_ASSERT(fifo_num != 0);
+#endif
+ epctl |= (fifo_num << DIEPCTL_TXFNUM_Pos);
+ depctl.bm.tx_fifo_num = fifo_num;
}

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

Expand All @@ -49,19 +49,19 @@
dfifo_flush_tx(dwc2, 0x10); // all tx fifo
dfifo_flush_rx(dwc2);

@@ -1186,6 +1212,9 @@
if (int_status & GINTSTS_USBRST) {
@@ -997,6 +1023,9 @@
if (gintsts & GINTSTS_USBRST) {
// USBRST is start of reset.
dwc2->gintsts = GINTSTS_USBRST;
+#if defined(TUP_USBIP_DWC2_ESP32)
+ _allocated_fifos = 1;
+#endif
bus_reset(rhport);
handle_bus_reset(rhport);
}

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

if (int_status & GINTSTS_USBSUSP) {
if (gintsts & GINTSTS_USBSUSP) {
dwc2->gintsts = GINTSTS_USBSUSP;
- dcd_event_bus_signal(rhport, DCD_EVENT_SUSPEND, true);
+ //dcd_event_bus_signal(rhport, DCD_EVENT_SUSPEND, true);
Expand All @@ -71,8 +71,8 @@
+#endif
}

if (int_status & GINTSTS_WKUINT) {
@@ -1234,6 +1267,9 @@
if (gintsts & GINTSTS_WKUINT) {
@@ -1025,6 +1058,9 @@

if (otg_int & GOTGINT_SEDET) {
dcd_event_bus_signal(rhport, DCD_EVENT_UNPLUGGED, true);
Expand Down
Loading
Loading