Skip to content

Commit 34f9b9a

Browse files
committed
Merge branch 'feat/cdc_host_driver' into 'master'
feat(ioth_cdc): add new component use usb host driver See merge request ae_group/esp-iot-solution!1117
2 parents 224d004 + af9e7c5 commit 34f9b9a

File tree

27 files changed

+1431
-1105
lines changed

27 files changed

+1431
-1105
lines changed

codespell-ignore-list

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,4 @@ uncompressible
1818
wHeigh
1919
shoudn't
2020
definations
21+
inout

components/usb/iot_usbh_cdc/CHANGELOG.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,23 @@
11
# ChangeLog
22

3+
## v1.0.0 - 2024-10-31
4+
5+
### Break Changes:
6+
7+
* Remove the dependency on the `iot_usbh` component and use `usb_host_driver` instead.
8+
9+
### API Break Changes:
10+
11+
* Add `usbh_cdc_create()`
12+
* Add `usbh_cdc_delete()`
13+
* Add `usbh_cdc_desc_print()` to print CDC descriptor
14+
* Rename `usbh_cdc_get_itf_state()` to `usbh_cdc_get_state()`
15+
* Remove `usbh_cdc_wait_connect()`
16+
* Remove `usbh_cdc_itf_write_bytes()`
17+
* Remove `usbh_cdc_get_buffered_data_len()`
18+
* Remove `usbh_cdc_itf_get_buffered_data_len()`
19+
* Remove `usbh_cdc_itf_read_bytes()`
20+
321
## v0.2.2 - 2023-12-08
422

523
* Add doc and example
Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
idf_component_register(SRC_DIRS "."
2-
INCLUDE_DIRS "include"
3-
REQUIRES iot_usbh
4-
PRIV_REQUIRES esp_ringbuf)
2+
INCLUDE_DIRS "." "include"
3+
PRIV_INCLUDE_DIRS "private_include"
4+
PRIV_REQUIRES esp_ringbuf
5+
REQUIRES usb)
56

67
include(package_manager)
78
cu_pkg_define_version(${CMAKE_CURRENT_LIST_DIR})
Lines changed: 37 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,46 @@
11
menu "IoT USB Host CDC"
22

3-
config CDC_SEND_DTE_ACTIVE
4-
bool "Set control line state during init"
5-
default n
6-
config CDC_BULK_IN_URB_NUM
7-
int "cdc bulk in urb number"
8-
default 2
3+
config USBH_TASK_CORE_ID
4+
int "usbh task core_id"
5+
default 0
6+
range -1 1
97
help
10-
bulk in urb number, increase to handle heavy traffic
11-
config CDC_BULK_OUT_URB_NUM
12-
int "cdc bulk out urb number"
13-
default 2
8+
usb host task to specified core
9+
10+
config USBH_TASK_BASE_PRIORITY
11+
int "usbh task base priority"
12+
default 5
1413
help
15-
bulk out urb number, increase to handle heavy traffic
16-
config CDC_BULK_IN_URB_BUFFER_SIZE
17-
int "cdc bulk in urb buffer size"
14+
usb task base priority
15+
16+
config IN_TRANSFER_BUFFER_SIZE
17+
int "usbh IN transfer buffer size"
1818
default 512
1919
help
20-
buffer size of each bulk in urb, should be multiple of endpoint mps
21-
config CDC_BULK_OUT_URB_BUFFER_SIZE
22-
int "cdc bulk out urb buffer size"
20+
usb host IN transfer buffer size
21+
22+
config OUT_TRANSFER_BUFFER_SIZE
23+
int "usbh OUT transfer buffer size"
2324
default 512
2425
help
25-
buffer size of each bulk out urb
26+
usb host OUT transfer buffer size
27+
28+
config IN_RINGBUFFER_SIZE
29+
int "usbh IN ringbuffer size"
30+
default 1024
31+
help
32+
usb host IN ringbuffer size
33+
34+
config OUT_RINGBUFFER_SIZE
35+
int "usbh OUT ringbuffer size"
36+
default 1024
37+
help
38+
usb host OUT ringbuffer size
39+
40+
config DEVICE_ADDRESS_LIST_NUM
41+
int "usbh device address list num"
42+
default 10
43+
help
44+
usb host device address list num
45+
2646
endmenu

components/usb/iot_usbh_cdc/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ This component implements a simple version of the USB host CDC driver. The API i
55
**Features:**
66

77
1. Similar API to ESP-IDF UART driver
8-
2. Support USB CDC device
8+
2. Support USB CDC device (The notify interface is not supported)
99
3. Support USB Vendor device
1010
4. Support USB CDC multiple interface
1111

components/usb/iot_usbh_cdc/idf_component.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
version: "0.2.2"
1+
version: "1.0.0"
22
targets:
33
- esp32s2
44
- esp32s3
5+
- esp32p4
56
description: Simple USB Host CDC driver maintained in esp-iot-solution
67
url: https://github.com/espressif/esp-iot-solution/tree/master/components/usb/iot_usbh_cdc
78
repository: https://github.com/espressif/esp-iot-solution/tree/master/components/usb/iot_usbh_cdc
@@ -10,10 +11,6 @@ issues: https://github.com/espressif/esp-iot-solution/issues
1011
dependencies:
1112
idf: ">=4.4.1"
1213
cmake_utilities: "0.*"
13-
iot_usbh:
14-
version: "0.*"
15-
public: true
16-
override_path: "../iot_usbh"
1714
examples:
1815
- path: ../../../examples/usb/host/usb_cdc_basic
1916
sbom:

0 commit comments

Comments
 (0)