projects
/
pub
/
USBasp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Move out many of the common class driver constants into grouped enums, to make them...
[pub/USBasp.git]
/
Demos
/
Device
/
ClassDriver
/
VirtualSerialMouse
/
Descriptors.c
diff --git
a/Demos/Device/ClassDriver/VirtualSerialMouse/Descriptors.c
b/Demos/Device/ClassDriver/VirtualSerialMouse/Descriptors.c
index
7d383a4
..
72e89ef
100644
(file)
--- a/
Demos/Device/ClassDriver/VirtualSerialMouse/Descriptors.c
+++ b/
Demos/Device/ClassDriver/VirtualSerialMouse/Descriptors.c
@@
-164,28
+164,29
@@
USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.InterfaceStrIndex = NO_DESCRIPTOR
},
.InterfaceStrIndex = NO_DESCRIPTOR
},
- .CDC_Functional_
Int
Header =
+ .CDC_Functional_Header =
{
{
- .Header = {.Size = sizeof(
CDC_FUNCTIONAL_DESCRIPTOR(2)), .Type = 0x24
},
- .Sub
Type = 0x00
,
+ .Header = {.Size = sizeof(
USB_CDC_Descriptor_FunctionalHeader_t), .Type = DTYPE_CSInterface
},
+ .Sub
type = CDC_DSUBTYPE_CSInterface_Header
,
- .
Data = {0x01, 0x10}
+ .
CDCSpecification = VERSION_BCD(01.10),
},
},
- .CDC_Functional_A
bstractControlManagement
=
+ .CDC_Functional_A
CM
=
{
{
- .Header = {.Size = sizeof(
CDC_FUNCTIONAL_DESCRIPTOR(1)), .Type = 0x24
},
- .Sub
Type = 0x02
,
+ .Header = {.Size = sizeof(
USB_CDC_Descriptor_FunctionalACM_t), .Type = DTYPE_CSInterface
},
+ .Sub
type = CDC_DSUBTYPE_CSInterface_ACM
,
- .
Data = {0x06}
+ .
Capabilities = 0x06,
},
.CDC_Functional_Union =
{
},
.CDC_Functional_Union =
{
- .Header = {.Size = sizeof(
CDC_FUNCTIONAL_DESCRIPTOR(2)), .Type = 0x24
},
- .Sub
Type = 0x06
,
+ .Header = {.Size = sizeof(
USB_CDC_Descriptor_FunctionalUnion_t), .Type = DTYPE_CSInterface
},
+ .Sub
type = CDC_DSUBTYPE_CSInterface_Union
,
- .Data = {0x00, 0x01}
+ .MasterInterfaceNumber = 0,
+ .SlaveInterfaceNumber = 1,
},
.CDC_NotificationEndpoint =
},
.CDC_NotificationEndpoint =
@@
-245,19
+246,19
@@
USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.Class = 0x03,
.SubClass = 0x01,
.Class = 0x03,
.SubClass = 0x01,
- .Protocol = HID_BOOT
_MOUSE_PROTOCOL
,
+ .Protocol = HID_BOOT
P_MouseBootProtocol
,
.InterfaceStrIndex = NO_DESCRIPTOR
},
.HID_MouseHID =
{
.InterfaceStrIndex = NO_DESCRIPTOR
},
.HID_MouseHID =
{
- .Header = {.Size = sizeof(USB_HID_Descriptor_HID_t), .Type = DTYPE_HID},
+ .Header = {.Size = sizeof(USB_HID_Descriptor_HID_t), .Type =
HID_
DTYPE_HID},
.HIDSpec = VERSION_BCD(01.11),
.CountryCode = 0x00,
.TotalReportDescriptors = 1,
.HIDSpec = VERSION_BCD(01.11),
.CountryCode = 0x00,
.TotalReportDescriptors = 1,
- .HIDReportType = DTYPE_Report,
+ .HIDReportType =
HID_
DTYPE_Report,
.HIDReportLength = sizeof(MouseReport)
},
.HIDReportLength = sizeof(MouseReport)
},
@@
-349,11
+350,11
@@
uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
}
break;
}
break;
- case DTYPE_HID:
+ case
HID_
DTYPE_HID:
Address = &ConfigurationDescriptor.HID_MouseHID;
Size = sizeof(USB_HID_Descriptor_HID_t);
break;
Address = &ConfigurationDescriptor.HID_MouseHID;
Size = sizeof(USB_HID_Descriptor_HID_t);
break;
- case DTYPE_Report:
+ case
HID_
DTYPE_Report:
Address = &MouseReport;
Size = sizeof(MouseReport);
break;
Address = &MouseReport;
Size = sizeof(MouseReport);
break;