Skip to content

Commit 1c24b64

Browse files
committed
Merge branch 'contrib/github_pr_482' into 'master'
fix(iot_usbh_cdc): Close 'extern C' block (GitHub PR) Closes AEGHB-1008 See merge request ae_group/esp-iot-solution!1244
2 parents 6fbe1c8 + c11fe66 commit 1c24b64

File tree

7 files changed

+21
-6
lines changed

7 files changed

+21
-6
lines changed

components/usb/iot_usbh_cdc/CHANGELOG.md

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

3+
## v1.0.2 - 2025-3-13
4+
5+
### Bug Fixes:
6+
7+
* Close 'extern C' block
8+
* flush the ringbuffer when usb disconnect
9+
310
## v1.0.1 - 2025-2-26
411

512
### Bug Fixes:

components/usb/iot_usbh_cdc/idf_component.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version: "1.0.1"
1+
version: "1.0.2"
22
targets:
33
- esp32s2
44
- esp32s3
@@ -10,7 +10,7 @@ documentation: https://docs.espressif.com/projects/esp-iot-solution/en/latest/us
1010
issues: https://github.com/espressif/esp-iot-solution/issues
1111
dependencies:
1212
idf: ">=4.4.1"
13-
cmake_utilities: "0.*"
13+
cmake_utilities: "*"
1414
examples:
1515
- path: ../../../examples/usb/host/usb_cdc_basic
1616
sbom:

components/usb/iot_usbh_cdc/include/iot_usbh_cdc.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,4 +266,5 @@ esp_err_t usbh_cdc_get_state(usbh_cdc_handle_t cdc_handle, usbh_cdc_state_t *sta
266266
esp_err_t usbh_cdc_desc_print(usbh_cdc_handle_t cdc_handle);
267267

268268
#ifdef __cplusplus
269+
}
269270
#endif

components/usb/iot_usbh_cdc/iot_usbh_cdc.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -664,6 +664,9 @@ static esp_err_t _cdc_close(usbh_cdc_t *cdc)
664664
usb_host_device_close(p_usbh_cdc_obj->cdc_client_hdl, cdc->dev_hdl);
665665
cdc->state = USBH_CDC_CLOSE;
666666

667+
_ring_buffer_flush(cdc->in_ringbuf_handle);
668+
_ring_buffer_flush(cdc->out_ringbuf_handle);
669+
667670
if (cdc->cbs.disconnect) {
668671
cdc->cbs.disconnect((usbh_cdc_handle_t)cdc, cdc->cbs.user_data);
669672
}

components/usb/iot_usbh_modem/CHANGELOG.md

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

3-
## v1.1.1 - 2024-11-28
3+
## v1.1.2 - 2024-3-14
4+
5+
* Avoid `_usb_data_recv_task` from consuming too much time slice.
6+
7+
## v1.1.1 - 2024-3-11
48

59
* Add Kconfig MODEM_PRINT_DEVICE_DESCRIPTOR
6-
10+
711
## v1.1.0 - 2024-11-28
812

913
* Support ESP32-P4 with EC20_CE cat.4 module

components/usb/iot_usbh_modem/idf_component.yml

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

components/usb/iot_usbh_modem/src/esp_modem_usb_dte.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ static void _usb_data_recv_task(void *param)
234234
}
235235
}
236236
if (!(length || length2)) {
237-
ulTaskNotifyTake(true, 1);//yield to other task, but unblock as soon as possible
237+
ulTaskNotifyTake(true, pdMS_TO_TICKS(100));//yield to other task, but unblock as soon as possible
238238
}
239239
}
240240
vTaskDelete(NULL);

0 commit comments

Comments
 (0)