Skip to content

Commit af5f389

Browse files
committed
use esp32s2 core tusb_config instead of this library per PR review
add tud_dfu_runtime_reboot_to_dfu_cb() to prevent compile error with DFU enabled.
1 parent 3bfa336 commit af5f389

File tree

3 files changed

+10
-87
lines changed

3 files changed

+10
-87
lines changed

src/arduino/Adafruit_USBD_Device.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -470,4 +470,12 @@ static int strcpy_utf16(const char *s, uint16_t *buf, int bufsize) {
470470
return buflen;
471471
}
472472

473+
// TODO just for compiling, will move to DFU specific file
474+
#if CFG_TUD_DFU_RUNTIME
475+
void tud_dfu_runtime_reboot_to_dfu_cb(void)
476+
{
477+
// TinyUSB_Port_EnterDFU();
478+
}
479+
#endif
480+
473481
#endif // TUSB_OPT_DEVICE_ENABLED

src/arduino/ports/esp32/tusb_config_esp32.h

Lines changed: 0 additions & 86 deletions
This file was deleted.

src/tusb_config.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@
3939
#include "arduino/ports/rp2040/tusb_config_rp2040.h"
4040

4141
#elif defined(ARDUINO_ARCH_ESP32)
42-
#include "arduino/ports/esp32/tusb_config_esp32.h"
42+
// Use the BSP sdk/include/arduino_tinyusb/include/tusb_config.h
43+
#include <tusb_config.h>
4344

4445
#else
4546
#error TinyUSB Arduino Library does not support your core yet

0 commit comments

Comments
 (0)