From 93f054683dd5fc5b79541f4922cb34a38cb5c341 Mon Sep 17 00:00:00 2001 From: "Luke T. Shumaker" Date: Mon, 16 Sep 2024 02:49:13 -0600 Subject: keyboard hello world? --- tusb_helpers.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'tusb_helpers.h') diff --git a/tusb_helpers.h b/tusb_helpers.h index 452a32e..0e04988 100644 --- a/tusb_helpers.h +++ b/tusb_helpers.h @@ -966,4 +966,13 @@ #define TUD_ENDPOINT_OUT 0x00 #define TUD_ENDPOINT_IN 0x80 +#define UTF16(str) u ## str + +static inline size_t utf16_strncpy(uint16_t *dst, uint16_t *src, size_t dsize) { + size_t i; + for (i = 0; i < dsize && src && src[i]; i++) + dst[i] = src[i]; + return i; +} + #endif /* _USB_HELPERS_H_ */ -- cgit v1.2.3-2-g168b