more string id

This commit is contained in:
hathach 2020-03-24 00:07:34 +07:00
parent aa01e5f447
commit fca4a6eabf
1 changed files with 2 additions and 2 deletions

View File

@ -136,7 +136,7 @@ uint8_t const * tud_descriptor_configuration_cb(uint8_t index)
//--------------------------------------------------------------------+ //--------------------------------------------------------------------+
// array of pointer to string descriptors // array of pointer to string descriptors
char const* string_desc_arr [] = static char const* string_desc_arr [] =
{ {
[STRID_LANGID] = (const char[]) { 0x09, 0x04 }, // supported language is English (0x0409) [STRID_LANGID] = (const char[]) { 0x09, 0x04 }, // supported language is English (0x0409)
[STRID_MANUFACTURER] = "TinyUSB", // Manufacturer [STRID_MANUFACTURER] = "TinyUSB", // Manufacturer
@ -159,7 +159,7 @@ uint16_t const* tud_descriptor_string_cb(uint8_t index, uint16_t langid)
if (STRID_LANGID == index) if (STRID_LANGID == index)
{ {
memcpy(&_desc_str[1], string_desc_arr[0], 2); memcpy(&_desc_str[1], string_desc_arr[STRID_LANGID], 2);
chr_count = 1; chr_count = 1;
} }
else if (STRID_MAC == index) else if (STRID_MAC == index)