From b26472af290c3ce292afd1556359816a98c8ecdf Mon Sep 17 00:00:00 2001 From: Darian Leung Date: Thu, 28 Dec 2023 11:48:34 +0800 Subject: [PATCH] refactor(hal/usb): Rename usb_phy files to usb_fsls_phy This commit renames USB PHY related HAL files from "usb_phy_xxx" to "usb_fsls_phy_xxx" since they are only designed to support Full-Speed/Low-Speed Serial USB PHYs. This renmaing is done to accommodate future USB PHYs that use other PHY interfaces (e.g., UTMI, ULPI etc). --- components/bootloader_support/src/bootloader_console.c | 2 +- components/driver/usb_serial_jtag/usb_serial_jtag.c | 2 +- components/hal/CMakeLists.txt | 2 +- .../esp32c3/include/hal/{usb_phy_ll.h => usb_fsls_phy_ll.h} | 0 .../esp32c6/include/hal/{usb_phy_ll.h => usb_fsls_phy_ll.h} | 0 .../esp32h2/include/hal/{usb_phy_ll.h => usb_fsls_phy_ll.h} | 0 .../esp32s2/include/hal/{usb_phy_ll.h => usb_fsls_phy_ll.h} | 0 .../esp32s3/include/hal/{usb_phy_ll.h => usb_fsls_phy_ll.h} | 0 .../hal/include/hal/{usb_phy_hal.h => usb_fsls_phy_hal.h} | 0 components/hal/{usb_phy_hal.c => usb_fsls_phy_hal.c} | 4 ++-- components/usb/usb_phy.c | 4 ++-- 11 files changed, 7 insertions(+), 7 deletions(-) rename components/hal/esp32c3/include/hal/{usb_phy_ll.h => usb_fsls_phy_ll.h} (100%) rename components/hal/esp32c6/include/hal/{usb_phy_ll.h => usb_fsls_phy_ll.h} (100%) rename components/hal/esp32h2/include/hal/{usb_phy_ll.h => usb_fsls_phy_ll.h} (100%) rename components/hal/esp32s2/include/hal/{usb_phy_ll.h => usb_fsls_phy_ll.h} (100%) rename components/hal/esp32s3/include/hal/{usb_phy_ll.h => usb_fsls_phy_ll.h} (100%) rename components/hal/include/hal/{usb_phy_hal.h => usb_fsls_phy_hal.h} (100%) rename components/hal/{usb_phy_hal.c => usb_fsls_phy_hal.c} (96%) diff --git a/components/bootloader_support/src/bootloader_console.c b/components/bootloader_support/src/bootloader_console.c index f248434e59..57f2c50f88 100644 --- a/components/bootloader_support/src/bootloader_console.c +++ b/components/bootloader_support/src/bootloader_console.c @@ -19,7 +19,7 @@ #include "esp32s2/rom/usb/usb_common.h" #endif #if SOC_USB_SERIAL_JTAG_SUPPORTED -#include "hal/usb_phy_ll.h" +#include "hal/usb_fsls_phy_ll.h" #endif #include "esp_rom_gpio.h" #include "esp_rom_uart.h" diff --git a/components/driver/usb_serial_jtag/usb_serial_jtag.c b/components/driver/usb_serial_jtag/usb_serial_jtag.c index 85ac7b9b92..945987ab7e 100644 --- a/components/driver/usb_serial_jtag/usb_serial_jtag.c +++ b/components/driver/usb_serial_jtag/usb_serial_jtag.c @@ -9,7 +9,7 @@ #include #include "esp_log.h" #include "hal/usb_serial_jtag_ll.h" -#include "hal/usb_phy_ll.h" +#include "hal/usb_fsls_phy_ll.h" #include "freertos/FreeRTOS.h" #include "freertos/semphr.h" #include "freertos/ringbuf.h" diff --git a/components/hal/CMakeLists.txt b/components/hal/CMakeLists.txt index 6de6bcb5cf..f18198cc9f 100644 --- a/components/hal/CMakeLists.txt +++ b/components/hal/CMakeLists.txt @@ -246,7 +246,7 @@ if(NOT BOOTLOADER_BUILD) list(APPEND srcs "usb_hal.c" "usb_dwc_hal.c" - "usb_phy_hal.c") + "usb_fsls_phy_hal.c") endif() if(${target} STREQUAL "esp32") diff --git a/components/hal/esp32c3/include/hal/usb_phy_ll.h b/components/hal/esp32c3/include/hal/usb_fsls_phy_ll.h similarity index 100% rename from components/hal/esp32c3/include/hal/usb_phy_ll.h rename to components/hal/esp32c3/include/hal/usb_fsls_phy_ll.h diff --git a/components/hal/esp32c6/include/hal/usb_phy_ll.h b/components/hal/esp32c6/include/hal/usb_fsls_phy_ll.h similarity index 100% rename from components/hal/esp32c6/include/hal/usb_phy_ll.h rename to components/hal/esp32c6/include/hal/usb_fsls_phy_ll.h diff --git a/components/hal/esp32h2/include/hal/usb_phy_ll.h b/components/hal/esp32h2/include/hal/usb_fsls_phy_ll.h similarity index 100% rename from components/hal/esp32h2/include/hal/usb_phy_ll.h rename to components/hal/esp32h2/include/hal/usb_fsls_phy_ll.h diff --git a/components/hal/esp32s2/include/hal/usb_phy_ll.h b/components/hal/esp32s2/include/hal/usb_fsls_phy_ll.h similarity index 100% rename from components/hal/esp32s2/include/hal/usb_phy_ll.h rename to components/hal/esp32s2/include/hal/usb_fsls_phy_ll.h diff --git a/components/hal/esp32s3/include/hal/usb_phy_ll.h b/components/hal/esp32s3/include/hal/usb_fsls_phy_ll.h similarity index 100% rename from components/hal/esp32s3/include/hal/usb_phy_ll.h rename to components/hal/esp32s3/include/hal/usb_fsls_phy_ll.h diff --git a/components/hal/include/hal/usb_phy_hal.h b/components/hal/include/hal/usb_fsls_phy_hal.h similarity index 100% rename from components/hal/include/hal/usb_phy_hal.h rename to components/hal/include/hal/usb_fsls_phy_hal.h diff --git a/components/hal/usb_phy_hal.c b/components/hal/usb_fsls_phy_hal.c similarity index 96% rename from components/hal/usb_phy_hal.c rename to components/hal/usb_fsls_phy_hal.c index 5a0f83bf7a..796e01a862 100644 --- a/components/hal/usb_phy_hal.c +++ b/components/hal/usb_fsls_phy_hal.c @@ -4,8 +4,8 @@ * SPDX-License-Identifier: Apache-2.0 */ -#include "hal/usb_phy_ll.h" -#include "hal/usb_phy_hal.h" +#include "hal/usb_fsls_phy_ll.h" +#include "hal/usb_fsls_phy_hal.h" void usb_phy_hal_init(usb_phy_hal_context_t *hal) { diff --git a/components/usb/usb_phy.c b/components/usb/usb_phy.c index 457769eb17..76982ce5e4 100644 --- a/components/usb/usb_phy.c +++ b/components/usb/usb_phy.c @@ -12,8 +12,8 @@ #include "esp_private/periph_ctrl.h" #include "esp_private/usb_phy.h" #include "soc/usb_otg_periph.h" -#include "hal/usb_phy_hal.h" -#include "hal/usb_phy_ll.h" +#include "hal/usb_fsls_phy_hal.h" +#include "hal/usb_fsls_phy_ll.h" #include "esp_rom_gpio.h" #include "driver/gpio.h" #include "hal/gpio_ll.h"