mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-12 13:27:36 +00:00
refactor(hal/usb): Refactor usb_wrap_ll.h
This commit rewrite the 'usb_wrap_ll.h' API as follows: - All APIs renamed from 'usb_fsls_phy_ll_...()' to 'usb_wrap_ll_...()' - APIs now match their equivalent counter parts in 'usb_serial_jtag_ll.h'
This commit is contained in:
@@ -19,7 +19,7 @@
|
||||
#include "esp32s2/rom/usb/cdc_acm.h"
|
||||
#include "esp32s2/rom/usb/usb_common.h"
|
||||
#endif
|
||||
#if CONFIG_ESP_CONSOLE_USB_CDC && SOC_USB_SERIAL_JTAG_SUPPORTED
|
||||
#if CONFIG_ESP_CONSOLE_USB_CDC
|
||||
#include "hal/usb_wrap_ll.h"
|
||||
#endif
|
||||
#include "esp_rom_gpio.h"
|
||||
@@ -106,10 +106,9 @@ void bootloader_console_init(void)
|
||||
esp_rom_output_usb_acm_init(s_usb_cdc_buf, sizeof(s_usb_cdc_buf));
|
||||
esp_rom_output_set_as_console(ESP_ROM_USB_OTG_NUM);
|
||||
esp_rom_install_channel_putc(1, bootloader_console_write_char_usb);
|
||||
#if SOC_USB_SERIAL_JTAG_SUPPORTED
|
||||
usb_fsls_phy_ll_usb_wrap_pad_enable(&USB_WRAP, true);
|
||||
usb_fsls_phy_ll_int_otg_enable(&USB_WRAP);
|
||||
#endif
|
||||
// Ensure that the USB FSLS PHY is mapped to the USB WRAP
|
||||
usb_wrap_ll_phy_enable_pad(&USB_WRAP, true);
|
||||
usb_wrap_ll_phy_enable_external(&USB_WRAP, false);
|
||||
}
|
||||
#endif //CONFIG_ESP_CONSOLE_USB_CDC
|
||||
|
||||
|
Reference in New Issue
Block a user