Skip to content

Commit 4044e9a

Browse files
committed
update lib to compile with esp 2.0.0
1 parent 29c1687 commit 4044e9a

File tree

4 files changed

+7
-8
lines changed

4 files changed

+7
-8
lines changed

src/Adafruit_TinyUSB.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@
2727

2828
// Error message for Core that must select TinyUSB via menu
2929
#if !defined(USE_TINYUSB) && ( defined(ARDUINO_ARCH_SAMD) || \
30-
(defined(ARDUINO_ARCH_RP2040) && !defined(ARDUINO_ARCH_MBED)) || \
31-
defined(ARDUINO_ARCH_ESP32) )
30+
(defined(ARDUINO_ARCH_RP2040) && !defined(ARDUINO_ARCH_MBED)) )
3231
#error TinyUSB is not selected, please select it in "Tools->Menu->USB Stack"
3332
#endif
3433

src/arduino/Adafruit_USBD_CDC.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,7 @@ class Adafruit_USBD_CDC : public Stream, public Adafruit_USBD_Interface {
8383
};
8484

8585
// "Serial" is used with TinyUSB CDC
86-
#if defined(USE_TINYUSB) && \
87-
!(defined(ARDUINO_ARCH_ESP32) && ARDUINO_SERIAL_PORT == 0)
86+
#if defined(USE_TINYUSB)
8887
extern Adafruit_USBD_CDC Serial;
8988
#define SerialTinyUSB Serial
9089
#endif

src/arduino/Adafruit_USBD_Device.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,8 @@ uint16_t const *Adafruit_USBD_Device::descriptor_string_cb(uint8_t index,
308308
//--------------------------------------------------------------------+
309309
// TinyUSB stack callbacks
310310
//--------------------------------------------------------------------+
311+
#if !defined(ARDUINO_ARCH_ESP32)
312+
311313
extern "C" {
312314

313315
// Invoked when received GET DEVICE DESCRIPTOR
@@ -493,10 +495,12 @@ static int strcpy_utf16(const char *s, uint16_t *buf, int bufsize) {
493495
}
494496

495497
// TODO just for compiling, will move to DFU specific file
496-
#if CFG_TUD_DFU_RUNTIME
498+
#if CFG_TUD_DFU_RUNTIME && !defined(ARDUINO_ARCH_ESP32)
497499
void tud_dfu_runtime_reboot_to_dfu_cb(void) {
498500
// TinyUSB_Port_EnterDFU();
499501
}
500502
#endif
501503

504+
#endif // ESP32
505+
502506
#endif // TUSB_OPT_DEVICE_ENABLED

src/arduino/ports/esp32/Adafruit_TinyUSB_esp32.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,7 @@
5454
#include "driver/gpio.h"
5555
#include "driver/periph_ctrl.h"
5656

57-
#include "esp_efuse.h"
58-
#include "esp_efuse_table.h"
5957
#include "esp_rom_gpio.h"
60-
6158
#include "esp32-hal.h"
6259

6360
#include "esp32s2/rom/usb/chip_usb_dw_wrapper.h"

0 commit comments

Comments
 (0)