diff options
| author | hathach <[email protected]> | 2018-07-03 16:39:42 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2018-07-03 16:39:42 +0700 |
| commit | ec3227b2202b007da1b76c20394b6f4d774f68b6 (patch) | |
| tree | d1d497fa73603388b97ce4258770614d2d5123c5 /src | |
| parent | 1faf0a81e4ef7176f152165fe46ff65b598d09ce (diff) | |
add TUD_DESC_STRCONV
Diffstat (limited to 'src')
| -rw-r--r-- | src/common/tusb_types.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/common/tusb_types.h b/src/common/tusb_types.h index b50cacb03..4b8ef899c 100644 --- a/src/common/tusb_types.h +++ b/src/common/tusb_types.h @@ -394,6 +394,10 @@ static inline uint8_t edpt_addr(uint8_t num, tusb_dir_t dir) return num | (dir == TUSB_DIR_IN ? TUSB_DIR_IN_MASK : 0);
}
+
+// Convert comma-separated string to descriptor unicode format
+#define TUD_DESC_STRCONV( ... ) (const uint16_t[]) { (TUSB_DESC_STRING << 8 ) | (2*VA_ARGS_NUM_(__VA_ARGS__) + 2), __VA_ARGS__ }
+
#ifdef __cplusplus
}
#endif
|
