Merge branch 'refactor/usb_host_add_hcd_mps_request' into 'master'

refactor(hcd_dwc): Added mps request from hcd_dwc

See merge request espressif/esp-idf!29904
This commit is contained in:
Roman Leonov 2024-04-02 20:49:29 +08:00
commit fc326374e0
2 changed files with 20 additions and 1 deletions

View File

@ -1957,6 +1957,16 @@ err:
return ret;
}
int hcd_pipe_get_mps(hcd_pipe_handle_t pipe_hdl)
{
pipe_t *pipe = (pipe_t *)pipe_hdl;
int mps;
HCD_ENTER_CRITICAL();
mps = pipe->ep_char.mps;
HCD_EXIT_CRITICAL();
return mps;
}
esp_err_t hcd_pipe_free(hcd_pipe_handle_t pipe_hdl)
{
pipe_t *pipe = (pipe_t *)pipe_hdl;

View File

@ -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
*/
@ -361,6 +361,15 @@ esp_err_t hcd_port_set_fifo_bias(hcd_port_handle_t port_hdl, hcd_port_fifo_bias_
*/
esp_err_t hcd_pipe_alloc(hcd_port_handle_t port_hdl, const hcd_pipe_config_t *pipe_config, hcd_pipe_handle_t *pipe_hdl);
/**
* @brief Get maximum packet size (mps) of HCD pipe
*
* @param[in] port_hdl Pipe handle
*
* @retval HCD pipe mps
*/
int hcd_pipe_get_mps(hcd_pipe_handle_t pipe_hdl);
/**
* @brief Free a pipe
*