File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change 4242#include "esp32s2/rom/usb/usb_dc.h"
4343#include "esp32s2/rom/usb/chip_usb_dw_wrapper.h"
4444#elif CONFIG_IDF_TARGET_ESP32S3
45- #include "hal/usb_serial_jtag_ll .h"
45+ #if defined __has_include && __has_include ( "hal/usb_phy_ll .h" )
4646#include "hal/usb_phy_ll.h"
47+ #else
48+ #include "hal/usb_fsls_phy_ll.h"
49+ #endif
50+ #include "hal/usb_serial_jtag_ll.h"
4751#include "esp32s3/rom/usb/usb_persist.h"
4852#include "esp32s3/rom/usb/usb_dc.h"
4953#include "esp32s3/rom/usb/chip_usb_dw_wrapper.h"
@@ -441,7 +445,11 @@ static void usb_switch_to_cdc_jtag(){
441445 digitalWrite (USBPHY_DP_NUM , LOW );
442446
443447 // Initialize CDC+JTAG ISR to listen for BUS_RESET
448+ #if defined __has_include && __has_include ("hal/usb_phy_ll.h" )
444449 usb_phy_ll_int_jtag_enable (& USB_SERIAL_JTAG );
450+ #else
451+ usb_fsls_phy_ll_int_jtag_enable (& USB_SERIAL_JTAG );
452+ #endif
445453 usb_serial_jtag_ll_disable_intr_mask (USB_SERIAL_JTAG_LL_INTR_MASK );
446454 usb_serial_jtag_ll_clr_intsts_mask (USB_SERIAL_JTAG_LL_INTR_MASK );
447455 usb_serial_jtag_ll_ena_intr_mask (USB_SERIAL_JTAG_INTR_BUS_RESET );
You can’t perform that action at this time.
0 commit comments