Skip to content

Commit

Permalink
Fix compile branch master as Arduino as component with latest IDF 5.1 (
Browse files Browse the repository at this point in the history
…#9322)

* Fix compile with Lib Builder

with latest IDF 5.1.

* change function name
  • Loading branch information
Jason2866 authored Mar 5, 2024
1 parent 629ffc5 commit 5bcaf99
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion cores/esp32/esp32-hal-tinyusb.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,12 @@
#include "esp32s2/rom/usb/usb_dc.h"
#include "esp32s2/rom/usb/chip_usb_dw_wrapper.h"
#elif CONFIG_IDF_TARGET_ESP32S3
#include "hal/usb_serial_jtag_ll.h"
#if defined __has_include && __has_include ("hal/usb_phy_ll.h")
#include "hal/usb_phy_ll.h"
#else
#include "hal/usb_fsls_phy_ll.h"
#endif
#include "hal/usb_serial_jtag_ll.h"
#include "esp32s3/rom/usb/usb_persist.h"
#include "esp32s3/rom/usb/usb_dc.h"
#include "esp32s3/rom/usb/chip_usb_dw_wrapper.h"
Expand Down Expand Up @@ -441,7 +445,11 @@ static void usb_switch_to_cdc_jtag(){
digitalWrite(USBPHY_DP_NUM, LOW);

// Initialize CDC+JTAG ISR to listen for BUS_RESET
#if defined __has_include && __has_include ("hal/usb_phy_ll.h")
usb_phy_ll_int_jtag_enable(&USB_SERIAL_JTAG);
#else
usb_fsls_phy_ll_int_jtag_enable(&USB_SERIAL_JTAG);
#endif
usb_serial_jtag_ll_disable_intr_mask(USB_SERIAL_JTAG_LL_INTR_MASK);
usb_serial_jtag_ll_clr_intsts_mask(USB_SERIAL_JTAG_LL_INTR_MASK);
usb_serial_jtag_ll_ena_intr_mask(USB_SERIAL_JTAG_INTR_BUS_RESET);
Expand Down

0 comments on commit 5bcaf99

Please sign in to comment.