summaryrefslogtreecommitdiff
path: root/src/portable
diff options
context:
space:
mode:
authorAlex Lisitsyn <[email protected]>2021-03-09 11:29:07 +0100
committerAlex Lisitsyn <[email protected]>2021-04-16 13:38:00 +0200
commit2f0cb8b5f1a944187635a58a748ed08738d324a5 (patch)
tree72948ac73b578aa315d37486f04fc2c3351ab9aa /src/portable
parentc611199632b9288eff76c1c4bfdce5d8cc024748 (diff)
tinyusb: add support of esp32s3 target
add support of new esp32s3 target and the board update the roles.mk wrapper to allow dfu flashing of espressif chip update examples to allow compilation for esp32s3_addax_1 board once the code is tested the PR to original tinyusb repo will be submitted
Diffstat (limited to 'src/portable')
-rw-r--r--src/portable/espressif/esp32sx/dcd_esp32sx.c (renamed from src/portable/espressif/esp32s2/dcd_esp32s2.c)7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/portable/espressif/esp32s2/dcd_esp32s2.c b/src/portable/espressif/esp32sx/dcd_esp32sx.c
index edbc872fe..74842a291 100644
--- a/src/portable/espressif/esp32s2/dcd_esp32s2.c
+++ b/src/portable/espressif/esp32sx/dcd_esp32sx.c
@@ -29,14 +29,14 @@
#include "tusb_option.h"
#include "common/tusb_fifo.h"
-#if CFG_TUSB_MCU == OPT_MCU_ESP32S2 && TUSB_OPT_DEVICE_ENABLED
+#if (((CFG_TUSB_MCU == OPT_MCU_ESP32S2) || (CFG_TUSB_MCU == OPT_MCU_ESP32S3)) && TUSB_OPT_DEVICE_ENABLED)
// Espressif
#include "driver/periph_ctrl.h"
#include "freertos/xtensa_api.h"
#include "esp_intr_alloc.h"
#include "esp_log.h"
-#include "esp32s2/rom/gpio.h"
+#include "driver/gpio.h"
#include "soc/dport_reg.h"
#include "soc/gpio_sig_map.h"
#include "soc/usb_periph.h"
@@ -254,6 +254,7 @@ bool dcd_edpt_open(uint8_t rhport, tusb_desc_endpoint_t const *desc_edpt)
uint8_t const epnum = tu_edpt_number(desc_edpt->bEndpointAddress);
uint8_t const dir = tu_edpt_dir(desc_edpt->bEndpointAddress);
+ TU_ASSERT(desc_edpt->wMaxPacketSize.size <= 64);
TU_ASSERT(epnum < EP_MAX);
xfer_ctl_t *xfer = XFER_CTL_BASE(epnum, dir);
@@ -863,5 +864,5 @@ void dcd_int_disable (uint8_t rhport)
esp_intr_free(usb_ih);
}
-#endif // OPT_MCU_ESP32S2
+#endif // #if OPT_MCU_ESP32S2 || OPT_MCU_ESP32S3