mirror of
https://github.com/espressif/esp-idf.git
synced 2025-09-30 19:19:21 +00:00
refactor(usb/hcd): Allow port resets with allocated pipes
This commit updates the HCD API to allow port resets to occur even if pipes are allocated. The pipes cannot be active and the port reset will simply restore the pipes (by reinitializing their channel registers) following the reset. Changes: - Allow port resets while channels are allocated - Remove pipe persistance API 'hcd_pipe_set_persist_reset()'
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2015-2022 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2015-2024 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@@ -434,20 +434,6 @@ esp_err_t hcd_pipe_update_dev_addr(hcd_pipe_handle_t pipe_hdl, uint8_t dev_addr)
|
||||
*/
|
||||
esp_err_t hcd_pipe_update_callback(hcd_pipe_handle_t pipe_hdl, hcd_pipe_callback_t callback, void *user_arg);
|
||||
|
||||
/**
|
||||
* @brief Make a pipe persist through a run time reset
|
||||
*
|
||||
* Normally when a HCD_PORT_CMD_RESET is called, all pipes should already have been freed. However There may be cases
|
||||
* (such as during enumeration) when a pipe must persist through a reset. This function will mark a pipe as
|
||||
* persistent allowing it to survive a reset. When HCD_PORT_CMD_RESET is called, the pipe can continue to be used after
|
||||
* the reset.
|
||||
*
|
||||
* @param pipe_hdl Pipe handle
|
||||
* @retval ESP_OK: Pipe successfully marked as persistent
|
||||
* @retval ESP_ERR_INVALID_STATE: Pipe is not in a condition to be made persistent
|
||||
*/
|
||||
esp_err_t hcd_pipe_set_persist_reset(hcd_pipe_handle_t pipe_hdl);
|
||||
|
||||
/**
|
||||
* @brief Get the context variable of a pipe from its handle
|
||||
*
|
||||
|
Reference in New Issue
Block a user