aboutsummaryrefslogtreecommitdiffstats
path: root/LUFA/Drivers/USB/HighLevel/ConfigDescriptor.h
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2009-09-09 13:17:04 +0000
committerDean Camera <dean@fourwalledcubicle.com>2009-09-09 13:17:04 +0000
commitb221e7d175e4b5ca463fdd6d05b8c3fc71bd7c40 (patch)
tree8a546e950f53d4ab3457ec0e238b46d3f0e9c417 /LUFA/Drivers/USB/HighLevel/ConfigDescriptor.h
parent524decdeb3a0a4c7adbeb4af906556e7bc6dd77c (diff)
downloadlufa-b221e7d175e4b5ca463fdd6d05b8c3fc71bd7c40.tar.gz
lufa-b221e7d175e4b5ca463fdd6d05b8c3fc71bd7c40.tar.bz2
lufa-b221e7d175e4b5ca463fdd6d05b8c3fc71bd7c40.zip
Remove USE_NONSTANDARD_DESCRIPTOR_NAMES compile time token, split out standard descriptors into seperate USB_Descriptor_* and USB_StdDescriptor_* structures so that both can be used within the one project.
Add guard to the HID Host Class driver SetProtocol command, to ensure that the device supports boot protocol mode before issuing the request.
Diffstat (limited to 'LUFA/Drivers/USB/HighLevel/ConfigDescriptor.h')
-rw-r--r--LUFA/Drivers/USB/HighLevel/ConfigDescriptor.h16
1 files changed, 2 insertions, 14 deletions
diff --git a/LUFA/Drivers/USB/HighLevel/ConfigDescriptor.h b/LUFA/Drivers/USB/HighLevel/ConfigDescriptor.h
index 9f7b1f60a..be24debba 100644
--- a/LUFA/Drivers/USB/HighLevel/ConfigDescriptor.h
+++ b/LUFA/Drivers/USB/HighLevel/ConfigDescriptor.h
@@ -98,18 +98,10 @@
* This value's meaning depends on the descriptor's placement in the descriptor, but standard type
* values can be accessed in the \ref USB_DescriptorTypes_t enum.
*/
- #if defined(USE_NONSTANDARD_DESCRIPTOR_NAMES) || defined(__DOXYGEN__)
- #define DESCRIPTOR_TYPE(DescriptorPtr) DESCRIPTOR_CAST(DescriptorPtr, USB_Descriptor_Header_t).Type
- #else
- #define DESCRIPTOR_TYPE(DescriptorPtr) DESCRIPTOR_CAST(DescriptorPtr, USB_Descriptor_Header_t).bDescriptorType
- #endif
+ #define DESCRIPTOR_TYPE(DescriptorPtr) DESCRIPTOR_CAST(DescriptorPtr, USB_Descriptor_Header_t).Type
/** Returns the descriptor's size, expressed as the 8-bit value indicating the number of bytes. */
- #if defined(USE_NONSTANDARD_DESCRIPTOR_NAMES) || defined(__DOXYGEN__)
- #define DESCRIPTOR_SIZE(DescriptorPtr) DESCRIPTOR_CAST(DescriptorPtr, USB_Descriptor_Header_t).Size
- #else
- #define DESCRIPTOR_SIZE(DescriptorPtr) DESCRIPTOR_CAST(DescriptorPtr, USB_Descriptor_Header_t).bLength
- #endif
+ #define DESCRIPTOR_SIZE(DescriptorPtr) DESCRIPTOR_CAST(DescriptorPtr, USB_Descriptor_Header_t).Size
/* Type Defines: */
/** Type define for a Configuration Descriptor comparator function (function taking a pointer to an array
@@ -268,11 +260,7 @@
static inline void USB_GetNextDescriptor(uint16_t* const BytesRem,
uint8_t** const CurrConfigLoc)
{
- #if defined(USE_NONSTANDARD_DESCRIPTOR_NAMES)
uint16_t CurrDescriptorSize = DESCRIPTOR_CAST(*CurrConfigLoc, USB_Descriptor_Header_t).Size;
- #else
- uint16_t CurrDescriptorSize = DESCRIPTOR_CAST(*CurrConfigLoc, USB_Descriptor_Header_t).bLength;
- #endif
*CurrConfigLoc += CurrDescriptorSize;
*BytesRem -= CurrDescriptorSize;