aboutsummaryrefslogtreecommitdiffstats
path: root/LUFA/Drivers/USB/HighLevel/StdDescriptors.h
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2010-10-25 12:42:55 +0000
committerDean Camera <dean@fourwalledcubicle.com>2010-10-25 12:42:55 +0000
commit55538dcef34bc3c0f2ada4767c51d11202ac0678 (patch)
treef047601bd6ab339511e24acb00801de8fdebc19c /LUFA/Drivers/USB/HighLevel/StdDescriptors.h
parentb37d77eab32d171ad7b28157a924a4026e2aebd1 (diff)
downloadlufa-55538dcef34bc3c0f2ada4767c51d11202ac0678.tar.gz
lufa-55538dcef34bc3c0f2ada4767c51d11202ac0678.tar.bz2
lufa-55538dcef34bc3c0f2ada4767c51d11202ac0678.zip
Add descriptor class, subclass and protocol constants to the class drivers, modify all demos to use them where possible.
Move out private/internal host class driver constants to the common class driver headers, so that they can be used in the Low Level host mode demos. Ensure all demos, projects and bootloaders use the class driver constants where possible to minimise code repetition.
Diffstat (limited to 'LUFA/Drivers/USB/HighLevel/StdDescriptors.h')
-rw-r--r--LUFA/Drivers/USB/HighLevel/StdDescriptors.h54
1 files changed, 43 insertions, 11 deletions
diff --git a/LUFA/Drivers/USB/HighLevel/StdDescriptors.h b/LUFA/Drivers/USB/HighLevel/StdDescriptors.h
index 2a87619b4..f4682018d 100644
--- a/LUFA/Drivers/USB/HighLevel/StdDescriptors.h
+++ b/LUFA/Drivers/USB/HighLevel/StdDescriptors.h
@@ -203,17 +203,49 @@
/** Enum for the possible standard descriptor types, as given in each descriptor's header. */
enum USB_DescriptorTypes_t
{
- DTYPE_Device = 0x01, /**< Indicates that the descriptor is a device descriptor. */
- DTYPE_Configuration = 0x02, /**< Indicates that the descriptor is a configuration descriptor. */
- DTYPE_String = 0x03, /**< Indicates that the descriptor is a string descriptor. */
- DTYPE_Interface = 0x04, /**< Indicates that the descriptor is an interface descriptor. */
- DTYPE_Endpoint = 0x05, /**< Indicates that the descriptor is an endpoint descriptor. */
- DTYPE_DeviceQualifier = 0x06, /**< Indicates that the descriptor is a device qualifier descriptor. */
- 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. */
+ DTYPE_Device = 0x01, /**< Indicates that the descriptor is a device descriptor. */
+ DTYPE_Configuration = 0x02, /**< Indicates that the descriptor is a configuration descriptor. */
+ DTYPE_String = 0x03, /**< Indicates that the descriptor is a string descriptor. */
+ DTYPE_Interface = 0x04, /**< Indicates that the descriptor is an interface descriptor. */
+ DTYPE_Endpoint = 0x05, /**< Indicates that the descriptor is an endpoint descriptor. */
+ DTYPE_DeviceQualifier = 0x06, /**< Indicates that the descriptor is a device qualifier descriptor. */
+ 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. */
+ enum USB_Descriptor_ClassSubclassProtocol_t
+ {
+ USB_CSCP_NoDeviceClass = 0x00, /**< Descriptor Class value indicating that the device does not belong
+ * to a particular class at the device level.
+ */
+ USB_CSCP_NoDeviceSubclass = 0x00, /**< Descriptor Subclass value indicating that the device does not belong
+ * to a particular subclass at the device level.
+ */
+ USB_CSCP_NoDeviceProtocol = 0x00, /**< Descriptor Protocol value indicating that the device does not belong
+ * to a particular protocol at the device level.
+ */
+ USB_CSCP_VendorSpecificClass = 0xFF, /**< Descriptor Class value indicating that the device/interface belongs
+ * to a vendor specific class.
+ */
+ USB_CSCP_VendorSpecificSubclass = 0xFF, /**< Descriptor Subclass value indicating that the device/interface belongs
+ * to a vendor specific subclass.
+ */
+ USB_CSCP_VendorSpecificProtocol = 0xFF, /**< Descriptor Protocol value indicating that the device/interface belongs
+ * to a vendor specific protocol.
+ */
+ USB_CSCP_IADDeviceClass = 0xEF, /**< Descriptor Class value indicating that the device belongs to the
+ * Interface Association Descriptor class.
+ */
+ USB_CSCP_IADDeviceSubclass = 0x02, /**< Descriptor Subclass value indicating that the device belongs to the
+ * Interface Association Descriptor subclass.
+ */
+ USB_CSCP_IADDeviceProtocol = 0x01, /**< Descriptor Protocol value indicating that the device belongs to the
+ * Interface Association Descriptor protocol.
+ */
};
/* Type Defines: */