Skip to content

Commit

Permalink
Merge pull request #14 from espressif/feature/cdc_acm_merge_open
Browse files Browse the repository at this point in the history
Feature: One function for CDC opening
  • Loading branch information
tore-espressif authored Sep 3, 2024
2 parents e4817e2 + c73ae4a commit d32baca
Show file tree
Hide file tree
Showing 6 changed files with 238 additions and 226 deletions.
3 changes: 2 additions & 1 deletion host/class/cdc/usb_host_cdc_acm/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## [Unreleased]
## 2.0.4

- Fixed Control transfer allocation size for too small EP0 Max Packet Size (https://github.com/espressif/esp-idf/issues/14345)
- Merged `open()` and `open_vendor_specific()` functions. All types of CDC devices are now opened with `cdc_acm_host_open()`, CDC compliance is detected automatically

## 2.0.3

Expand Down
3 changes: 2 additions & 1 deletion host/class/cdc/usb_host_cdc_acm/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# USB Host CDC-ACM Class Driver

[![Component Registry](https://components.espressif.com/components/espressif/usb_host_cdc_acm/badge.svg)](https://components.espressif.com/components/espressif/usb_host_cdc_acm)
![maintenance-status](https://img.shields.io/badge/maintenance-passively--maintained-yellowgreen.svg)

This component contains an implementation of a USB CDC-ACM Host Class Driver that is implemented on top of the [USB Host Library](https://docs.espressif.com/projects/esp-idf/en/latest/esp32s2/api-reference/peripherals/usb_host.html).

Expand Down Expand Up @@ -36,7 +37,7 @@ The following steps outline the typical API call pattern of the CDC-ACM Class Dr

1. Install the USB Host Library via `usb_host_install()`
2. Install the CDC-ACM driver via `cdc_acm_host_install()`
3. Call `cdc_acm_host_open()`/`cdc_acm_host_open_vendor_specific()` to open a target CDC-ACM/CDC-like device. These functions will block until the target device is connected or time-out
3. Call `cdc_acm_host_open()` to open a CDC-ACM/CDC-like device. This function will block until the target device is connected or timeout
4. To transmit data, call `cdc_acm_host_data_tx_blocking()`
5. When data is received, the driver will automatically run the receive data callback
6. An opened device can be closed via `cdc_acm_host_close()`
Expand Down
Loading

0 comments on commit d32baca

Please sign in to comment.