This component contains an implementation of a USB CDC-ACM Host Class Driver that is implemented on top of the USB Host Library.
The CDC-ACM Host driver supports the following types of CDC devices:
The CDC-ACM Class driver supports CDC-ACM devices that meet the following requirements:
0x02
or implement Interface Association Descriptor (IAD)The CDC-ACM Class driver supports CDC-like devices that meet the following requirements:
0xFF
For CDC-like devices, users are responsible for ensuring that they only call APIs (e.g., cdc_acm_host_send_break()
) that are supported by the target device.
The following steps outline the typical API call pattern of the CDC-ACM Class Driver
usb_host_install()
cdc_acm_host_install()
cdc_acm_host_open()
to open a CDC-ACM/CDC-like device. This function will block until the target device is connected or timeoutcdc_acm_host_data_tx_blocking()
cdc_acm_host_close()
cdc_acm_host_uninstall()
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).
b79a9c25ce77d89e934023205ef184e3be1bd59b
idf.py add-dependency "espressif/usb_host_cdc_acm^2.1.0"