diff options
| author | Ha Thach <[email protected]> | 2020-07-21 21:56:57 +0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2020-07-21 21:56:57 +0700 |
| commit | 7d2fc124452d6ec2d5d45bdacc4fc8b38d03d0d0 (patch) | |
| tree | 3b3fd348355c203e6ddc6c419fc13275af5995db /examples/device/cdc_msc | |
| parent | be744e1e0149f16c02d1fc6b1e6ef4ab55fcbeeb (diff) | |
| parent | dfca92d29b8f984ebe5f4752154fd8187ec24120 (diff) | |
Merge pull request #469 from hathach/followup-pr466-pr468
Followup pr466 pr468
Diffstat (limited to 'examples/device/cdc_msc')
| -rw-r--r-- | examples/device/cdc_msc/src/usb_descriptors.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/examples/device/cdc_msc/src/usb_descriptors.c b/examples/device/cdc_msc/src/usb_descriptors.c index d6b0d73cc..e13b8189b 100644 --- a/examples/device/cdc_msc/src/usb_descriptors.c +++ b/examples/device/cdc_msc/src/usb_descriptors.c @@ -187,7 +187,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; @@ -197,6 +198,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]; |
