diff options
| author | Dean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28> | 2010-09-28 12:14:06 +0000 |
|---|---|---|
| committer | Dean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28> | 2010-09-28 12:14:06 +0000 |
| commit | 619b05469be722065b93ba53d4effe8acd164a96 (patch) | |
| tree | 9c45545908c0ad14ad8e136e34de00867fc569a7 /Projects/USBtoSerial | |
| parent | 6aa1e09fbe9241cf923ee59d60ee799cf7445a4f (diff) | |
Move out many of the common class driver constants into grouped enums, to make them more managable.
Add new CDC descriptor structs to the CDC class driver, so that the CDC demos can use human readable field names.
Rename prefix for Still Image Host class driver functions from "SImage_" to "SI_" to remain consistent with the rest of the driver.
git-svn-id: http://lufa-lib.googlecode.com/svn/trunk@1497 d5102386-fcda-11dd-9fdb-3debd5008f28
Diffstat (limited to 'Projects/USBtoSerial')
| -rw-r--r-- | Projects/USBtoSerial/Descriptors.c | 23 | ||||
| -rw-r--r-- | Projects/USBtoSerial/Descriptors.h | 6 |
2 files changed, 15 insertions, 14 deletions
diff --git a/Projects/USBtoSerial/Descriptors.c b/Projects/USBtoSerial/Descriptors.c index 7fa6ab99..a7275ae5 100644 --- a/Projects/USBtoSerial/Descriptors.c +++ b/Projects/USBtoSerial/Descriptors.c @@ -114,28 +114,29 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = .InterfaceStrIndex = NO_DESCRIPTOR }, - .CDC_Functional_IntHeader = + .CDC_Functional_Header = { - .Header = {.Size = sizeof(CDC_FUNCTIONAL_DESCRIPTOR(2)), .Type = 0x24}, - .SubType = 0x00, + .Header = {.Size = sizeof(USB_CDC_Descriptor_FunctionalHeader_t), .Type = DTYPE_CSInterface}, + .Subtype = CDC_DSUBTYPE_CSInterface_Header, - .Data = {0x01, 0x10} + .CDCSpecification = VERSION_BCD(01.10), }, - .CDC_Functional_AbstractControlManagement = + .CDC_Functional_ACM = { - .Header = {.Size = sizeof(CDC_FUNCTIONAL_DESCRIPTOR(1)), .Type = 0x24}, - .SubType = 0x02, + .Header = {.Size = sizeof(USB_CDC_Descriptor_FunctionalACM_t), .Type = DTYPE_CSInterface}, + .Subtype = CDC_DSUBTYPE_CSInterface_ACM, - .Data = {0x06} + .Capabilities = 0x06, }, .CDC_Functional_Union = { - .Header = {.Size = sizeof(CDC_FUNCTIONAL_DESCRIPTOR(2)), .Type = 0x24}, - .SubType = 0x06, + .Header = {.Size = sizeof(USB_CDC_Descriptor_FunctionalUnion_t), .Type = DTYPE_CSInterface}, + .Subtype = CDC_DSUBTYPE_CSInterface_Union, - .Data = {0x00, 0x01} + .MasterInterfaceNumber = 0, + .SlaveInterfaceNumber = 1, }, .CDC_NotificationEndpoint = diff --git a/Projects/USBtoSerial/Descriptors.h b/Projects/USBtoSerial/Descriptors.h index 0bd07d32..787796bc 100644 --- a/Projects/USBtoSerial/Descriptors.h +++ b/Projects/USBtoSerial/Descriptors.h @@ -67,9 +67,9 @@ { USB_Descriptor_Configuration_Header_t Config; USB_Descriptor_Interface_t CDC_CCI_Interface; - CDC_FUNCTIONAL_DESCRIPTOR(2) CDC_Functional_IntHeader; - CDC_FUNCTIONAL_DESCRIPTOR(1) CDC_Functional_AbstractControlManagement; - CDC_FUNCTIONAL_DESCRIPTOR(2) CDC_Functional_Union; + USB_CDC_Descriptor_FunctionalHeader_t CDC_Functional_Header; + USB_CDC_Descriptor_FunctionalACM_t CDC_Functional_ACM; + USB_CDC_Descriptor_FunctionalUnion_t CDC_Functional_Union; USB_Descriptor_Endpoint_t CDC_NotificationEndpoint; USB_Descriptor_Interface_t CDC_DCI_Interface; USB_Descriptor_Endpoint_t CDC_DataOutEndpoint; |
