diff --git a/winusb.c b/winusb.c index 1ba2f96..1f78f9a 100644 --- a/winusb.c +++ b/winusb.c @@ -50,7 +50,7 @@ static struct winusb_compatible_id_descriptor winusb_wcid = { }; static const struct usb_string_descriptor winusb_string_descriptor = { - .bLength = sizeof(struct usb_string_descriptor) + sizeof(WINUSB_EXTRA_STRING), + .bLength = 0x12, .bDescriptorType = USB_DT_STRING, .wData = WINUSB_EXTRA_STRING }; diff --git a/winusb.h b/winusb.h index 1f2ff9a..16a6df1 100644 --- a/winusb.h +++ b/winusb.h @@ -23,7 +23,7 @@ // Arbitrary, but must be equivalent to the last character in extra string #define WINUSB_MS_VENDOR_CODE '!' -#define WINUSB_EXTRA_STRING u"MSFT100!" +#define WINUSB_EXTRA_STRING {'M', 'S', 'F', 'T', '1', '0', '0', WINUSB_MS_VENDOR_CODE} extern void winusb_setup(usbd_device* usbd_dev, uint8_t interface);