Skip to content

Commit

Permalink
feature(usb_host_msc): Add support for ESP32-P4
Browse files Browse the repository at this point in the history
  • Loading branch information
tore-espressif committed Jan 25, 2024
1 parent 880b7f0 commit 35924e7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
3 changes: 2 additions & 1 deletion host/class/msc/usb_host_msc/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
## 1.1.2 Unreleased
## 1.1.2

- Added support for ESP32-P4
- Reverted zero-copy bulk transfers. Data are now copied to USB buffers with negligible effect on performance

## 1.1.1
Expand Down
2 changes: 1 addition & 1 deletion host/class/msc/usb_host_msc/idf_component.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## IDF Component Manager Manifest File
version: "1.1.1~1"
version: "1.1.2"
description: USB Host MSC driver
url: https://github.com/espressif/esp-usb/tree/master/host/class/msc/usb_host_msc
dependencies:
Expand Down
5 changes: 4 additions & 1 deletion host/class/msc/usb_host_msc/src/msc_host.c
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,10 @@ static void copy_string_desc(wchar_t *dest, const usb_str_desc_t *src)
}
if (src != NULL) {
size_t len = MIN((src->bLength - USB_STANDARD_DESC_SIZE) / 2, MSC_STR_DESC_SIZE - 1);
wcsncpy(dest, src->wData, len);
for (int i = 0; i < len; i++) {
// Convert UTF-16 to wchar_t
dest[i] = src->wData[i];
}
if (dest != NULL) { // This should be always true, we just check to avoid LoadProhibited exception
dest[len] = 0;
}
Expand Down

0 comments on commit 35924e7

Please sign in to comment.