- remove TUD_WEBUSB_URL_DESCRIPTOR to avoid flexible array member (C++
forbid in strict mode)
- remove unused TUD_DESC_STRLEN/TUD_DESC_STR_HEADER/TUD_DESC_STR_HEADER
This commit is contained in:
hathach
2019-08-01 13:20:00 +07:00
parent bd08d0edc9
commit 30de17a830
8 changed files with 12 additions and 26 deletions

View File

@@ -147,8 +147,8 @@ uint16_t const* tud_descriptor_string_cb(uint8_t index)
}
}
// first byte is len, second byte is string type
_desc_str[0] = TUD_DESC_STR_HEADER(chr_count);
// first byte is length (including header), second byte is string type
_desc_str[0] = (TUSB_DESC_STRING << 8 ) | (2*chr_count + 2);
return _desc_str;
}