summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorhathach <[email protected]>2019-05-12 15:38:15 +0700
committerhathach <[email protected]>2019-05-12 15:38:15 +0700
commit1174949308bb7595e99fd5789ebf3466cf2ab123 (patch)
tree2a04ff594ea42234c532fc4ab5f8e6f0b4603623 /src/common
parentba2136486c153edd372eadaa325dab27fe1297b2 (diff)
change tud_descriptor_string_cb() to be consistent with other descriptor callback
Diffstat (limited to 'src/common')
-rw-r--r--src/common/tusb_types.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/common/tusb_types.h b/src/common/tusb_types.h
index 909deffa8..82b5a65c1 100644
--- a/src/common/tusb_types.h
+++ b/src/common/tusb_types.h
@@ -403,10 +403,10 @@ static inline uint8_t tu_desc_len(void const* desc)
}
// Length of the string descriptors in bytes with slen characters
-#define TUD_DESC_STRLEN(_slen) (2*(_slen) + 2)
+#define TUD_DESC_STRLEN(_chr_count) (2*(_chr_count) + 2)
// Header of string descriptors with len + string type
-#define TUD_DESC_STR_HEADER(_slen) ( (uint16_t) ( (TUSB_DESC_STRING << 8 ) | TUD_DESC_STRLEN(_slen)) )
+#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(VA_ARGS_NUM_(__VA_ARGS__)), __VA_ARGS__ }