From 16f4492eb4783f3821155d87907ad0db7be9cc90 Mon Sep 17 00:00:00 2001 From: Dean Camera Date: Sun, 17 Jun 2018 13:55:06 +1000 Subject: Move class-specific functional descriptor definitions to their respective classes. --- LUFA/DoxygenPages/ChangeLog.txt | 4 +++ LUFA/DoxygenPages/MigrationInformation.txt | 4 ++- LUFA/Drivers/USB/Class/Common/AudioClassCommon.h | 7 ++++ LUFA/Drivers/USB/Class/Common/CDCClassCommon.h | 41 ++++++++++++++---------- LUFA/Drivers/USB/Core/StdDescriptors.h | 2 -- 5 files changed, 38 insertions(+), 20 deletions(-) (limited to 'LUFA') diff --git a/LUFA/DoxygenPages/ChangeLog.txt b/LUFA/DoxygenPages/ChangeLog.txt index 68acba2d2..251055b47 100644 --- a/LUFA/DoxygenPages/ChangeLog.txt +++ b/LUFA/DoxygenPages/ChangeLog.txt @@ -13,6 +13,10 @@ * - Library Applications: * - Added Microsoft OS Compatibility descriptors to the RNDIS demos for driverless install on Windows 7 and newer * + * Changed: + * - Moved the functional descriptor types DTYPE_CSInterface and DTYPE_CSEndpoint to their respective CDC and Audio class + * drivers, as they are class-defined rather than general descriptor types. + * * Fixed: * - Core: * - Fixed DeviceUsesOUTPipe flag not being set correctly in the HID host class driver (thanks to Wolfgang Schnerring) diff --git a/LUFA/DoxygenPages/MigrationInformation.txt b/LUFA/DoxygenPages/MigrationInformation.txt index 0d0b45703..c456966a8 100644 --- a/LUFA/DoxygenPages/MigrationInformation.txt +++ b/LUFA/DoxygenPages/MigrationInformation.txt @@ -11,7 +11,9 @@ * areas relevant to making older projects compatible with the API changes of each new release. * * \section Sec_MigrationXXXXXX Version XXXXXX - * There is no migration information for this version. + * Device Mode + * - The \c DTYPE_CSInterface enum value has now been moved to the CDC and Audio drivers, as the constants \c CDC_DTYPE_CSInterface and \c AUDIO_DTYPE_CSInterface. + * - The \c DTYPE_CSEndpoint enum value has now been moved to the CDC and Audio drivers, as the constants \c CDC_DTYPE_CSEndpoint and \c AUDIO_DTYPE_CSEndpoint. * * \section Sec_Migration170418 Version 170418 * Device Mode diff --git a/LUFA/Drivers/USB/Class/Common/AudioClassCommon.h b/LUFA/Drivers/USB/Class/Common/AudioClassCommon.h index 16d19b0f9..d855859f1 100644 --- a/LUFA/Drivers/USB/Class/Common/AudioClassCommon.h +++ b/LUFA/Drivers/USB/Class/Common/AudioClassCommon.h @@ -245,6 +245,13 @@ */ }; + /** Enum for the Audio class specific descriptor types. */ + enum AUDIO_DescriptorTypes_t + { + AUDIO_DTYPE_CSInterface = 0x24, /**< Audio class specific Interface functional descriptor. */ + AUDIO_DTYPE_CSEndpoint = 0x25, /**< Audio class specific Endpoint functional descriptor. */ + }; + /** Audio class specific interface description subtypes, for the Audio Control interface. */ enum Audio_CSInterface_AC_SubTypes_t { diff --git a/LUFA/Drivers/USB/Class/Common/CDCClassCommon.h b/LUFA/Drivers/USB/Class/Common/CDCClassCommon.h index 04fb5a127..a6c3c6f33 100644 --- a/LUFA/Drivers/USB/Class/Common/CDCClassCommon.h +++ b/LUFA/Drivers/USB/Class/Common/CDCClassCommon.h @@ -168,26 +168,33 @@ */ }; + /** Enum for the CDC class specific descriptor types. */ + enum CDC_DescriptorTypes_t + { + CDC_DTYPE_CSInterface = 0x24, /**< CDC class specific Interface functional descriptor. */ + CDC_DTYPE_CSEndpoint = 0x25, /**< CDC class specific Endpoint functional descriptor. */ + }; + /** Enum for the CDC class specific interface descriptor subtypes. */ enum CDC_DescriptorSubtypes_t { - CDC_DSUBTYPE_CSInterface_Header = 0x00, /**< CDC class-specific Header functional descriptor. */ - CDC_DSUBTYPE_CSInterface_CallManagement = 0x01, /**< CDC class-specific Call Management functional descriptor. */ - CDC_DSUBTYPE_CSInterface_ACM = 0x02, /**< CDC class-specific Abstract Control Model functional descriptor. */ - CDC_DSUBTYPE_CSInterface_DirectLine = 0x03, /**< CDC class-specific Direct Line functional descriptor. */ - CDC_DSUBTYPE_CSInterface_TelephoneRinger = 0x04, /**< CDC class-specific Telephone Ringer functional descriptor. */ - CDC_DSUBTYPE_CSInterface_TelephoneCall = 0x05, /**< CDC class-specific Telephone Call functional descriptor. */ - CDC_DSUBTYPE_CSInterface_Union = 0x06, /**< CDC class-specific Union functional descriptor. */ - CDC_DSUBTYPE_CSInterface_CountrySelection = 0x07, /**< CDC class-specific Country Selection functional descriptor. */ - CDC_DSUBTYPE_CSInterface_TelephoneOpModes = 0x08, /**< CDC class-specific Telephone Operation Modes functional descriptor. */ - CDC_DSUBTYPE_CSInterface_USBTerminal = 0x09, /**< CDC class-specific USB Terminal functional descriptor. */ - CDC_DSUBTYPE_CSInterface_NetworkChannel = 0x0A, /**< CDC class-specific Network Channel functional descriptor. */ - CDC_DSUBTYPE_CSInterface_ProtocolUnit = 0x0B, /**< CDC class-specific Protocol Unit functional descriptor. */ - CDC_DSUBTYPE_CSInterface_ExtensionUnit = 0x0C, /**< CDC class-specific Extension Unit functional descriptor. */ - CDC_DSUBTYPE_CSInterface_MultiChannel = 0x0D, /**< CDC class-specific Multi-Channel Management functional descriptor. */ - CDC_DSUBTYPE_CSInterface_CAPI = 0x0E, /**< CDC class-specific Common ISDN API functional descriptor. */ - CDC_DSUBTYPE_CSInterface_Ethernet = 0x0F, /**< CDC class-specific Ethernet functional descriptor. */ - CDC_DSUBTYPE_CSInterface_ATM = 0x10, /**< CDC class-specific Asynchronous Transfer Mode functional descriptor. */ + CDC_DSUBTYPE_CSInterface_Header = 0x00, /**< CDC class specific Header functional descriptor. */ + CDC_DSUBTYPE_CSInterface_CallManagement = 0x01, /**< CDC class specific Call Management functional descriptor. */ + CDC_DSUBTYPE_CSInterface_ACM = 0x02, /**< CDC class specific Abstract Control Model functional descriptor. */ + CDC_DSUBTYPE_CSInterface_DirectLine = 0x03, /**< CDC class specific Direct Line functional descriptor. */ + CDC_DSUBTYPE_CSInterface_TelephoneRinger = 0x04, /**< CDC class specific Telephone Ringer functional descriptor. */ + CDC_DSUBTYPE_CSInterface_TelephoneCall = 0x05, /**< CDC class specific Telephone Call functional descriptor. */ + CDC_DSUBTYPE_CSInterface_Union = 0x06, /**< CDC class specific Union functional descriptor. */ + CDC_DSUBTYPE_CSInterface_CountrySelection = 0x07, /**< CDC class specific Country Selection functional descriptor. */ + CDC_DSUBTYPE_CSInterface_TelephoneOpModes = 0x08, /**< CDC class specific Telephone Operation Modes functional descriptor. */ + CDC_DSUBTYPE_CSInterface_USBTerminal = 0x09, /**< CDC class specific USB Terminal functional descriptor. */ + CDC_DSUBTYPE_CSInterface_NetworkChannel = 0x0A, /**< CDC class specific Network Channel functional descriptor. */ + CDC_DSUBTYPE_CSInterface_ProtocolUnit = 0x0B, /**< CDC class specific Protocol Unit functional descriptor. */ + CDC_DSUBTYPE_CSInterface_ExtensionUnit = 0x0C, /**< CDC class specific Extension Unit functional descriptor. */ + CDC_DSUBTYPE_CSInterface_MultiChannel = 0x0D, /**< CDC class specific Multi-Channel Management functional descriptor. */ + CDC_DSUBTYPE_CSInterface_CAPI = 0x0E, /**< CDC class specific Common ISDN API functional descriptor. */ + CDC_DSUBTYPE_CSInterface_Ethernet = 0x0F, /**< CDC class specific Ethernet functional descriptor. */ + CDC_DSUBTYPE_CSInterface_ATM = 0x10, /**< CDC class specific Asynchronous Transfer Mode functional descriptor. */ }; /** Enum for the possible line encoding formats of a virtual serial port. */ diff --git a/LUFA/Drivers/USB/Core/StdDescriptors.h b/LUFA/Drivers/USB/Core/StdDescriptors.h index d8e8d3a3e..0b677637b 100644 --- a/LUFA/Drivers/USB/Core/StdDescriptors.h +++ b/LUFA/Drivers/USB/Core/StdDescriptors.h @@ -215,8 +215,6 @@ DTYPE_Other = 0x07, /**< Indicates that the descriptor is of other type. */ DTYPE_InterfacePower = 0x08, /**< Indicates that the descriptor is an interface power descriptor. */ DTYPE_InterfaceAssociation = 0x0B, /**< Indicates that the descriptor is an interface association descriptor. */ - DTYPE_CSInterface = 0x24, /**< Indicates that the descriptor is a class specific interface descriptor. */ - DTYPE_CSEndpoint = 0x25, /**< Indicates that the descriptor is a class specific endpoint descriptor. */ }; /** Enum for possible Class, Subclass and Protocol values of device and interface descriptors. */ -- cgit v1.2.3