refactor(usb/phy): Start using values from usb_dwc_info in PHY driver

Add tests for PHY sanity checks
This commit is contained in:
Tomas Rezucha
2025-01-03 18:51:08 +01:00
parent b78bcaea36
commit f93e1bc43b
10 changed files with 280 additions and 26 deletions

View File

@@ -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
*/
@@ -109,10 +109,11 @@ typedef struct phy_context_t *usb_phy_handle_t; /**< USB PHY context handle *
* @param[out] handle_ret USB PHY context handle
*
* @return
* - ESP_OK Success
* - ESP_FAIL USB PHY init error.
* - ESP_ERR_INVALID_STATE USB PHY not installed.
* - ESP_ERR_NO_MEM USB_OTG installation failed due to no mem.
* - ESP_OK Success
* - ESP_ERR_INVALID_STATE USB PHY already initialized.
* - ESP_ERR_NO_MEM USB_OTG Installation failed due to no mem.
* - ESP_ERR_NOT_SUPPORTED Selected PHY is not supported on this target.
* - ESP_ERR_INVALID_ARG Invalid input argument.
*/
esp_err_t usb_new_phy(const usb_phy_config_t *config, usb_phy_handle_t *handle_ret);