summaryrefslogtreecommitdiff
path: root/examples/device/usbtmc/src
diff options
context:
space:
mode:
authorhathach <[email protected]>2020-07-21 21:00:11 +0700
committerhathach <[email protected]>2020-07-21 21:00:11 +0700
commit787c891702a9e6f4ddfe4f4c04457d7304fd21d5 (patch)
tree9909b5c1bb54c959410a254f09bb08bd395b963b /examples/device/usbtmc/src
parent1e2c554919bb079d5402449924f4415ed7123c62 (diff)
add note for MS OS 1.0 Descriptor at 0xEE
Diffstat (limited to 'examples/device/usbtmc/src')
-rw-r--r--examples/device/usbtmc/src/usb_descriptors.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/examples/device/usbtmc/src/usb_descriptors.c b/examples/device/usbtmc/src/usb_descriptors.c
index 86d78e1cd..505456769 100644
--- a/examples/device/usbtmc/src/usb_descriptors.c
+++ b/examples/device/usbtmc/src/usb_descriptors.c
@@ -166,7 +166,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;
@@ -178,6 +179,7 @@ uint16_t const* tud_descriptor_string_cb(uint8_t index, uint16_t langid)
chr_count = 31;
}
+ // Convert ASCII string into UTF-16
for(uint8_t i=0; i<chr_count; i++)
{
_desc_str[1+i] = str[i];