From da91dbccfac00776611269a0e5f6ea1d54c8e286 Mon Sep 17 00:00:00 2001 From: Darian Leung Date: Thu, 15 Sep 2022 20:43:18 +0800 Subject: [PATCH] usb_host: Rename struct/ll/hal files to use "usb_dwc" prefix This commit updates the DWC_OTG based struct/ll/hal file names to use the prefix "usb_dwc". This naming scheme reduces ambiguity if another USB controller implementation is added. As a result, "hcd.c" has been renamed to "hcd_dwc.c" --- components/hal/CMakeLists.txt | 4 ++-- components/hal/include/hal/{usbh_hal.h => usb_dwc_hal.h} | 4 ++-- components/hal/include/hal/{usbh_ll.h => usb_dwc_ll.h} | 2 +- components/hal/{usbh_hal.c => usb_dwc_hal.c} | 4 ++-- .../esp32s2/include/soc/{usbh_struct.h => usb_dwc_struct.h} | 0 .../esp32s3/include/soc/{usbh_struct.h => usb_dwc_struct.h} | 0 components/usb/CMakeLists.txt | 2 +- components/usb/{hcd.c => hcd_dwc.c} | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) rename components/hal/include/hal/{usbh_hal.h => usb_dwc_hal.h} (99%) rename components/hal/include/hal/{usbh_ll.h => usb_dwc_ll.h} (99%) rename components/hal/{usbh_hal.c => usb_dwc_hal.c} (99%) rename components/soc/esp32s2/include/soc/{usbh_struct.h => usb_dwc_struct.h} (100%) rename components/soc/esp32s3/include/soc/{usbh_struct.h => usb_dwc_struct.h} (100%) rename components/usb/{hcd.c => hcd_dwc.c} (99%) diff --git a/components/hal/CMakeLists.txt b/components/hal/CMakeLists.txt index 0c21243325..238899b250 100644 --- a/components/hal/CMakeLists.txt +++ b/components/hal/CMakeLists.txt @@ -119,7 +119,7 @@ if(NOT BOOTLOADER_BUILD) "esp32s2/cp_dma_hal.c" "esp32s2/touch_sensor_hal.c" "esp32s2/dac_hal.c" - "usbh_hal.c") + "usb_dwc_hal.c") endif() if(${target} STREQUAL "esp32s3") @@ -136,7 +136,7 @@ if(NOT BOOTLOADER_BUILD) "esp32s3/hmac_hal.c" "esp32s3/touch_sensor_hal.c" "esp32s3/rtc_cntl_hal.c" - "usbh_hal.c") + "usb_dwc_hal.c") endif() if(${target} STREQUAL "esp32c3") diff --git a/components/hal/include/hal/usbh_hal.h b/components/hal/include/hal/usb_dwc_hal.h similarity index 99% rename from components/hal/include/hal/usbh_hal.h rename to components/hal/include/hal/usb_dwc_hal.h index 5326deb2dc..6fd2123a84 100644 --- a/components/hal/include/hal/usbh_hal.h +++ b/components/hal/include/hal/usb_dwc_hal.h @@ -17,8 +17,8 @@ NOTE: Thread safety is the responsibility fo the HAL user. All USB Host HAL #include #include -#include "soc/usbh_struct.h" -#include "hal/usbh_ll.h" +#include "soc/usb_dwc_struct.h" +#include "hal/usb_dwc_ll.h" #include "hal/usb_types_private.h" #include "hal/assert.h" diff --git a/components/hal/include/hal/usbh_ll.h b/components/hal/include/hal/usb_dwc_ll.h similarity index 99% rename from components/hal/include/hal/usbh_ll.h rename to components/hal/include/hal/usb_dwc_ll.h index 4320ead0a3..47d03868bb 100644 --- a/components/hal/include/hal/usbh_ll.h +++ b/components/hal/include/hal/usb_dwc_ll.h @@ -12,7 +12,7 @@ extern "C" { #include #include -#include "soc/usbh_struct.h" +#include "soc/usb_dwc_struct.h" #include "hal/usb_types_private.h" #include "hal/misc.h" diff --git a/components/hal/usbh_hal.c b/components/hal/usb_dwc_hal.c similarity index 99% rename from components/hal/usbh_hal.c rename to components/hal/usb_dwc_hal.c index b4a10ca5c5..47c0f6fee6 100644 --- a/components/hal/usbh_hal.c +++ b/components/hal/usb_dwc_hal.c @@ -8,8 +8,8 @@ #include #include #include "sdkconfig.h" -#include "hal/usbh_hal.h" -#include "hal/usbh_ll.h" +#include "hal/usb_dwc_hal.h" +#include "hal/usb_dwc_ll.h" #include "hal/assert.h" // ------------------------------------------------ Macros and Types --------------------------------------------------- diff --git a/components/soc/esp32s2/include/soc/usbh_struct.h b/components/soc/esp32s2/include/soc/usb_dwc_struct.h similarity index 100% rename from components/soc/esp32s2/include/soc/usbh_struct.h rename to components/soc/esp32s2/include/soc/usb_dwc_struct.h diff --git a/components/soc/esp32s3/include/soc/usbh_struct.h b/components/soc/esp32s3/include/soc/usb_dwc_struct.h similarity index 100% rename from components/soc/esp32s3/include/soc/usbh_struct.h rename to components/soc/esp32s3/include/soc/usb_dwc_struct.h diff --git a/components/usb/CMakeLists.txt b/components/usb/CMakeLists.txt index 35f5d24277..5ff63af4d7 100644 --- a/components/usb/CMakeLists.txt +++ b/components/usb/CMakeLists.txt @@ -7,7 +7,7 @@ set(priv_include) set(priv_require driver) # usb_phy driver relies on gpio driver API if(CONFIG_USB_OTG_SUPPORTED) - list(APPEND srcs "hcd.c" + list(APPEND srcs "hcd_dwc.c" "hub.c" "usb_helpers.c" "usb_host.c" diff --git a/components/usb/hcd.c b/components/usb/hcd_dwc.c similarity index 99% rename from components/usb/hcd.c rename to components/usb/hcd_dwc.c index 59828b27f8..0cea6859cf 100644 --- a/components/usb/hcd.c +++ b/components/usb/hcd_dwc.c @@ -14,7 +14,7 @@ #include "esp_intr_alloc.h" #include "esp_err.h" #include "esp_rom_gpio.h" -#include "hal/usbh_hal.h" +#include "hal/usb_dwc_hal.h" #include "hal/usb_types_private.h" #include "soc/gpio_pins.h" #include "soc/gpio_sig_map.h"