- 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

@@ -469,15 +469,6 @@ static inline uint8_t tu_desc_len(void const* desc)
return ((uint8_t const*) desc)[DESC_OFFSET_LEN];
}
// Length of the string descriptors in bytes with slen characters
#define TUD_DESC_STRLEN(_chr_count) (2*(_chr_count) + 2)
// Header of string descriptors with len + string type
#define TUD_DESC_STR_HEADER(_chr_count) ( (uint16_t) ( (TUSB_DESC_STRING << 8 ) | TUD_DESC_STRLEN(_chr_count)) )
// Convert comma-separated string to descriptor unicode format
#define TUD_DESC_STRCONV( ... ) (const uint16_t[]) { TUD_DESC_STR_HEADER(TU_ARGS_NUM(__VA_ARGS__)), __VA_ARGS__ }
#ifdef __cplusplus
}
#endif