Chapter 2. API Reference
Structures
struct usb_host_client_event_msg_t
Client event message.
Client event messages are sent to each client of the USB Host Library in order to notify them of various USB
Host Library events such as:
• Addition of new devices
• Removal of existing devices
Note The event message structure has a union with members corresponding to each particular event. Based
on the event type, only the relevant member field should be accessed.
Public Members
usb_host_client_event_t
Type of event
uint8_t address
New device's address
usb_device_handle_t
The handle of the device that was gone
struct usb_host_config_t
USB Host Library configuration.
Configuration structure of the USB Host Library. Provided in the usb_host_install() function
Public Members
int intr_flags
Interrupt flags for the underlying ISR used by the USB Host stack
struct usb_host_client_config_t
USB Host Library Client configuration.
Configuration structure for a USB Host Library client. Provided in usb_host_client_register()
Public Members
bool is_synchronous
Whether the client is asynchronous or synchronous or not. Set to false for now.
int max_num_event_msg
Maximum number of event messages that can be stored (e.g., 3)
usb_host_client_event_cb_t
Client's event callback function
void *callback_arg
Event callback function argument
Macros
USB_HOST_LIB_EVENT_FLAGS_NO_CLIENTS
All clients have been deregistered from the USB Host Library
USB_HOST_LIB_EVENT_FLAGS_ALL_FREE
The USB Host Library has freed all devices
Espressif Systems
event
dev_hdl
client_event_callback
Submit Document Feedback
493
Release v4.4
Need help?
Do you have a question about the ESP32-S2 and is the answer not in the manual?
Questions and answers