aboutsummaryrefslogtreecommitdiffstats
path: root/Demos/Device/LowLevel/DualVirtualSerial/Descriptors.c
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2010-09-28 13:27:19 +0000
committerDean Camera <dean@fourwalledcubicle.com>2010-09-28 13:27:19 +0000
commitb2a30cd48a0621b360d23dd430c646d22e943d09 (patch)
tree99cea070a86b80281a4f4c0d45b3fb3c776528b0 /Demos/Device/LowLevel/DualVirtualSerial/Descriptors.c
parent713670043a1edb714461fc83c2b8817f3db99961 (diff)
downloadlufa-b2a30cd48a0621b360d23dd430c646d22e943d09.tar.gz
lufa-b2a30cd48a0621b360d23dd430c646d22e943d09.tar.bz2
lufa-b2a30cd48a0621b360d23dd430c646d22e943d09.zip
Added CDC functional descriptor structs to the Low Level CDC demos and CDC class bootloader, to improve the readability of the descriptors.
Fixed BootloaderCDC project failing on some operating systems due to removed Line Encoding options (thanks to Alexey Belyaev).
Diffstat (limited to 'Demos/Device/LowLevel/DualVirtualSerial/Descriptors.c')
-rw-r--r--Demos/Device/LowLevel/DualVirtualSerial/Descriptors.c46
1 files changed, 24 insertions, 22 deletions
diff --git a/Demos/Device/LowLevel/DualVirtualSerial/Descriptors.c b/Demos/Device/LowLevel/DualVirtualSerial/Descriptors.c
index cce727044..45f1d4eb4 100644
--- a/Demos/Device/LowLevel/DualVirtualSerial/Descriptors.c
+++ b/Demos/Device/LowLevel/DualVirtualSerial/Descriptors.c
@@ -128,28 +128,29 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.InterfaceStrIndex = NO_DESCRIPTOR
},
- .CDC1_Functional_IntHeader =
+ .CDC1_Functional_Header =
{
- .Header = {.Size = sizeof(CDC_FUNCTIONAL_DESCRIPTOR(2)), .Type = 0x24},
- .SubType = 0x00,
+ .Header = {.Size = sizeof(USB_Descriptor_CDC_FunctionalHeader_t), .Type = DTYPE_CSInterface},
+ .Subtype = 0x00,
- .Data = {0x01, 0x10}
+ .CDCSpecification = VERSION_BCD(01.10),
},
- .CDC1_Functional_AbstractControlManagement =
+ .CDC1_Functional_ACM =
{
- .Header = {.Size = sizeof(CDC_FUNCTIONAL_DESCRIPTOR(1)), .Type = 0x24},
- .SubType = 0x02,
+ .Header = {.Size = sizeof(USB_Descriptor_CDC_FunctionalACM_t), .Type = DTYPE_CSInterface},
+ .Subtype = 0x02,
- .Data = {0x06}
+ .Capabilities = 0x06,
},
.CDC1_Functional_Union =
{
- .Header = {.Size = sizeof(CDC_FUNCTIONAL_DESCRIPTOR(2)), .Type = 0x24},
- .SubType = 0x06,
+ .Header = {.Size = sizeof(USB_Descriptor_CDC_FunctionalUnion_t), .Type = DTYPE_CSInterface},
+ .Subtype = 0x06,
- .Data = {0x00, 0x01}
+ .MasterInterfaceNumber = 0,
+ .SlaveInterfaceNumber = 1,
},
.CDC1_ManagementEndpoint =
@@ -228,28 +229,29 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.InterfaceStrIndex = NO_DESCRIPTOR
},
- .CDC2_Functional_IntHeader =
+ .CDC2_Functional_Header =
{
- .Header = {.Size = sizeof(CDC_FUNCTIONAL_DESCRIPTOR(2)), .Type = 0x24},
- .SubType = 0x00,
+ .Header = {.Size = sizeof(USB_Descriptor_CDC_FunctionalHeader_t), .Type = DTYPE_CSInterface},
+ .Subtype = 0x00,
- .Data = {0x01, 0x10}
+ .CDCSpecification = VERSION_BCD(01.10),
},
- .CDC2_Functional_AbstractControlManagement =
+ .CDC2_Functional_ACM =
{
- .Header = {.Size = sizeof(CDC_FUNCTIONAL_DESCRIPTOR(1)), .Type = 0x24},
- .SubType = 0x02,
+ .Header = {.Size = sizeof(USB_Descriptor_CDC_FunctionalACM_t), .Type = DTYPE_CSInterface},
+ .Subtype = 0x02,
- .Data = {0x06}
+ .Capabilities = 0x06,
},
.CDC2_Functional_Union =
{
- .Header = {.Size = sizeof(CDC_FUNCTIONAL_DESCRIPTOR(2)), .Type = 0x24},
- .SubType = 0x06,
+ .Header = {.Size = sizeof(USB_Descriptor_CDC_FunctionalUnion_t), .Type = DTYPE_CSInterface},
+ .Subtype = 0x06,
- .Data = {0x02, 0x03}
+ .MasterInterfaceNumber = 2,
+ .SlaveInterfaceNumber = 3,
},
.CDC2_ManagementEndpoint =