Skip to content

Commit 533482e

Browse files
committed
update arduino_tinyusb dcd
1 parent f43bfe4 commit 533482e

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

Diff for: components/arduino_tinyusb/CMakeLists.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ if(CONFIG_TINYUSB_ENABLED)
2626
"${COMPONENT_DIR}/include")
2727
set(srcs
2828
# espressif:
29-
"${COMPONENT_DIR}/src/dcd_esp32s2.c"
29+
"${COMPONENT_DIR}/src/dcd_esp32sx.c"
3030
# tusb:
31-
#"${COMPONENT_DIR}/tinyusb/src/portable/espressif/esp32s2/dcd_esp32s2.c"
31+
#"${COMPONENT_DIR}/tinyusb/src/portable/espressif/esp32sx/dcd_esp32sx.c"
3232
"${COMPONENT_DIR}/tinyusb/src/class/cdc/cdc_device.c"
3333
"${COMPONENT_DIR}/tinyusb/src/class/hid/hid_device.c"
3434
"${COMPONENT_DIR}/tinyusb/src/class/midi/midi_device.c"

Diff for: components/arduino_tinyusb/src/dcd_esp32s2.c renamed to components/arduino_tinyusb/src/dcd_esp32sx.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,15 @@
2727
*/
2828

2929
#include "tusb_option.h"
30-
#include "common/tusb_fifo.h"
3130

32-
#if CFG_TUSB_MCU == OPT_MCU_ESP32S2 && TUSB_OPT_DEVICE_ENABLED
31+
#if (((CFG_TUSB_MCU == OPT_MCU_ESP32S2) || (CFG_TUSB_MCU == OPT_MCU_ESP32S3)) && TUSB_OPT_DEVICE_ENABLED)
3332

3433
// Espressif
3534
#include "driver/periph_ctrl.h"
3635
#include "freertos/xtensa_api.h"
3736
#include "esp_intr_alloc.h"
3837
#include "esp_log.h"
39-
#include "esp32s2/rom/gpio.h"
38+
#include "driver/gpio.h"
4039
#include "soc/dport_reg.h"
4140
#include "soc/gpio_sig_map.h"
4241
#include "soc/usb_periph.h"
@@ -299,6 +298,7 @@ bool dcd_edpt_open(uint8_t rhport, tusb_desc_endpoint_t const *desc_edpt)
299298
uint8_t const epnum = tu_edpt_number(desc_edpt->bEndpointAddress);
300299
uint8_t const dir = tu_edpt_dir(desc_edpt->bEndpointAddress);
301300

301+
TU_ASSERT(desc_edpt->wMaxPacketSize.size <= 64);
302302
TU_ASSERT(epnum < EP_MAX);
303303

304304
xfer_ctl_t *xfer = XFER_CTL_BASE(epnum, dir);
@@ -932,5 +932,5 @@ void dcd_int_disable (uint8_t rhport)
932932
esp_intr_free(usb_ih);
933933
}
934934

935-
#endif // OPT_MCU_ESP32S2
935+
#endif // #if OPT_MCU_ESP32S2 || OPT_MCU_ESP32S3
936936

0 commit comments

Comments
 (0)