Skip to content

fix build with esp32 v2 #388

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 1 commit into from
Feb 19, 2024
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 src/arduino/Adafruit_USBD_Device.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
#define ADAFRUIT_USBD_DEVICE_H_

#include "Adafruit_USBD_Interface.h"
#include "tusb.h"

#include "../tusb.h" // use relative path to prevent ESP32 out-of-sync issue

#ifdef ARDUINO_ARCH_ESP32
#include "esp32-hal-tinyusb.h"
Expand Down
2 changes: 1 addition & 1 deletion src/arduino/Adafruit_USBH_Host.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
* THE SOFTWARE.
*/

// ESP32 out-of-sync
#ifdef ARDUINO_ARCH_ESP32
#include "arduino/ports/esp32/tusb_config_esp32.h"
#include "driver/gpio.h"
Expand Down Expand Up @@ -182,6 +181,7 @@ TU_ATTR_WEAK void tuh_hid_report_received_cb(uint8_t dev_addr, uint8_t instance,

#if defined(ARDUINO_ARCH_ESP32)

// ESP32 out-of-sync
#if ESP_ARDUINO_VERSION < ESP_ARDUINO_VERSION_VAL(2, 0, 14) && \
!defined(PLATFORMIO)
extern "C" void hcd_int_handler_esp32(uint8_t rhport, bool in_isr);
Expand Down
6 changes: 3 additions & 3 deletions src/class/cdc/cdc_host.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,21 +32,21 @@
#include "arduino/ports/esp32/tusb_config_esp32.h"

#ifndef CFG_TUH_CDC_FTDI_VID_PID_LIST
// List of product IDs that can use the FTDI CDC driver. 0x0403 is FTDI's VID
// List of product IDs that can use the FTDI CDC driver. 0x0403 is FTDI's VID
#define CFG_TUH_CDC_FTDI_VID_PID_LIST \
{0x0403, 0x6001}, {0x0403, 0x6006}, {0x0403, 0x6010}, {0x0403, 0x6011}, \
{0x0403, 0x6014}, {0x0403, 0x6015}, {0x0403, 0x8372}, {0x0403, 0xFBFA}, \
{0x0403, 0xCD18}
#endif

#ifndef CFG_TUH_CDC_CP210X_VID_PID_LIST
// List of product IDs that can use the CP210X CDC driver. 0x10C4 is Silicon Labs' VID
// List of product IDs that can use the CP210X CDC driver. 0x10C4 is Silicon Labs' VID
#define CFG_TUH_CDC_CP210X_VID_PID_LIST \
{0x10C4, 0xEA60}, {0x10C4, 0xEA70}
#endif

#ifndef CFG_TUH_CDC_CH34X_VID_PID_LIST
// List of product IDs that can use the CH34X CDC driver
// List of product IDs that can use the CH34X CDC driver
#define CFG_TUH_CDC_CH34X_VID_PID_LIST \
{ 0x1a86, 0x5523 }, /* ch341 chip */ \
{ 0x1a86, 0x7522 }, /* ch340k chip */ \
Expand Down
8 changes: 4 additions & 4 deletions src/class/net/ncm_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@
* This file is part of the TinyUSB stack.
*/

#include "tusb_option.h"

#if ( CFG_TUD_ENABLED && CFG_TUD_NCM )

// ESP32 out-of-sync
#ifdef ARDUINO_ARCH_ESP32
#include "arduino/ports/esp32/tusb_config_esp32.h"
#endif

#include "tusb_option.h"

#if ( CFG_TUD_ENABLED && CFG_TUD_NCM )

#include "device/usbd.h"
#include "device/usbd_pvt.h"
#include "net_device.h"
Expand Down