Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
lufa
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Erik Strand
lufa
Commits
db3f8565
Commit
db3f8565
authored
12 years ago
by
Dean Camera
Browse files
Options
Downloads
Patches
Plain Diff
Enhance bootloader descriptor strings in the CDC and DFU bootloaders.
parent
33f832b9
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
Bootloaders/CDC/Descriptors.c
+21
-5
21 additions, 5 deletions
Bootloaders/CDC/Descriptors.c
Bootloaders/DFU/Descriptors.c
+2
-2
2 additions, 2 deletions
Bootloaders/DFU/Descriptors.c
with
23 additions
and
7 deletions
Bootloaders/CDC/Descriptors.c
+
21
−
5
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
;
...
...
This diff is collapsed.
Click to expand it.
Bootloaders/DFU/Descriptors.c
+
2
−
2
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"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment