projects
/
pub
/
USBasp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Partial commit: Rename references to Drivers/AT90USBXXX to Drivers/Peripheral.
[pub/USBasp.git]
/
LUFA
/
Drivers
/
USB
/
Class
/
ConfigDescriptor.h
diff --git
a/LUFA/Drivers/USB/Class/ConfigDescriptor.h
b/LUFA/Drivers/USB/Class/ConfigDescriptor.h
index
d1f8927
..
d5fcbb0
100644
(file)
--- a/
LUFA/Drivers/USB/Class/ConfigDescriptor.h
+++ b/
LUFA/Drivers/USB/Class/ConfigDescriptor.h
@@
-35,6
+35,14
@@
* and other descriptor data can be extracted and used as needed.
\r
*/
\r
\r
* and other descriptor data can be extracted and used as needed.
\r
*/
\r
\r
+/** \ingroup Group_Descriptors
\r
+ * @defgroup Group_ConfigDescriptorParser Configuration Descriptor Parser
\r
+ *
\r
+ * Functions, macros, variables, enums and types related to the parsing of Configuration Descriptors.
\r
+ *
\r
+ * @{
\r
+ */
\r
+
\r
#ifndef __CONFIGDESCRIPTOR_H__
\r
#define __CONFIGDESCRIPTOR_H__
\r
\r
#ifndef __CONFIGDESCRIPTOR_H__
\r
#define __CONFIGDESCRIPTOR_H__
\r
\r
@@
-52,6
+60,11
@@
\r
/* Public Interface - May be used in end-application: */
\r
/* Macros: */
\r
\r
/* Public Interface - May be used in end-application: */
\r
/* Macros: */
\r
+ /** Mask for determining the type of an endpoint from an endpoint descriptor. This should then be compared
\r
+ * with the EP_TYPE_* masks to determine the exact type of the endpoint.
\r
+ */
\r
+ #define EP_TYPE_MASK 0x03
\r
+
\r
/** Casts a pointer to a descriptor inside the configuration descriptor into a pointer to the given
\r
* descriptor type.
\r
*
\r
/** Casts a pointer to a descriptor inside the configuration descriptor into a pointer to the given
\r
* descriptor type.
\r
*
\r
@@
-97,14
+110,14
@@
#define DESCRIPTOR_SIZE(DescriptorPtr) DESCRIPTOR_CAST(DescriptorPtr, USB_Descriptor_Header_t).bLength
\r
#endif
\r
\r
#define DESCRIPTOR_SIZE(DescriptorPtr) DESCRIPTOR_CAST(DescriptorPtr, USB_Descriptor_Header_t).bLength
\r
#endif
\r
\r
- /** Creates a prototype for or begins a descriptor compar
itor routine. Descriptor compari
tor routines are
\r
+ /** Creates a prototype for or begins a descriptor compar
ator routine. Descriptor compara
tor routines are
\r
* small search routines which are passed a pointer to the current sub descriptor in the configuration
\r
* descriptor, and which analyse the sub descriptor to determine whether or not it matches the routine's
\r
* small search routines which are passed a pointer to the current sub descriptor in the configuration
\r
* descriptor, and which analyse the sub descriptor to determine whether or not it matches the routine's
\r
- * search parameters. Compar
i
tor routines provide a powerful way to scan through the config descriptor
\r
+ * search parameters. Compar
a
tor routines provide a powerful way to scan through the config descriptor
\r
* for certain descriptors matching unique criteria.
\r
*
\r
* for certain descriptors matching unique criteria.
\r
*
\r
- * Compar
i
tor routines are passed in a single pointer named CurrentDescriptor, and should return a value
\r
- * of a member of the DS
EARCH
_Return_ErrorCodes_t enum.
\r
+ * Compar
a
tor routines are passed in a single pointer named CurrentDescriptor, and should return a value
\r
+ * of a member of the DS
earch
_Return_ErrorCodes_t enum.
\r
*/
\r
#define DESCRIPTOR_COMPARATOR(name) uint8_t DCOMP_##name (void* const CurrentDescriptor)
\r
\r
*/
\r
#define DESCRIPTOR_COMPARATOR(name) uint8_t DCOMP_##name (void* const CurrentDescriptor)
\r
\r
@@
-117,9
+130,9
@@
*
\r
* \param DSize Pointer to an int storing the remaining bytes in the configuration descriptor
\r
* \param DPos Pointer to the current position in the configuration descriptor
\r
*
\r
* \param DSize Pointer to an int storing the remaining bytes in the configuration descriptor
\r
* \param DPos Pointer to the current position in the configuration descriptor
\r
- * \param DSearch Name of the compar
i
tor search function to use on the configuration descriptor
\r
+ * \param DSearch Name of the compar
a
tor search function to use on the configuration descriptor
\r
*
\r
*
\r
- * \return Value of one of the members of the DS
EARCH
_Comp_Return_ErrorCodes_t enum
\r
+ * \return Value of one of the members of the DS
earch
_Comp_Return_ErrorCodes_t enum
\r
*
\r
* Usage Example:
\r
* \code
\r
*
\r
* Usage Example:
\r
* \code
\r
@@
-146,7
+159,7
@@
USB_Host_GetNextDescriptorComp_P(DSize, DPos, DCOMP_##DSearch)
\r
/* Enums: */
\r
/** Enum for return values of a descriptor comparator made with DESCRIPTOR_COMPARATOR. */
\r
USB_Host_GetNextDescriptorComp_P(DSize, DPos, DCOMP_##DSearch)
\r
/* Enums: */
\r
/** Enum for return values of a descriptor comparator made with DESCRIPTOR_COMPARATOR. */
\r
- enum DS
EARCH
_Return_ErrorCodes_t
\r
+ enum DS
earch
_Return_ErrorCodes_t
\r
{
\r
Descriptor_Search_Found = 0, /**< Current descriptor matches comparator criteria. */
\r
Descriptor_Search_Fail = 1, /**< No further descriptor could possibly match criteria, fail the search. */
\r
{
\r
Descriptor_Search_Found = 0, /**< Current descriptor matches comparator criteria. */
\r
Descriptor_Search_Fail = 1, /**< No further descriptor could possibly match criteria, fail the search. */
\r
@@
-154,9
+167,9
@@
};
\r
\r
/** Enum for return values of USB_Host_GetNextDescriptorComp() */
\r
};
\r
\r
/** Enum for return values of USB_Host_GetNextDescriptorComp() */
\r
- enum DS
EARCH
_Comp_Return_ErrorCodes_t
\r
+ enum DS
earch
_Comp_Return_ErrorCodes_t
\r
{
\r
{
\r
- Descriptor_Search_Comp_Found = 0, /**< Configuration descriptor now points to decriptor which matches
\r
+ Descriptor_Search_Comp_Found = 0, /**< Configuration descriptor now points to de
s
criptor which matches
\r
* search criteria of the given comparator function. */
\r
Descriptor_Search_Comp_Fail = 1, /**< Comparator function returned Descriptor_Search_Fail. */
\r
Descriptor_Search_Comp_EndOfDescriptor = 2, /**< End of configuration descriptor reached before match found. */
\r
* search criteria of the given comparator function. */
\r
Descriptor_Search_Comp_Fail = 1, /**< Comparator function returned Descriptor_Search_Fail. */
\r
Descriptor_Search_Comp_EndOfDescriptor = 2, /**< End of configuration descriptor reached before match found. */
\r
@@
-254,5
+267,7
@@
#if defined(__cplusplus)
\r
}
\r
#endif
\r
#if defined(__cplusplus)
\r
}
\r
#endif
\r
-
\r
+
\r
#endif
\r
#endif
\r
+
\r
+/** @} */
\r