aboutsummaryrefslogtreecommitdiffstats
path: root/src/usb_descriptors.c
diff options
context:
space:
mode:
authorLouis Burda <quent.burda@gmail.com>2022-12-19 00:33:54 +0100
committerLouis Burda <quent.burda@gmail.com>2022-12-19 00:41:30 +0100
commite4783bbcc4214416befceb53f6af9ebdfb35ba86 (patch)
tree71ae9268017cb3f0b7dabe1e9016970fb137872c /src/usb_descriptors.c
parent8e60c68eac5dbe749c80d1b42160ad1f7de42200 (diff)
downloadsxkbd-e4783bbcc4214416befceb53f6af9ebdfb35ba86.tar.gz
sxkbd-e4783bbcc4214416befceb53f6af9ebdfb35ba86.zip
Add more keys to keymap and add split role detection
Diffstat (limited to 'src/usb_descriptors.c')
-rw-r--r--src/usb_descriptors.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/usb_descriptors.c b/src/usb_descriptors.c
index 547c35e..f55a0c5 100644
--- a/src/usb_descriptors.c
+++ b/src/usb_descriptors.c
@@ -113,10 +113,10 @@ tusb_desc_device_qualifier_t const desc_device_qualifier =
#endif
char const *string_desc_arr[] = {
- [0] = (const char[]) { 0x09, 0x04 }, /* Supported language is English */
- [1] = "TinyUSB", /* Manufacturer */
- [2] = "TinyUSB Device", /* Product */
- [3] = "123456", /* Serials, should use chip ID */
+ [0] = "\x09\x04\x09\x00", /* bCountryCode: Germany */
+ [1] = "TinyUSB", /* Manufacturer */
+ [2] = "TinyUSB Device", /* Product */
+ [3] = "123456", /* Serials, should use chip ID */
[4] = "SXKBD CDC",
[5] = "SXKBD HID"
};
@@ -162,8 +162,8 @@ tud_descriptor_string_cb(uint8_t index, uint16_t langid)
(void) langid;
if (index == 0) {
- memcpy(&_desc_str[1], string_desc_arr[0], 2);
- chr_count = 1;
+ memcpy(&_desc_str[1], string_desc_arr[0], 4);
+ chr_count = 2;
} else {
if (index >= ARRLEN(string_desc_arr))
return NULL;