From d0f27448adf377c526fb9016b30edb7b00d91735 Mon Sep 17 00:00:00 2001 From: Roman Leonov Date: Mon, 10 Feb 2025 12:36:53 +0100 Subject: [PATCH] refactor(usb_host): Made phy and hcd common fix --- .../usb/test_apps/common/CMakeLists.txt | 6 ++- .../usb/test_apps/common/Kconfig.common | 26 ++++++++++ .../test_hcd_common.c => common/hcd_common.c} | 50 ++----------------- .../test_hcd_common.h => common/hcd_common.h} | 2 +- .../phy_common.c} | 10 ++-- components/usb/test_apps/common/phy_common.h | 15 ++++++ .../usb/test_apps/hcd/main/CMakeLists.txt | 2 +- .../usb/test_apps/hcd/main/Kconfig.projbuild | 27 +--------- .../usb/test_apps/hcd/main/test_app_main.c | 4 +- .../usb/test_apps/hcd/main/test_hcd_bulk.c | 4 +- .../usb/test_apps/hcd/main/test_hcd_ctrl.c | 4 +- .../usb/test_apps/hcd/main/test_hcd_intr.c | 2 +- .../usb/test_apps/hcd/main/test_hcd_isoc.c | 4 +- .../usb/test_apps/hcd/main/test_hcd_port.c | 4 +- components/usb/test_apps/hcd/sdkconfig.ci | 4 +- .../test_apps/usb_host/main/Kconfig.projbuild | 26 +--------- .../test_apps/usb_host/main/test_app_main.c | 8 +-- .../usb_host/main/test_usb_host_common.h | 15 ------ .../usb/test_apps/usb_host/sdkconfig.ci | 4 +- 19 files changed, 79 insertions(+), 138 deletions(-) create mode 100644 components/usb/test_apps/common/Kconfig.common rename components/usb/test_apps/{hcd/main/test_hcd_common.c => common/hcd_common.c} (88%) rename components/usb/test_apps/{hcd/main/test_hcd_common.h => common/hcd_common.h} (98%) rename components/usb/test_apps/{usb_host/main/test_usb_host_common.c => common/phy_common.c} (89%) create mode 100644 components/usb/test_apps/common/phy_common.h delete mode 100644 components/usb/test_apps/usb_host/main/test_usb_host_common.h diff --git a/components/usb/test_apps/common/CMakeLists.txt b/components/usb/test_apps/common/CMakeLists.txt index f3878315eb..119ca4572d 100644 --- a/components/usb/test_apps/common/CMakeLists.txt +++ b/components/usb/test_apps/common/CMakeLists.txt @@ -2,5 +2,9 @@ idf_component_register(SRCS "dev_hid.c" "dev_isoc.c" "dev_msc.c" "mock_msc.c" - INCLUDE_DIRS "." + "phy_common.c" + "hcd_common.c" + INCLUDE_DIRS + "../../private_include" # hcd and urb + "." REQUIRES usb unity) diff --git a/components/usb/test_apps/common/Kconfig.common b/components/usb/test_apps/common/Kconfig.common new file mode 100644 index 0000000000..7ba29108a2 --- /dev/null +++ b/components/usb/test_apps/common/Kconfig.common @@ -0,0 +1,26 @@ +menu "USB PHY Test" + depends on IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32S3 + + orsource "$IDF_PATH/examples/common_components/env_caps/$IDF_TARGET/Kconfig.env_caps" + + config USB_PHY_TEST_OTG_DRVVBUS_ENABLE + bool "Enable driving VBUS by an internal DRVVBUS signal" + default n + help + USB-OTG peripheral features a DRVVBUS signal, which controls the VBUS voltage. The DRVVBUS signal can be + either internally connected to a PHY (if a PHY supports it), in such a case the PHY would be controlling + the VBUS voltage by itself. Or the DRVVBUS can be handled by an external logic (a transistor switch). + Our PHY does not support the DRVVBUS signal, thus we must use an external logic to control the VBUS + voltage. The DRVVBUS signal is controlled via HCD_PORT_CMD_POWER_OFF and HCD_PORT_CMD_POWER_ON + + config USB_PHY_TEST_OTG_DRVVBUS_GPIO + depends on USB_PHY_TEST_OTG_DRVVBUS_ENABLE + int "Connect a GPIO to the internal DRVVBUS signal" + range ENV_GPIO_RANGE_MIN ENV_GPIO_OUT_RANGE_MAX + default 1 + help + GPIO number, that will be internally connected to the DRVVBUS signal. + USB Host CI target runners feature an external power switch controlled by this GPIO, to control the VBUS + voltage of USB devices during test. + +endmenu diff --git a/components/usb/test_apps/hcd/main/test_hcd_common.c b/components/usb/test_apps/common/hcd_common.c similarity index 88% rename from components/usb/test_apps/hcd/main/test_hcd_common.c rename to components/usb/test_apps/common/hcd_common.c index 77d5366277..df4eca45ec 100644 --- a/components/usb/test_apps/hcd/main/test_hcd_common.c +++ b/components/usb/test_apps/common/hcd_common.c @@ -14,12 +14,12 @@ #include "esp_err.h" #include "esp_attr.h" #include "esp_rom_gpio.h" -#include "hcd.h" #include "usb_private.h" #include "usb/usb_types_ch9.h" #include "esp_private/usb_phy.h" -#include "test_hcd_common.h" +#include "hcd_common.h" #include "mock_msc.h" +#include "phy_common.h" #include "unity.h" #include "sdkconfig.h" @@ -28,11 +28,6 @@ #define ENUM_ADDR 1 // Device address to use for tests that enumerate the device #define ENUM_CONFIG 1 // Device configuration number to use for tests that enumerate the device -#ifdef CONFIG_USB_HCD_TEST_OTG_DRVVBUS_ENABLE -#define OTG_DRVVBUS_ENABLE -#define OTG_DRVVBUS_GPIO CONFIG_USB_HCD_TEST_OTG_DRVVBUS_GPIO -#endif - typedef struct { hcd_port_handle_t port_hdl; hcd_port_event_t port_event; @@ -44,7 +39,6 @@ typedef struct { } pipe_event_msg_t; hcd_port_handle_t port_hdl = NULL; -static usb_phy_handle_t phy_hdl = NULL; // ---------------------------------------------------- Private -------------------------------------------------------- @@ -151,43 +145,8 @@ int test_hcd_get_num_pipe_events(hcd_pipe_handle_t pipe_hdl) hcd_port_handle_t test_hcd_setup(void) { - // Deinitialize PHY from previous failed test - if (phy_hdl != NULL) { - TEST_ASSERT_EQUAL_MESSAGE(ESP_OK, usb_del_phy(phy_hdl), "Failed to delete PHY"); - phy_hdl = NULL; - } - // Initialize the internal USB PHY to connect to the USB OTG peripheral - usb_phy_config_t phy_config = { - .controller = USB_PHY_CTRL_OTG, -#if CONFIG_IDF_TARGET_ESP32P4 // ESP32-P4 has 2 USB-DWC peripherals, each with its dedicated PHY. We support HS+UTMI only ATM. - .target = USB_PHY_TARGET_UTMI, -#else - .target = USB_PHY_TARGET_INT, -#endif - .otg_mode = USB_OTG_MODE_HOST, - .otg_speed = USB_PHY_SPEED_UNDEFINED, // In Host mode, the speed is determined by the connected device - .ext_io_conf = NULL, - .otg_io_conf = NULL, - }; + test_setup_usb_phy(); -#ifdef OTG_DRVVBUS_ENABLE - const usb_phy_otg_io_conf_t otg_io_conf = { - .iddig_io_num = -1, - .avalid_io_num = -1, - .vbusvalid_io_num = -1, - .idpullup_io_num = -1, - .dppulldown_io_num = -1, - .dmpulldown_io_num = -1, - .drvvbus_io_num = OTG_DRVVBUS_GPIO, - .bvalid_io_num = -1, - .sessend_io_num = -1, - .chrgvbus_io_num = -1, - .dischrgvbus_io_num = -1 - }; - phy_config.otg_io_conf = &otg_io_conf; -#endif // OTG_DRVVBUS_ENABLE - - TEST_ASSERT_EQUAL_MESSAGE(ESP_OK, usb_new_phy(&phy_config, &phy_hdl), "Failed to init USB PHY"); // Create a queue for port callback to queue up port events QueueHandle_t port_evt_queue = xQueueCreate(EVENT_QUEUE_LEN, sizeof(port_event_msg_t)); TEST_ASSERT_NOT_NULL(port_evt_queue); @@ -223,8 +182,7 @@ void test_hcd_teardown(hcd_port_handle_t port_hdl) TEST_ASSERT_EQUAL(ESP_OK, hcd_uninstall()); vQueueDelete(port_evt_queue); // Deinitialize the internal USB PHY - TEST_ASSERT_EQUAL_MESSAGE(ESP_OK, usb_del_phy(phy_hdl), "Failed to delete PHY"); - phy_hdl = NULL; + test_delete_usb_phy(); } usb_speed_t test_hcd_wait_for_conn(hcd_port_handle_t port_hdl) diff --git a/components/usb/test_apps/hcd/main/test_hcd_common.h b/components/usb/test_apps/common/hcd_common.h similarity index 98% rename from components/usb/test_apps/hcd/main/test_hcd_common.h rename to components/usb/test_apps/common/hcd_common.h index 0ca5800846..ad8319c665 100644 --- a/components/usb/test_apps/hcd/main/test_hcd_common.h +++ b/components/usb/test_apps/common/hcd_common.h @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2015-2024 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ diff --git a/components/usb/test_apps/usb_host/main/test_usb_host_common.c b/components/usb/test_apps/common/phy_common.c similarity index 89% rename from components/usb/test_apps/usb_host/main/test_usb_host_common.c rename to components/usb/test_apps/common/phy_common.c index 854e23d3f7..acd78b4e30 100644 --- a/components/usb/test_apps/usb_host/main/test_usb_host_common.c +++ b/components/usb/test_apps/common/phy_common.c @@ -9,18 +9,18 @@ #include "esp_err.h" #include "usb/usb_types_ch9.h" #include "esp_private/usb_phy.h" -#include "test_usb_host_common.h" +#include "phy_common.h" #include "unity.h" #include "sdkconfig.h" -#ifdef CONFIG_USB_HOST_TEST_OTG_DRVVBUS_ENABLE +#ifdef CONFIG_USB_PHY_TEST_OTG_DRVVBUS_ENABLE #define OTG_DRVVBUS_ENABLE -#define OTG_DRVVBUS_GPIO CONFIG_USB_HOST_TEST_OTG_DRVVBUS_GPIO +#define OTG_DRVVBUS_GPIO CONFIG_USB_PHY_TEST_OTG_DRVVBUS_GPIO #endif static usb_phy_handle_t phy_hdl = NULL; -void test_usb_host_setup_phy(void) +void test_setup_usb_phy(void) { // Deinitialize PHY from previous failed test if (phy_hdl != NULL) { @@ -62,7 +62,7 @@ void test_usb_host_setup_phy(void) TEST_ASSERT_EQUAL_MESSAGE(ESP_OK, usb_new_phy(&phy_config, &phy_hdl), "Failed to init USB PHY"); } -void test_usb_host_delete_phy(void) +void test_delete_usb_phy(void) { TEST_ASSERT_EQUAL_MESSAGE(ESP_OK, usb_del_phy(phy_hdl), "Failed to delete PHY"); phy_hdl = NULL; diff --git a/components/usb/test_apps/common/phy_common.h b/components/usb/test_apps/common/phy_common.h new file mode 100644 index 0000000000..7cb109112e --- /dev/null +++ b/components/usb/test_apps/common/phy_common.h @@ -0,0 +1,15 @@ +/* + * SPDX-FileCopyrightText: 2024-2025 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ + +/** + * @brief Install USB PHY separately from the usb_host_install() + */ +void test_setup_usb_phy(void); + +/** + * @brief Uninstall PHY + */ +void test_delete_usb_phy(void); diff --git a/components/usb/test_apps/hcd/main/CMakeLists.txt b/components/usb/test_apps/hcd/main/CMakeLists.txt index f1e96c7c31..8637552e90 100644 --- a/components/usb/test_apps/hcd/main/CMakeLists.txt +++ b/components/usb/test_apps/hcd/main/CMakeLists.txt @@ -1,6 +1,6 @@ # In order for the cases defined by `TEST_CASE` to be linked into the final elf, # the component can be registered as WHOLE_ARCHIVE idf_component_register(SRC_DIRS "." - PRIV_INCLUDE_DIRS "../../../private_include" "." + PRIV_INCLUDE_DIRS "." REQUIRES usb unity common esp_mm WHOLE_ARCHIVE) diff --git a/components/usb/test_apps/hcd/main/Kconfig.projbuild b/components/usb/test_apps/hcd/main/Kconfig.projbuild index c8517efc32..4ca48955cd 100644 --- a/components/usb/test_apps/hcd/main/Kconfig.projbuild +++ b/components/usb/test_apps/hcd/main/Kconfig.projbuild @@ -1,26 +1 @@ -menu "USB HCD Test" - - orsource "$IDF_PATH/examples/common_components/env_caps/$IDF_TARGET/Kconfig.env_caps" - - config USB_HCD_TEST_OTG_DRVVBUS_ENABLE - depends on IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32S3 - bool "Enable driving VBUS by an internal DRVVBUS signal from USB-OTG peripheral" - default n - help - USB-OTG peripheral features a DRVVBUS signal, which controls the VBUS voltage. The DRVVBUS signal can be - either internally connected to a PHY (if a PHY supports it), in such a case the PHY would be controlling - the VBUS voltage by itself. Or the DRVVBUS can be handled by an external logic (a transistor switch). - Our PHY does not support the DRVVBUS signal, thus we must use an external logic to control the VBUS - voltage. The DRVVBUS signal is controlled via HCD_PORT_CMD_POWER_OFF and HCD_PORT_CMD_POWER_ON - - config USB_HCD_TEST_OTG_DRVVBUS_GPIO - depends on USB_HCD_TEST_OTG_DRVVBUS_ENABLE - int "Connect a GPIO to the internal DRVVBUS signal" - range ENV_GPIO_RANGE_MIN ENV_GPIO_OUT_RANGE_MAX - default 1 - help - GPIO number, that will be internally connected to the DRVVBUS signal. - USB Host CI target runners feature an external power switch controlled by this GPIO, to control the VBUS - voltage of USB devices during test. - -endmenu +source "$IDF_PATH/components/usb/test_apps/common/Kconfig.common" diff --git a/components/usb/test_apps/hcd/main/test_app_main.c b/components/usb/test_apps/hcd/main/test_app_main.c index 9137bfe469..39be6f19dc 100644 --- a/components/usb/test_apps/hcd/main/test_app_main.c +++ b/components/usb/test_apps/hcd/main/test_app_main.c @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: CC0-1.0 */ @@ -11,7 +11,7 @@ #include "freertos/task.h" #include "dev_msc.h" #include "dev_hid.h" -#include "test_hcd_common.h" +#include "hcd_common.h" void setUp(void) { diff --git a/components/usb/test_apps/hcd/main/test_hcd_bulk.c b/components/usb/test_apps/hcd/main/test_hcd_bulk.c index 8edcdd95ae..4d81750cd1 100644 --- a/components/usb/test_apps/hcd/main/test_hcd_bulk.c +++ b/components/usb/test_apps/hcd/main/test_hcd_bulk.c @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2015-2024 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2015-2025 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ @@ -11,7 +11,7 @@ #include "unity.h" #include "mock_msc.h" #include "dev_msc.h" -#include "test_hcd_common.h" +#include "hcd_common.h" // --------------------------------------------------- Test Cases ------------------------------------------------------ diff --git a/components/usb/test_apps/hcd/main/test_hcd_ctrl.c b/components/usb/test_apps/hcd/main/test_hcd_ctrl.c index 6d951d0628..a885b9d915 100644 --- a/components/usb/test_apps/hcd/main/test_hcd_ctrl.c +++ b/components/usb/test_apps/hcd/main/test_hcd_ctrl.c @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2021-2024 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2021-2025 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ @@ -8,7 +8,7 @@ #include "freertos/FreeRTOS.h" #include "freertos/semphr.h" #include "unity.h" -#include "test_hcd_common.h" +#include "hcd_common.h" #define TEST_DEV_ADDR 0 #define NUM_URBS 3 diff --git a/components/usb/test_apps/hcd/main/test_hcd_intr.c b/components/usb/test_apps/hcd/main/test_hcd_intr.c index 726e0d563a..a5f3aa6fe5 100644 --- a/components/usb/test_apps/hcd/main/test_hcd_intr.c +++ b/components/usb/test_apps/hcd/main/test_hcd_intr.c @@ -9,7 +9,7 @@ #include "freertos/semphr.h" #include "unity.h" #include "dev_hid.h" -#include "test_hcd_common.h" +#include "hcd_common.h" // --------------------------------------------------- Test Cases ------------------------------------------------------ diff --git a/components/usb/test_apps/hcd/main/test_hcd_isoc.c b/components/usb/test_apps/hcd/main/test_hcd_isoc.c index 2f5f837af4..4ce83469d1 100644 --- a/components/usb/test_apps/hcd/main/test_hcd_isoc.c +++ b/components/usb/test_apps/hcd/main/test_hcd_isoc.c @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2015-2024 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2015-2025 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ @@ -12,7 +12,7 @@ #include "unity.h" #include "dev_isoc.h" #include "usb/usb_types_ch9.h" -#include "test_hcd_common.h" +#include "hcd_common.h" #define NUM_URBS 3 #define NUM_PACKETS_PER_URB 3 diff --git a/components/usb/test_apps/hcd/main/test_hcd_port.c b/components/usb/test_apps/hcd/main/test_hcd_port.c index fe77f85604..eafa712e48 100644 --- a/components/usb/test_apps/hcd/main/test_hcd_port.c +++ b/components/usb/test_apps/hcd/main/test_hcd_port.c @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2015-2024 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2015-2025 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ @@ -9,7 +9,7 @@ #include "freertos/semphr.h" #include "unity.h" #include "esp_rom_sys.h" -#include "test_hcd_common.h" +#include "hcd_common.h" #define TEST_DEV_ADDR 0 #define NUM_URBS 3 diff --git a/components/usb/test_apps/hcd/sdkconfig.ci b/components/usb/test_apps/hcd/sdkconfig.ci index e71059485e..e7a71bd1b1 100644 --- a/components/usb/test_apps/hcd/sdkconfig.ci +++ b/components/usb/test_apps/hcd/sdkconfig.ci @@ -1,5 +1,5 @@ # Use external power switch to control USB device's power # switch is controlled by GPIO 21 -CONFIG_USB_HCD_TEST_OTG_DRVVBUS_ENABLE=y -CONFIG_USB_HCD_TEST_OTG_DRVVBUS_GPIO=21 +CONFIG_USB_PHY_TEST_OTG_DRVVBUS_ENABLE=y +CONFIG_USB_PHY_TEST_OTG_DRVVBUS_GPIO=21 diff --git a/components/usb/test_apps/usb_host/main/Kconfig.projbuild b/components/usb/test_apps/usb_host/main/Kconfig.projbuild index 5fb07e5e22..6e19a28884 100644 --- a/components/usb/test_apps/usb_host/main/Kconfig.projbuild +++ b/components/usb/test_apps/usb_host/main/Kconfig.projbuild @@ -1,7 +1,6 @@ +source "$IDF_PATH/components/usb/test_apps/common/Kconfig.common" + menu "USB Host Library Test" - - orsource "$IDF_PATH/examples/common_components/env_caps/$IDF_TARGET/Kconfig.env_caps" - config USB_HOST_TEST_CHECK_MANU_STR bool "Check manufacturer string descriptor" default y @@ -23,25 +22,4 @@ menu "USB Host Library Test" USB Host tests that check string descriptors will check the serial string descriptor of the connected device. - config USB_HOST_TEST_OTG_DRVVBUS_ENABLE - depends on IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32S3 - bool "Enable driving VBUS by an internal DRVVBUS signal from USB-OTG peripheral" - default n - help - USB-OTG peripheral features a DRVVBUS signal, which controls the VBUS voltage. The DRVVBUS signal can be - either internally connected to a PHY (if a PHY supports it), in such a case the PHY would be controlling - the VBUS voltage by itself. Or the DRVVBUS can be handled by an external logic (a transistor switch). - Our PHY does not support the DRVVBUS signal, thus we must use an external logic to control the VBUS - voltage. The DRVVBUS signal is controlled via HCD_PORT_CMD_POWER_OFF and HCD_PORT_CMD_POWER_ON - - config USB_HOST_TEST_OTG_DRVVBUS_GPIO - depends on USB_HOST_TEST_OTG_DRVVBUS_ENABLE - int "Connect a GPIO to the internal DRVVBUS signal" - range ENV_GPIO_RANGE_MIN ENV_GPIO_OUT_RANGE_MAX - default 1 - help - GPIO number, that will be internally connected to the DRVVBUS signal. - USB Host CI target runners feature an external power switch controlled by this GPIO, to control the VBUS - voltage of USB devices during test. - endmenu diff --git a/components/usb/test_apps/usb_host/main/test_app_main.c b/components/usb/test_apps/usb_host/main/test_app_main.c index 6fd91e8a57..517b76abb0 100644 --- a/components/usb/test_apps/usb_host/main/test_app_main.c +++ b/components/usb/test_apps/usb_host/main/test_app_main.c @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: CC0-1.0 */ @@ -10,7 +10,7 @@ #include "freertos/FreeRTOS.h" #include "freertos/task.h" #include "dev_msc.h" -#include "test_usb_host_common.h" +#include "phy_common.h" #include "usb/usb_host.h" void setUp(void) @@ -18,7 +18,7 @@ void setUp(void) unity_utils_record_free_mem(); dev_msc_init(); // Install PHY separately - test_usb_host_setup_phy(); + test_setup_usb_phy(); // Install USB Host usb_host_config_t host_config = { .skip_phy_setup = true, @@ -36,7 +36,7 @@ void tearDown(void) // Clean up USB Host printf("USB Host uninstall\n"); ESP_ERROR_CHECK(usb_host_uninstall()); - test_usb_host_delete_phy(); + test_delete_usb_phy(); // Short delay to allow task to be cleaned up after client uninstall vTaskDelay(10); unity_utils_evaluate_leaks(); diff --git a/components/usb/test_apps/usb_host/main/test_usb_host_common.h b/components/usb/test_apps/usb_host/main/test_usb_host_common.h deleted file mode 100644 index eaf15f998f..0000000000 --- a/components/usb/test_apps/usb_host/main/test_usb_host_common.h +++ /dev/null @@ -1,15 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD - * - * SPDX-License-Identifier: Apache-2.0 - */ - -/** - * @brief Install PHY separately from the usb_host_install() - */ -void test_usb_host_setup_phy(void); - -/** - * @brief Uninstall PHY - */ -void test_usb_host_delete_phy(void); diff --git a/components/usb/test_apps/usb_host/sdkconfig.ci b/components/usb/test_apps/usb_host/sdkconfig.ci index 65657e9bd7..e7a71bd1b1 100644 --- a/components/usb/test_apps/usb_host/sdkconfig.ci +++ b/components/usb/test_apps/usb_host/sdkconfig.ci @@ -1,5 +1,5 @@ # Use external power switch to control USB device's power # switch is controlled by GPIO 21 -CONFIG_USB_HOST_TEST_OTG_DRVVBUS_ENABLE=y -CONFIG_USB_HOST_TEST_OTG_DRVVBUS_GPIO=21 +CONFIG_USB_PHY_TEST_OTG_DRVVBUS_ENABLE=y +CONFIG_USB_PHY_TEST_OTG_DRVVBUS_GPIO=21