summaryrefslogtreecommitdiff
path: root/protocol/lufa
diff options
context:
space:
mode:
authortmk <nobody@nowhere>2013-04-13 11:55:08 +0900
committertmk <nobody@nowhere>2013-04-13 11:55:08 +0900
commit1348663a4ff1a4696db39e72bcb751608714de8e (patch)
tree9d9990e275299838cd5b4122bb7ead12fe94872c /protocol/lufa
parent540d0700dc0a8172e32d419a9b99c30e2e82a98a (diff)
Fix USB Descriptors
Diffstat (limited to 'protocol/lufa')
-rw-r--r--protocol/lufa/descriptor.c11
1 files changed, 7 insertions, 4 deletions
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)
};