diff options
author | Dean Camera <dean@fourwalledcubicle.com> | 2011-07-14 03:18:30 +0000 |
---|---|---|
committer | Dean Camera <dean@fourwalledcubicle.com> | 2011-07-14 03:18:30 +0000 |
commit | 3f38ea631771e7821765dcb73ce1c64f68d41172 (patch) | |
tree | 2c57ca3215b244924566490e0ba96cec9bd2064e | |
parent | f4528c4aefcadd3342e9de2360d4c48196394fde (diff) | |
download | lufa-3f38ea631771e7821765dcb73ce1c64f68d41172.tar.gz lufa-3f38ea631771e7821765dcb73ce1c64f68d41172.tar.bz2 lufa-3f38ea631771e7821765dcb73ce1c64f68d41172.zip |
Added Device Qualifier standard descriptor structure definitions USB_StdDescriptor_DeviceQualifier_t and USB_Descriptor_DeviceQualifier_t.
-rw-r--r-- | LUFA/Drivers/USB/Core/StdDescriptors.h | 47 | ||||
-rw-r--r-- | LUFA/ManPages/ChangeLog.txt | 1 |
2 files changed, 48 insertions, 0 deletions
diff --git a/LUFA/Drivers/USB/Core/StdDescriptors.h b/LUFA/Drivers/USB/Core/StdDescriptors.h index 0399302dc..1cb85d5cb 100644 --- a/LUFA/Drivers/USB/Core/StdDescriptors.h +++ b/LUFA/Drivers/USB/Core/StdDescriptors.h @@ -379,6 +379,53 @@ */ } ATTR_PACKED USB_StdDescriptor_Device_t; + /** \brief Standard USB Device Qualifier Descriptor (LUFA naming conventions). + * + * Type define for a standard Device Qualifier Descriptor. This structure uses LUFA-specific element names + * to make each element's purpose clearer. + * + * \see \ref USB_StdDescriptor_DeviceQualifier_t for the version of this type with standard element names. + */ + typedef struct + { + USB_Descriptor_Header_t Header; /**< Descriptor header, including type and size. */ + + uint16_t USBSpecification; /**< BCD of the supported USB specification. */ + uint8_t Class; /**< USB device class. */ + uint8_t SubClass; /**< USB device subclass. */ + uint8_t Protocol; /**< USB device protocol. */ + + uint8_t Endpoint0Size; /**< Size of the control (address 0) endpoint's bank in bytes. */ + uint8_t NumberOfConfigurations; /**< Total number of configurations supported by + * the device. + */ + uint8_t Reserved; /**< Reserved for future use, must be 0. */ + } ATTR_PACKED USB_Descriptor_DeviceQualifier_t; + + /** \brief Standard USB Device Qualifier Descriptor (USB-IF naming conventions). + * + * Type define for a standard Device Qualifier Descriptor. This structure uses the relevant standard's given element names + * to ensure compatibility with the standard. + * + * \see \ref USB_Descriptor_DeviceQualifier_t for the version of this type with non-standard LUFA specific element names. + */ + typedef struct + { + uint8_t bLength; /**< Size of the descriptor, in bytes. */ + uint8_t bDescriptorType; /**< Type of the descriptor, either a value in \ref USB_DescriptorTypes_t or a value + * given by the specific class. + */ + uint16_t bcdUSB; /**< BCD of the supported USB specification. */ + uint8_t bDeviceClass; /**< USB device class. */ + uint8_t bDeviceSubClass; /**< USB device subclass. */ + uint8_t bDeviceProtocol; /**< USB device protocol. */ + uint8_t bMaxPacketSize0; /**< Size of the control (address 0) endpoint's bank in bytes. */ + uint8_t bNumConfigurations; /**< Total number of configurations supported by + * the device. + */ + uint8_t bReserved; /**< Reserved for future use, must be 0. */ + } ATTR_PACKED USB_StdDescriptor_DeviceQualifier_t; + /** \brief Standard USB Configuration Descriptor (LUFA naming conventions). * * Type define for a standard Configuration Descriptor header. This structure uses LUFA-specific element names diff --git a/LUFA/ManPages/ChangeLog.txt b/LUFA/ManPages/ChangeLog.txt index 3b01ffeb7..b46ab4d36 100644 --- a/LUFA/ManPages/ChangeLog.txt +++ b/LUFA/ManPages/ChangeLog.txt @@ -28,6 +28,7 @@ * - Added new USB_Host_GetDeviceStatus() function to the host standard request function set * - Added AVR USB XMEGA architecture port (currently incomplete/experimental) * - Added new STRINGIFY() and STRINGIFY_EXPANDED() convenience macros + * - Added Device Qualifier standard descriptor structure definitions USB_StdDescriptor_DeviceQualifier_t and USB_Descriptor_DeviceQualifier_t * - Library Applications: * - Added RNDIS device mode to the Webserver project * - Added new incomplete AndroidAccessoryHost Host LowLevel demo |