cdc_acm_host_open() function
Open CDC-ACM device The driver first looks for CDC compliant descriptor, if it is not found the driver checks if the interface has 2 Bulk endpoints that can be used for data Use CDC_HOST_ANY_* macros to signal that you don't care about the device's VID and PID. In this case, first USB device will be opened. It is recommended to use this feature if only one device can ever be in the system (there is no USB HUB connected).
Arguments
vid
Device's Vendor ID, set to CDC_HOST_ANY_VID for any
pid
Device's Product ID, set to CDC_HOST_ANY_PID for any
interface_idx
Index of device's interface used for CDC-ACM communication
dev_config
Configuration structure of the device
cdc_hdl_ret
CDC device handle
Return value
- ESP_OK: Success - ESP_ERR_INVALID_STATE: The CDC driver is not installed - ESP_ERR_INVALID_ARG: dev_config or cdc_hdl_ret is NULL - ESP_ERR_NO_MEM: Not enough memory for opening the device - ESP_ERR_NOT_FOUND: USB device with specified VID/PID is not connected or does not have specified interface