projects
/
pub
/
USBasp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Update to latest Atmel Studio integration binary.
[pub/USBasp.git]
/
Bootloaders
/
CDC
/
Descriptors.c
diff --git
a/Bootloaders/CDC/Descriptors.c
b/Bootloaders/CDC/Descriptors.c
index
0bc1f4e
..
26f6036
100644
(file)
--- a/
Bootloaders/CDC/Descriptors.c
+++ b/
Bootloaders/CDC/Descriptors.c
@@
-1,13
+1,13
@@
/*
LUFA Library
/*
LUFA Library
- Copyright (C) Dean Camera, 201
2
.
+ Copyright (C) Dean Camera, 201
4
.
dean [at] fourwalledcubicle [dot] com
www.lufa-lib.org
*/
/*
dean [at] fourwalledcubicle [dot] com
www.lufa-lib.org
*/
/*
- Copyright 201
2
Dean Camera (dean [at] fourwalledcubicle [dot] com)
+ Copyright 201
4
Dean Camera (dean [at] fourwalledcubicle [dot] com)
Permission to use, copy, modify, distribute, and sell this
software and its documentation for any purpose is hereby granted
Permission to use, copy, modify, distribute, and sell this
software and its documentation for any purpose is hereby granted
@@
-18,7
+18,7
@@
advertising or publicity pertaining to distribution of the
software without specific, written prior permission.
advertising or publicity pertaining to distribution of the
software without specific, written prior permission.
- The author disclaim all warranties with regard to this
+ The author disclaim
s
all warranties with regard to this
software, including all implied warranties of merchantability
and fitness. In no event shall the author be liable for any
special, indirect or consequential damages or any damages
software, including all implied warranties of merchantability
and fitness. In no event shall the author be liable for any
special, indirect or consequential damages or any damages
@@
-46,7
+46,7
@@
const USB_Descriptor_Device_t DeviceDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device},
{
.Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device},
- .USBSpecification = VERSION_BCD(
01.1
0),
+ .USBSpecification = VERSION_BCD(
1,1,
0),
.Class = CDC_CSCP_CDCClass,
.SubClass = CDC_CSCP_NoSpecificSubclass,
.Protocol = CDC_CSCP_NoSpecificProtocol,
.Class = CDC_CSCP_CDCClass,
.SubClass = CDC_CSCP_NoSpecificSubclass,
.Protocol = CDC_CSCP_NoSpecificProtocol,
@@
-55,10
+55,10
@@
const USB_Descriptor_Device_t DeviceDescriptor =
.VendorID = 0x03EB,
.ProductID = 0x204A,
.VendorID = 0x03EB,
.ProductID = 0x204A,
- .ReleaseNumber = VERSION_BCD(
01.0
0),
+ .ReleaseNumber = VERSION_BCD(
1,0,
0),
- .ManufacturerStrIndex =
0x01
,
- .ProductStrIndex =
0x02
,
+ .ManufacturerStrIndex =
STRING_ID_Manufacturer
,
+ .ProductStrIndex =
STRING_ID_Product
,
.SerialNumStrIndex = NO_DESCRIPTOR,
.NumberOfConfigurations = FIXED_NUM_CONFIGURATIONS
.SerialNumStrIndex = NO_DESCRIPTOR,
.NumberOfConfigurations = FIXED_NUM_CONFIGURATIONS
@@
-90,7
+90,7
@@
const USB_Descriptor_Configuration_t ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
- .InterfaceNumber =
0
,
+ .InterfaceNumber =
INTERFACE_ID_CDC_CCI
,
.AlternateSetting = 0,
.TotalEndpoints = 1,
.AlternateSetting = 0,
.TotalEndpoints = 1,
@@
-107,7
+107,7
@@
const USB_Descriptor_Configuration_t ConfigurationDescriptor =
.Header = {.Size = sizeof(USB_CDC_Descriptor_FunctionalHeader_t), .Type = DTYPE_CSInterface},
.Subtype = 0x00,
.Header = {.Size = sizeof(USB_CDC_Descriptor_FunctionalHeader_t), .Type = DTYPE_CSInterface},
.Subtype = 0x00,
- .CDCSpecification = VERSION_BCD(
01.1
0),
+ .CDCSpecification = VERSION_BCD(
1,1,
0),
},
.CDC_Functional_ACM =
},
.CDC_Functional_ACM =
@@
-115,7
+115,7
@@
const USB_Descriptor_Configuration_t ConfigurationDescriptor =
.Header = {.Size = sizeof(USB_CDC_Descriptor_FunctionalACM_t), .Type = DTYPE_CSInterface},
.Subtype = 0x02,
.Header = {.Size = sizeof(USB_CDC_Descriptor_FunctionalACM_t), .Type = DTYPE_CSInterface},
.Subtype = 0x02,
- .Capabilities = 0x0
0
,
+ .Capabilities = 0x0
2
,
},
.CDC_Functional_Union =
},
.CDC_Functional_Union =
@@
-123,8
+123,8
@@
const USB_Descriptor_Configuration_t ConfigurationDescriptor =
.Header = {.Size = sizeof(USB_CDC_Descriptor_FunctionalUnion_t), .Type = DTYPE_CSInterface},
.Subtype = 0x06,
.Header = {.Size = sizeof(USB_CDC_Descriptor_FunctionalUnion_t), .Type = DTYPE_CSInterface},
.Subtype = 0x06,
- .MasterInterfaceNumber =
0
,
- .SlaveInterfaceNumber =
1
,
+ .MasterInterfaceNumber =
INTERFACE_ID_CDC_CCI
,
+ .SlaveInterfaceNumber =
INTERFACE_ID_CDC_DCI
,
},
.CDC_NotificationEndpoint =
},
.CDC_NotificationEndpoint =
@@
-141,7
+141,7
@@
const USB_Descriptor_Configuration_t ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
- .InterfaceNumber =
1
,
+ .InterfaceNumber =
INTERFACE_ID_CDC_DCI
,
.AlternateSetting = 0,
.TotalEndpoints = 2,
.AlternateSetting = 0,
.TotalEndpoints = 2,
@@
-234,17
+234,17
@@
uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
Size = sizeof(USB_Descriptor_Configuration_t);
break;
case DTYPE_String:
Size = sizeof(USB_Descriptor_Configuration_t);
break;
case DTYPE_String:
- if (
!(DescriptorNumber)
)
+ if (
DescriptorNumber == STRING_ID_Language
)
{
Address = &LanguageString;
Size = LanguageString.Header.Size;
}
{
Address = &LanguageString;
Size = LanguageString.Header.Size;
}
- else if (DescriptorNumber ==
0x01
)
+ else if (DescriptorNumber ==
STRING_ID_Manufacturer
)
{
Address = &ManufacturerString;
Size = ManufacturerString.Header.Size;
}
{
Address = &ManufacturerString;
Size = ManufacturerString.Header.Size;
}
- else if (DescriptorNumber ==
0x02
)
+ else if (DescriptorNumber ==
STRING_ID_Product
)
{
Address = &ProductString;
Size = ProductString.Header.Size;
{
Address = &ProductString;
Size = ProductString.Header.Size;