From 1348663a4ff1a4696db39e72bcb751608714de8e Mon Sep 17 00:00:00 2001 From: tmk Date: Sat, 13 Apr 2013 11:55:08 +0900 Subject: Fix USB Descriptors --- protocol/lufa/descriptor.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'protocol/lufa/descriptor.c') diff --git a/protocol/lufa/descriptor.c b/protocol/lufa/descriptor.c index ff98d88769..d34ab1c5aa 100644 --- a/protocol/lufa/descriptor.c +++ b/protocol/lufa/descriptor.c @@ -230,8 +230,9 @@ const USB_Descriptor_Device_t PROGMEM DeviceDescriptor = .SubClass = USB_CSCP_NoDeviceSubclass, .Protocol = USB_CSCP_NoDeviceProtocol, - .Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE, + .Endpoint0Size = 8, + /* specified in config.h */ .VendorID = VENDOR_ID, .ProductID = PRODUCT_ID, .ReleaseNumber = DEVICE_VER, @@ -240,7 +241,7 @@ const USB_Descriptor_Device_t PROGMEM DeviceDescriptor = .ProductStrIndex = 0x02, .SerialNumStrIndex = NO_DESCRIPTOR, - .NumberOfConfigurations = FIXED_NUM_CONFIGURATIONS + .NumberOfConfigurations = 1 }; /******************************************************************************* @@ -453,14 +454,16 @@ const USB_Descriptor_String_t PROGMEM LanguageString = const USB_Descriptor_String_t PROGMEM ManufacturerString = { - .Header = {.Size = USB_STRING_LEN(11), .Type = DTYPE_String}, + /* subtract 1 for null terminator */ + .Header = {.Size = USB_STRING_LEN(sizeof(STR(MANUFACTURER))-1), .Type = DTYPE_String}, .UnicodeString = LSTR(MANUFACTURER) }; const USB_Descriptor_String_t PROGMEM ProductString = { - .Header = {.Size = USB_STRING_LEN(28), .Type = DTYPE_String}, + /* subtract 1 for null terminator */ + .Header = {.Size = USB_STRING_LEN(sizeof(STR(PRODUCT))-1), .Type = DTYPE_String}, .UnicodeString = LSTR(PRODUCT) }; -- cgit v1.2.3