summaryrefslogtreecommitdiff
path: root/examples/device/net_lwip_webserver/src/usb_descriptors.c
diff options
context:
space:
mode:
Diffstat (limited to 'examples/device/net_lwip_webserver/src/usb_descriptors.c')
-rw-r--r--examples/device/net_lwip_webserver/src/usb_descriptors.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/examples/device/net_lwip_webserver/src/usb_descriptors.c b/examples/device/net_lwip_webserver/src/usb_descriptors.c
index d63816037..f1c0b478c 100644
--- a/examples/device/net_lwip_webserver/src/usb_descriptors.c
+++ b/examples/device/net_lwip_webserver/src/usb_descriptors.c
@@ -200,7 +200,8 @@ uint16_t const* tud_descriptor_string_cb(uint8_t index, uint16_t langid)
}
else
{
- // Convert ASCII string into UTF-16
+ // Note: the 0xEE index string is a Microsoft OS 1.0 Descriptors.
+ // https://docs.microsoft.com/en-us/windows-hardware/drivers/usbcon/microsoft-defined-usb-descriptors
if ( !(index < sizeof(string_desc_arr)/sizeof(string_desc_arr[0])) ) return NULL;
@@ -210,6 +211,7 @@ uint16_t const* tud_descriptor_string_cb(uint8_t index, uint16_t langid)
chr_count = strlen(str);
if ( chr_count > (TU_ARRAY_SIZE(_desc_str) - 1)) chr_count = TU_ARRAY_SIZE(_desc_str) - 1;
+ // Convert ASCII string into UTF-16
for (unsigned int i=0; i<chr_count; i++)
{
_desc_str[1+i] = str[i];