diff --git a/components/hal/CMakeLists.txt b/components/hal/CMakeLists.txt index 4d92e4d841..22b41e19f2 100644 --- a/components/hal/CMakeLists.txt +++ b/components/hal/CMakeLists.txt @@ -68,7 +68,7 @@ if(NOT BOOTLOADER_BUILD) "esp32s2/touch_sensor_hal.c" "esp32s2/dac_hal.c" "esp32s2/interrupt_descriptor_table.c" - "usbh_hal.c") + "usb_dwc_hal.c") endif() if(${target} STREQUAL "esp32s3") @@ -90,7 +90,7 @@ if(NOT BOOTLOADER_BUILD) "esp32s3/interrupt_descriptor_table.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/component.mk b/components/hal/component.mk index c5c1e84abc..0b54518ffb 100644 --- a/components/hal/component.mk +++ b/components/hal/component.mk @@ -2,7 +2,7 @@ COMPONENT_SRCDIRS := . esp32 COMPONENT_ADD_INCLUDEDIRS := esp32/include include platform_port/include COMPONENT_ADD_LDFRAGMENTS += linker.lf -COMPONENT_OBJEXCLUDE += ./spi_slave_hd_hal.o ./spi_flash_hal_gpspi.o ./spi_slave_hd_hal.o ./ds_hal.o ./gdma_hal.o ./lcd_hal.o ./systimer_hal.o ./usb_hal.o ./usbh_hal.o ./usb_phy_hal.o ./xt_wdt_hal.o +COMPONENT_OBJEXCLUDE += ./spi_slave_hd_hal.o ./spi_flash_hal_gpspi.o ./spi_slave_hd_hal.o ./ds_hal.o ./gdma_hal.o ./lcd_hal.o ./systimer_hal.o ./usb_hal.o ./usb_dwc_hal.o ./usb_phy_hal.o ./xt_wdt_hal.o ifndef CONFIG_ETH_USE_ESP32_EMAC COMPONENT_OBJEXCLUDE += ./emac_hal.o 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 98% rename from components/soc/esp32s2/include/soc/usbh_struct.h rename to components/soc/esp32s2/include/soc/usb_dwc_struct.h index 1bd7a03476..5c93ed17d0 100644 --- a/components/soc/esp32s2/include/soc/usbh_struct.h +++ b/components/soc/esp32s2/include/soc/usb_dwc_struct.h @@ -1,16 +1,8 @@ -// Copyright 2015-2020 Espressif Systems (Shanghai) PTE LTD -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +/* + * SPDX-FileCopyrightText: 2015-2022 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ #pragma once diff --git a/components/soc/esp32s3/include/soc/usbh_struct.h b/components/soc/esp32s3/include/soc/usb_dwc_struct.h similarity index 98% rename from components/soc/esp32s3/include/soc/usbh_struct.h rename to components/soc/esp32s3/include/soc/usb_dwc_struct.h index bd58430598..2e6eed5106 100644 --- a/components/soc/esp32s3/include/soc/usbh_struct.h +++ b/components/soc/esp32s3/include/soc/usb_dwc_struct.h @@ -1,16 +1,8 @@ -// Copyright 2015-2020 Espressif Systems (Shanghai) PTE LTD -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +/* + * SPDX-FileCopyrightText: 2015-2022 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ #pragma once diff --git a/components/usb/CMakeLists.txt b/components/usb/CMakeLists.txt index 5bf8229d5c..89009c0ada 100644 --- a/components/usb/CMakeLists.txt +++ b/components/usb/CMakeLists.txt @@ -4,7 +4,7 @@ set(priv_include) set(priv_require) 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 ac081a8cea..52d7fbc4ce 100644 --- a/components/usb/hcd.c +++ b/components/usb/hcd_dwc.c @@ -15,7 +15,7 @@ #include "esp_timer.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"