diff options
| author | hathach <[email protected]> | 2020-07-21 21:00:11 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2020-07-21 21:00:11 +0700 |
| commit | 787c891702a9e6f4ddfe4f4c04457d7304fd21d5 (patch) | |
| tree | 9909b5c1bb54c959410a254f09bb08bd395b963b /examples/device/dynamic_configuration/src | |
| parent | 1e2c554919bb079d5402449924f4415ed7123c62 (diff) | |
add note for MS OS 1.0 Descriptor at 0xEE
Diffstat (limited to 'examples/device/dynamic_configuration/src')
| -rw-r--r-- | examples/device/dynamic_configuration/src/usb_descriptors.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/examples/device/dynamic_configuration/src/usb_descriptors.c b/examples/device/dynamic_configuration/src/usb_descriptors.c index a2017f954..9ccb37654 100644 --- a/examples/device/dynamic_configuration/src/usb_descriptors.c +++ b/examples/device/dynamic_configuration/src/usb_descriptors.c @@ -218,7 +218,8 @@ uint16_t const* tud_descriptor_string_cb(uint8_t index, uint16_t langid) chr_count = 1; }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; @@ -228,6 +229,7 @@ uint16_t const* tud_descriptor_string_cb(uint8_t index, uint16_t langid) chr_count = strlen(str); if ( chr_count > 31 ) chr_count = 31; + // Convert ASCII string into UTF-16 for(uint8_t i=0; i<chr_count; i++) { _desc_str[1+i] = str[i]; |
