mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
usb_host: Fix spelling errors
This commit is contained in:
parent
b891aa0443
commit
a3e4e9c772
@ -229,7 +229,7 @@ typedef struct {
|
||||
* @brief Object representing a pipe in the HCD layer
|
||||
*/
|
||||
struct pipe_obj {
|
||||
//URB queueing related
|
||||
//URB queuing related
|
||||
TAILQ_HEAD(tailhead_urb_pending, urb_s) pending_urb_tailq;
|
||||
TAILQ_HEAD(tailhead_urb_done, urb_s) done_urb_tailq;
|
||||
int num_urb_pending;
|
||||
@ -264,7 +264,7 @@ struct pipe_obj {
|
||||
struct {
|
||||
uint32_t waiting_halt: 1;
|
||||
uint32_t pipe_cmd_processing: 1;
|
||||
uint32_t has_urb: 1; //Indicates there is at least one URB either pending, inflight, or done
|
||||
uint32_t has_urb: 1; //Indicates there is at least one URB either pending, in-flight, or done
|
||||
uint32_t persist: 1; //indicates that this pipe should persist through a run-time port reset
|
||||
uint32_t reset_lock: 1; //Indicates that this pipe is undergoing a run-time reset
|
||||
uint32_t reserved27: 27;
|
||||
|
@ -319,7 +319,7 @@ esp_err_t usbh_dev_submit_ctrl_urb(usb_device_handle_t dev_hdl, urb_t *urb);
|
||||
* - A client should call this function to allocate all endpoints in an interface that the client has claimed.
|
||||
* - A client must allocate an endpoint using this function before attempting to communicate with it
|
||||
* - Once the client allocates an endpoint, the client is now owns/manages the endpoint. No other client should use or
|
||||
* deallocte the endpoint.
|
||||
* deallocate the endpoint.
|
||||
*
|
||||
* @note This function can block
|
||||
* @note Default endpoints (EP0) are owned by the USBH. For control transfers, use usbh_dev_submit_ctrl_urb() instead
|
||||
@ -489,7 +489,7 @@ esp_err_t usbh_hub_enum_fill_config_desc(usb_device_handle_t dev_hdl, const usb_
|
||||
* @note Must call in sequence
|
||||
* @param dev_hdl Device handle
|
||||
* @param str_desc Pointer to string descriptor
|
||||
* @param select Select which string descriptor. 0/1/2 for Manufacturer/Product/Serial Number string descriptors respecitvely
|
||||
* @param select Select which string descriptor. 0/1/2 for Manufacturer/Product/Serial Number string descriptors respectively
|
||||
* @return esp_err_t
|
||||
*/
|
||||
esp_err_t usbh_hub_enum_fill_str_desc(usb_device_handle_t dev_hdl, const usb_str_desc_t *str_desc, int select);
|
||||
|
@ -619,7 +619,7 @@ static void _handle_pending_ep(client_t *client_obj)
|
||||
urb_t *urb;
|
||||
usbh_ep_dequeue_urb(ep_wrap->constant.ep_hdl, &urb);
|
||||
while (urb != NULL) {
|
||||
//Clear the transfer's inflight flag to indicate the transfer is no longer inflight
|
||||
//Clear the transfer's in-flight flag to indicate the transfer is no longer in-flight
|
||||
urb->usb_host_inflight = false;
|
||||
urb->transfer.callback(&urb->transfer);
|
||||
num_urb_dequeued++;
|
||||
@ -633,7 +633,7 @@ static void _handle_pending_ep(client_t *client_obj)
|
||||
}
|
||||
HOST_ENTER_CRITICAL();
|
||||
|
||||
//Update the endpoint's number of URB's inflight
|
||||
//Update the endpoint's number of URB's in-flight
|
||||
assert(num_urb_dequeued <= ep_wrap->dynamic.num_urb_inflight);
|
||||
ep_wrap->dynamic.num_urb_inflight -= num_urb_dequeued;
|
||||
}
|
||||
@ -778,7 +778,7 @@ esp_err_t usb_host_client_handle_events(usb_host_client_handle_t client_hdl, Tic
|
||||
TAILQ_REMOVE(&client_obj->dynamic.done_ctrl_xfer_tailq, urb, tailq_entry);
|
||||
client_obj->dynamic.num_done_ctrl_xfer--;
|
||||
HOST_EXIT_CRITICAL();
|
||||
//Clear the transfer's inflight flag to indicate the transfer is no longer inflight
|
||||
//Clear the transfer's in-flight flag to indicate the transfer is no longer in-flight
|
||||
urb->usb_host_inflight = false;
|
||||
//Call the transfer's callback
|
||||
urb->transfer.callback(&urb->transfer);
|
||||
@ -1095,7 +1095,7 @@ static esp_err_t interface_release(client_t *client_obj, usb_device_handle_t dev
|
||||
bool can_free = true;
|
||||
for (int i = 0; i < intf_obj->constant.intf_desc->bNumEndpoints; i++) {
|
||||
ep_wrapper_t *ep_wrap = intf_obj->constant.endpoints[i];
|
||||
//Endpoint must not be on the pending list and must not have inflight URBs
|
||||
//Endpoint must not be on the pending list and must not have in-flight URBs
|
||||
if (ep_wrap->dynamic.num_urb_inflight != 0 || ep_wrap->dynamic.flags.pending) {
|
||||
can_free = false;
|
||||
break;
|
||||
@ -1281,7 +1281,7 @@ esp_err_t usb_host_transfer_submit(usb_transfer_t *transfer)
|
||||
}
|
||||
ep_wrap = usbh_ep_get_context(ep_hdl);
|
||||
assert(ep_wrap != NULL);
|
||||
//Check that we are not submitting a transfer already inflight
|
||||
//Check that we are not submitting a transfer already in-flight
|
||||
HOST_CHECK(!urb_obj->usb_host_inflight, ESP_ERR_NOT_FINISHED);
|
||||
urb_obj->usb_host_inflight = true;
|
||||
HOST_ENTER_CRITICAL();
|
||||
@ -1313,7 +1313,7 @@ esp_err_t usb_host_transfer_submit_control(usb_host_client_handle_t client_hdl,
|
||||
|
||||
usb_device_handle_t dev_hdl = transfer->device_handle;
|
||||
urb_t *urb_obj = __containerof(transfer, urb_t, transfer);
|
||||
//Check that we are not submitting a transfer already inflight
|
||||
//Check that we are not submitting a transfer already in-flight
|
||||
HOST_CHECK(!urb_obj->usb_host_inflight, ESP_ERR_NOT_FINISHED);
|
||||
urb_obj->usb_host_inflight = true;
|
||||
//Save client handle into URB
|
||||
|
@ -786,7 +786,7 @@ esp_err_t usbh_dev_close(usb_device_handle_t dev_hdl)
|
||||
bool call_proc_req_cb = false;
|
||||
if (dev_obj->dynamic.ref_count == 0) {
|
||||
//Sanity check.
|
||||
assert(dev_obj->dynamic.num_ctrl_xfers_inflight == 0); //There cannot be any control transfer inflight
|
||||
assert(dev_obj->dynamic.num_ctrl_xfers_inflight == 0); //There cannot be any control transfer in-flight
|
||||
assert(!dev_obj->dynamic.flags.waiting_free); //This can only be set when ref count reaches 0
|
||||
if (dev_obj->dynamic.flags.is_gone) {
|
||||
//Device is already gone so it's port is already disabled. Trigger the USBH process to free the device
|
||||
|
Loading…
Reference in New Issue
Block a user