EasyManua.ls Logo

Espressif ESP32-S2 - Page 502

Espressif ESP32-S2
1695 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Chapter 2. API Reference
[in] dev_hdl: Device handle
[out] config_desc: Configuration descriptor
esp_err_t usb_host_interface_claim(usb_host_client_handle_t client_hdl, usb_device_handle_t
dev_hdl, uint8_t bInterfaceNumber, uint8_t bAlternateSet-
ting)
Function for a client to claim a devices interface.
A client must claim a devices interface before attempting to communicate with any of its endpoints
Once an interface is claimed by a client, it cannot be claimed by any other client.
Note This function can block
Return esp_err_t
Parameters
[in] client_hdl: Client handle
[in] dev_hdl: Device handle
[in] bInterfaceNumber: Interface number
[in] bAlternateSetting: Interface alternate setting number
esp_err_t usb_host_interface_release(usb_host_client_handle_t client_hdl, usb_device_handle_t
dev_hdl, uint8_t bInterfaceNumber)
Function for a client to release a previously claimed interface.
A client should release a devices interface after it no longer needs to communicate with the interface
A client must release all of its interfaces of a device it has claimed before being able to close the device
Note This function can block
Return esp_err_t
Parameters
[in] client_hdl: Client handle
[in] dev_hdl: Device handle
[in] bInterfaceNumber: Interface number
esp_err_t usb_host_endpoint_halt(usb_device_handle_t dev_hdl, uint8_t bEndpointAddress)
Halt a particular endpoint.
The device must have been opened by a client
The endpoint must be part of an interface claimed by a client
Once halted, the endpoint must be cleared using usb_host_endpoint_clear() before it can communicate
again
Note This function can block
Return esp_err_t
Parameters
dev_hdl: Device handle
bEndpointAddress: Endpoint address
esp_err_t usb_host_endpoint_flush
(
usb_device_handle_t dev_hdl
, uint8_t
bEndpointAddress
)
Flush a particular endpoint.
The device must have been opened by a client
The endpoint must be part of an interface claimed by a client
The endpoint must have been halted (either through a transfer error, or usb_host_endpoint_halt())
Flushing an endpoint will caused an queued up transfers to be canceled
Note This function can block
Return esp_err_t
Parameters
dev_hdl: Device handle
bEndpointAddress: Endpoint address
esp_err_t usb_host_endpoint_clear(usb_device_handle_t dev_hdl, uint8_t bEndpointAddress)
Clear a halt on a particular endpoint.
The device must have been opened by a client
Espressif Systems 491
Submit Document Feedback
Release v4.4

Table of Contents