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
/
Printer
/
Descriptors.c
diff --git
a/Bootloaders/Printer/Descriptors.c
b/Bootloaders/Printer/Descriptors.c
index
30fd364
..
9e0e190
100644
(file)
--- a/
Bootloaders/Printer/Descriptors.c
+++ b/
Bootloaders/Printer/Descriptors.c
@@
-1,13
+1,13
@@
/*
LUFA Library
/*
LUFA Library
- Copyright (C) Dean Camera, 201
3
.
+ 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
3
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
@@
-38,7
+38,7
@@
#include "Descriptors.h"
#include "Descriptors.h"
-/** Device descriptor structure. This descriptor, located in
FLASH
memory, describes the overall
+/** Device descriptor structure. This descriptor, located in
SRAM
memory, describes the overall
* device characteristics, including the supported USB version, control endpoint size and the
* number of device configurations. The descriptor is read out by the USB host when the enumeration
* process begins.
* device characteristics, including the supported USB version, control endpoint size and the
* number of device configurations. The descriptor is read out by the USB host when the enumeration
* process begins.
@@
-47,7
+47,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 = USB_CSCP_NoDeviceClass,
.SubClass = USB_CSCP_NoDeviceSubclass,
.Protocol = USB_CSCP_NoDeviceProtocol,
.Class = USB_CSCP_NoDeviceClass,
.SubClass = USB_CSCP_NoDeviceSubclass,
.Protocol = USB_CSCP_NoDeviceProtocol,
@@
-55,17
+55,17
@@
const USB_Descriptor_Device_t DeviceDescriptor =
.Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE,
.VendorID = 0x03EB,
.Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE,
.VendorID = 0x03EB,
- .ProductID = 0x
FFEF
,
- .ReleaseNumber = VERSION_BCD(0
0.0
1),
+ .ProductID = 0x
206B
,
+ .ReleaseNumber = VERSION_BCD(0
,0,
1),
- .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
};
-/** Configuration descriptor structure. This descriptor, located in
FLASH
memory, describes the usage
+/** Configuration descriptor structure. This descriptor, located in
SRAM
memory, describes the usage
* of the device in one of its supported configurations, including information about any device interfaces
* and endpoints. The descriptor is read out by the USB host during the enumeration process when selecting
* a configuration so that the host may correctly communicate with the USB device.
* of the device in one of its supported configurations, including information about any device interfaces
* and endpoints. The descriptor is read out by the USB host during the enumeration process when selecting
* a configuration so that the host may correctly communicate with the USB device.
@@
-91,7
+91,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_Printer
,
.AlternateSetting = 0,
.TotalEndpoints = 2,
.AlternateSetting = 0,
.TotalEndpoints = 2,
@@
-124,7
+124,7
@@
const USB_Descriptor_Configuration_t ConfigurationDescriptor =
}
};
}
};
-/** Language descriptor structure. This descriptor, located in
FLASH
memory, is returned when the host requests
+/** Language descriptor structure. This descriptor, located in
SRAM
memory, is returned when the host requests
* the string descriptor with index 0 (the first index). It is actually an array of 16-bit integers, which indicate
* via the language ID table available at USB.org what languages the device supports for its string descriptors.
*/
* the string descriptor with index 0 (the first index). It is actually an array of 16-bit integers, which indicate
* via the language ID table available at USB.org what languages the device supports for its string descriptors.
*/
@@
-186,17
+186,17
@@
uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
case DTYPE_String:
switch (DescriptorNumber)
{
case DTYPE_String:
switch (DescriptorNumber)
{
- case
0x00
:
+ case
STRING_ID_Language
:
Address = &LanguageString;
Address = &LanguageString;
- Size =
pgm_read_byte(&LanguageString.Header.Size)
;
+ Size =
LanguageString.Header.Size
;
break;
break;
- case
0x01
:
+ case
STRING_ID_Manufacturer
:
Address = &ManufacturerString;
Address = &ManufacturerString;
- Size =
pgm_read_byte(&ManufacturerString.Header.Size)
;
+ Size =
ManufacturerString.Header.Size
;
break;
break;
- case
0x02
:
+ case
STRING_ID_Product
:
Address = &ProductString;
Address = &ProductString;
- Size =
pgm_read_byte(&ProductString.Header.Size)
;
+ Size =
ProductString.Header.Size
;
break;
}
break;
}