aboutsummaryrefslogtreecommitdiffstats
path: root/Bootloaders/DFU
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2012-06-17 12:55:50 +0000
committerDean Camera <dean@fourwalledcubicle.com>2012-06-17 12:55:50 +0000
commit7d83e10b7f92ccff3f23bb95061499200c6b1a0f (patch)
treeb17851ddb9090768b181e6e226f08a5a9b0be618 /Bootloaders/DFU
parentc128d8783e5cc30d745c83314b4d9b2dc6458297 (diff)
downloadlufa-7d83e10b7f92ccff3f23bb95061499200c6b1a0f.tar.gz
lufa-7d83e10b7f92ccff3f23bb95061499200c6b1a0f.tar.bz2
lufa-7d83e10b7f92ccff3f23bb95061499200c6b1a0f.zip
Re-add in DFU bootloader Manufacturer string, as the dfu-programmer utility breaks if it is not present.
Diffstat (limited to 'Bootloaders/DFU')
-rw-r--r--Bootloaders/DFU/Descriptors.c22
1 files changed, 19 insertions, 3 deletions
diff --git a/Bootloaders/DFU/Descriptors.c b/Bootloaders/DFU/Descriptors.c
index ff33b6b64..3a1a2e2b3 100644
--- a/Bootloaders/DFU/Descriptors.c
+++ b/Bootloaders/DFU/Descriptors.c
@@ -57,8 +57,8 @@ const USB_Descriptor_Device_t DeviceDescriptor =
.ProductID = PRODUCT_ID_CODE,
.ReleaseNumber = VERSION_BCD(00.00),
- .ManufacturerStrIndex = NO_DESCRIPTOR,
- .ProductStrIndex = 0x01,
+ .ManufacturerStrIndex = 0x01,
+ .ProductStrIndex = 0x02,
.SerialNumStrIndex = NO_DESCRIPTOR,
.NumberOfConfigurations = FIXED_NUM_CONFIGURATIONS
@@ -126,6 +126,17 @@ const USB_Descriptor_String_t LanguageString =
.UnicodeString = {LANGUAGE_ID_ENG}
};
+/** Manufacturer descriptor string. This is a Unicode string containing the manufacturer's details in human readable
+ * form, and is read out upon request by the host when the appropriate string ID is requested, listed in the Device
+ * Descriptor.
+ */
+const USB_Descriptor_String_t PROGMEM ManufacturerString =
+{
+ .Header = {.Size = USB_STRING_LEN(11), .Type = DTYPE_String},
+
+ .UnicodeString = L"Dean Camera"
+};
+
/** Product descriptor string. This is a Unicode string containing the product's details in human readable form,
* and is read out upon request by the host when the appropriate string ID is requested, listed in the Device
* Descriptor.
@@ -169,7 +180,12 @@ uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
Address = &LanguageString;
Size = LanguageString.Header.Size;
}
- else
+ else if (DescriptorNumber == 0x01)
+ {
+ Address = &ManufacturerString;
+ Size = ManufacturerString.Header.Size;
+ }
+ else if (DescriptorNumber == 0x02)
{
Address = &ProductString;
Size = ProductString.Header.Size;