You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: host/class/cdc/usb_host_cdc_acm/README.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -43,6 +43,8 @@ The following steps outline the typical API call pattern of the CDC-ACM Class Dr
43
43
6. An opened device can be closed via `cdc_acm_host_close()`
44
44
7. The CDC-ACM driver can be uninstalled via `cdc_acm_host_uninstall()`
45
45
46
+
Use `CDC_HOST_ANY_*` macros to signal to `cdc_acm_host_open()` function 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).
47
+
46
48
## Examples
47
49
48
50
- For an example with a CDC-ACM device, refer to [cdc_acm_host](https://github.com/espressif/esp-idf/tree/master/examples/peripherals/usb/host/cdc/cdc_acm_host)
// This is a hotfix for IDF changes, where 'transfer->data_buffer_size' does not contain actual buffer length, but *allocated* buffer length, which can be larger
176
+
// This is a hotfix for IDF changes, where 'transfer->data_buffer_size' does not contain actual buffer length,
177
+
// but *allocated* buffer length, which can be larger if CONFIG_HEAP_POISONING_COMPREHENSIVE is enabled
* 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
168
172
*
169
-
* @param[in] vid Device's Vendor ID
170
-
* @param[in] pid Device's Product ID
173
+
* 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.
174
+
* It is recommended to use this feature if only one device can ever be in the system (there is no USB HUB connected).
175
+
*
176
+
* @param[in] vid Device's Vendor ID, set to CDC_HOST_ANY_VID for any
177
+
* @param[in] pid Device's Product ID, set to CDC_HOST_ANY_PID for any
171
178
* @param[in] interface_idx Index of device's interface used for CDC-ACM communication
172
179
* @param[in] dev_config Configuration structure of the device
0 commit comments