File tree 1 file changed +9
-1
lines changed
1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change 42
42
#include "esp32s2/rom/usb/usb_dc.h"
43
43
#include "esp32s2/rom/usb/chip_usb_dw_wrapper.h"
44
44
#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" )
46
46
#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"
47
51
#include "esp32s3/rom/usb/usb_persist.h"
48
52
#include "esp32s3/rom/usb/usb_dc.h"
49
53
#include "esp32s3/rom/usb/chip_usb_dw_wrapper.h"
@@ -441,7 +445,11 @@ static void usb_switch_to_cdc_jtag(){
441
445
digitalWrite (USBPHY_DP_NUM , LOW );
442
446
443
447
// Initialize CDC+JTAG ISR to listen for BUS_RESET
448
+ #if defined __has_include && __has_include ("hal/usb_phy_ll.h" )
444
449
usb_phy_ll_int_jtag_enable (& USB_SERIAL_JTAG );
450
+ #else
451
+ usb_fsls_phy_ll_int_jtag_enable (& USB_SERIAL_JTAG );
452
+ #endif
445
453
usb_serial_jtag_ll_disable_intr_mask (USB_SERIAL_JTAG_LL_INTR_MASK );
446
454
usb_serial_jtag_ll_clr_intsts_mask (USB_SERIAL_JTAG_LL_INTR_MASK );
447
455
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