Skip to content

Commit 19aab47

Browse files
committed
Merge branch 'fix/iot_usbh_cdc_multiple_tx_xfer' into 'master'
fix(iot_usbh_cdc): incorrectly tx_xfer multiple times See merge request ae_group/esp-iot-solution!1307
2 parents 5c832ef + 163dbc5 commit 19aab47

File tree

4 files changed

+12
-2
lines changed

4 files changed

+12
-2
lines changed

components/usb/iot_usbh_cdc/CHANGELOG.md

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

3+
## v2.0.1 - 2025-06-17
4+
5+
### Bug Fixes:
6+
7+
* Fix the issue of incorrectly initiating `tx_xfer` multiple times.
8+
39
## v2.0.0 - 2025-05-20
410

511
### Features:

components/usb/iot_usbh_cdc/idf_component.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version: "2.0.0"
1+
version: "2.0.1"
22
targets:
33
- esp32s2
44
- esp32s3

components/usb/iot_usbh_cdc/iot_usbh_cdc.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -536,11 +536,13 @@ static void _cdc_tx_xfer_submit(usb_transfer_t *out_xfer)
536536
size_t actual_num_bytes = 0;
537537
_ringbuf_pop(cdc->out_ringbuf_handle, out_xfer->data_buffer, data_len, &actual_num_bytes, 0);
538538
out_xfer->num_bytes = actual_num_bytes;
539+
usb_host_transfer_submit(out_xfer);
539540
} else {
540541
xSemaphoreGive(cdc->data.out_xfer_free_sem);
541542
}
543+
} else {
544+
usb_host_transfer_submit(out_xfer);
542545
}
543-
usb_host_transfer_submit(out_xfer);
544546
}
545547

546548
static esp_err_t _cdc_transfers_allocate(usbh_cdc_t *cdc, const usb_ep_desc_t *notif_ep_desc, const usb_ep_desc_t *in_ep_desc, const usb_ep_desc_t *out_ep_desc)

components/usb/iot_usbh_modem/test_apps/sdkconfig.defaults

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,5 @@ CONFIG_LWIP_PPP_SUPPORT=y
1919
CONFIG_LWIP_PPP_NOTIFY_PHASE_SUPPORT=y
2020
CONFIG_LWIP_PPP_PAP_SUPPORT=y
2121
CONFIG_USB_HOST_CONTROL_TRANSFER_MAX_SIZE=1024
22+
23+
CONFIG_EPPP_LINK_USES_PPP=y

0 commit comments

Comments
 (0)