summaryrefslogtreecommitdiff
path: root/tmk_core/protocol/vusb
diff options
context:
space:
mode:
authorRyan <fauxpark@gmail.com>2022-08-29 02:59:40 +1000
committerGitHub <noreply@github.com>2022-08-28 09:59:40 -0700
commitd983251c10c4bb152c746dc4e94bc954b1b82c8c (patch)
tree3a4832d82b2d68a9eb3ff1ca2e804a16c1aca152 /tmk_core/protocol/vusb
parent6a28ceefcda58ec530469ac98c38b970ba4780ab (diff)
Switch over MANUFACTURER and PRODUCT to string literals (#18183)
Diffstat (limited to 'tmk_core/protocol/vusb')
-rw-r--r--tmk_core/protocol/vusb/vusb.c12
-rw-r--r--tmk_core/protocol/vusb/vusb.h2
2 files changed, 6 insertions, 8 deletions
diff --git a/tmk_core/protocol/vusb/vusb.c b/tmk_core/protocol/vusb/vusb.c
index d07cc0d27e..65f5027574 100644
--- a/tmk_core/protocol/vusb/vusb.c
+++ b/tmk_core/protocol/vusb/vusb.c
@@ -672,7 +672,7 @@ const PROGMEM uchar console_hid_report[] = {
// clang-format off
const PROGMEM usbStringDescriptor_t usbStringDescriptorZero = {
.header = {
- .bLength = USB_STRING_LEN(1),
+ .bLength = 4,
.bDescriptorType = USBDESCR_STRING
},
.bString = {0x0409} // US English
@@ -680,24 +680,24 @@ const PROGMEM usbStringDescriptor_t usbStringDescriptorZero = {
const PROGMEM usbStringDescriptor_t usbStringDescriptorManufacturer = {
.header = {
- .bLength = USB_STRING_LEN(sizeof(STR(MANUFACTURER)) - 1),
+ .bLength = sizeof(USBSTR(MANUFACTURER)),
.bDescriptorType = USBDESCR_STRING
},
- .bString = LSTR(MANUFACTURER)
+ .bString = USBSTR(MANUFACTURER)
};
const PROGMEM usbStringDescriptor_t usbStringDescriptorProduct = {
.header = {
- .bLength = USB_STRING_LEN(sizeof(STR(PRODUCT)) - 1),
+ .bLength = sizeof(USBSTR(PRODUCT)),
.bDescriptorType = USBDESCR_STRING
},
- .bString = LSTR(PRODUCT)
+ .bString = USBSTR(PRODUCT)
};
#if defined(SERIAL_NUMBER)
const PROGMEM usbStringDescriptor_t usbStringDescriptorSerial = {
.header = {
- .bLength = USB_STRING_LEN(sizeof(SERIAL_NUMBER) - 1),
+ .bLength = sizeof(USBSTR(SERIAL_NUMBER)),
.bDescriptorType = USBDESCR_STRING
},
.bString = USBSTR(SERIAL_NUMBER)
diff --git a/tmk_core/protocol/vusb/vusb.h b/tmk_core/protocol/vusb/vusb.h
index b1ecc98f37..c5cb27ded6 100644
--- a/tmk_core/protocol/vusb/vusb.h
+++ b/tmk_core/protocol/vusb/vusb.h
@@ -118,8 +118,6 @@ typedef struct usbConfigurationDescriptor {
#endif
} __attribute__((packed)) usbConfigurationDescriptor_t;
-#define USB_STRING_LEN(s) (sizeof(usbDescriptorHeader_t) + ((s) << 1))
-
extern bool vusb_suspended;
host_driver_t *vusb_driver(void);