Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Erik Strand
lufa
Commits
db3f8565
Commit
db3f8565
authored
Jul 29, 2012
by
Dean Camera
Browse files
Enhance bootloader descriptor strings in the CDC and DFU bootloaders.
parent
33f832b9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Bootloaders/CDC/Descriptors.c
View file @
db3f8565
...
...
@@ -57,8 +57,8 @@ const USB_Descriptor_Device_t DeviceDescriptor =
.
ProductID
=
0x204A
,
.
ReleaseNumber
=
VERSION_BCD
(
01
.
00
),
.
ManufacturerStrIndex
=
NO_DESCRIPTOR
,
.
ProductStrIndex
=
0x0
1
,
.
ManufacturerStrIndex
=
0x01
,
.
ProductStrIndex
=
0x0
2
,
.
SerialNumStrIndex
=
NO_DESCRIPTOR
,
.
NumberOfConfigurations
=
FIXED_NUM_CONFIGURATIONS
...
...
@@ -185,15 +185,26 @@ 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.
*/
const
USB_Descriptor_String_t
ProductString
=
{
.
Header
=
{.
Size
=
USB_STRING_LEN
(
1
8
),
.
Type
=
DTYPE_String
},
.
Header
=
{.
Size
=
USB_STRING_LEN
(
1
9
),
.
Type
=
DTYPE_String
},
.
UnicodeString
=
L"
AVR
CDC Bootloader"
.
UnicodeString
=
L"
LUFA
CDC Bootloader"
};
/** This function is called by the library when in device mode, and must be overridden (see LUFA library "USB Descriptors"
...
...
@@ -228,7 +239,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
;
...
...
Bootloaders/DFU/Descriptors.c
View file @
db3f8565
...
...
@@ -143,9 +143,9 @@ const USB_Descriptor_String_t PROGMEM ManufacturerString =
*/
const
USB_Descriptor_String_t
ProductString
=
{
.
Header
=
{.
Size
=
USB_STRING_LEN
(
1
8
),
.
Type
=
DTYPE_String
},
.
Header
=
{.
Size
=
USB_STRING_LEN
(
1
9
),
.
Type
=
DTYPE_String
},
.
UnicodeString
=
L"
AVR
DFU Bootloader"
.
UnicodeString
=
L"
LUFA
DFU Bootloader"
};
/** This function is called by the library when in device mode, and must be overridden (see library "USB Descriptors"
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment