projects
/
pub
/
USBasp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Renamed Serial_Stream driver to SerialStream to remain consistent with the rest of...
[pub/USBasp.git]
/
LUFA
/
Drivers
/
USB
/
HighLevel
/
StdDescriptors.h
diff --git
a/LUFA/Drivers/USB/HighLevel/StdDescriptors.h
b/LUFA/Drivers/USB/HighLevel/StdDescriptors.h
index
491e817
..
a1a0518
100644
(file)
--- a/
LUFA/Drivers/USB/HighLevel/StdDescriptors.h
+++ b/
LUFA/Drivers/USB/HighLevel/StdDescriptors.h
@@
-44,6
+44,14
@@
* named counterparts, thus they can be correlated easily with the official USB specification.
\r
*/
\r
\r
* named counterparts, thus they can be correlated easily with the official USB specification.
\r
*/
\r
\r
+/** \ingroup Group_USB
\r
+ * @defgroup Group_Descriptors USB Descriptors
\r
+ *
\r
+ * Functions, macros, variables, enums and types related to standard USB descriptors.
\r
+ *
\r
+ * @{
\r
+ */
\r
+
\r
#ifndef __USBDESCRIPTORS_H__
\r
#define __USBDESCRIPTORS_H__
\r
\r
#ifndef __USBDESCRIPTORS_H__
\r
#define __USBDESCRIPTORS_H__
\r
\r
@@
-52,7
+60,7
@@
#include <stdbool.h>
\r
\r
#include "../../../Common/Common.h"
\r
#include <stdbool.h>
\r
\r
#include "../../../Common/Common.h"
\r
- #include "
../LowLevel/
USBMode.h"
\r
+ #include "USBMode.h"
\r
#include "Events.h"
\r
\r
#if defined(USB_CAN_BE_DEVICE)
\r
#include "Events.h"
\r
\r
#if defined(USB_CAN_BE_DEVICE)
\r
@@
-108,69
+116,69
@@
* descriptor's ConfigAttributes value to indicate that the specified configuration can draw its power
\r
* from the host's VBUS line.
\r
*/
\r
* descriptor's ConfigAttributes value to indicate that the specified configuration can draw its power
\r
* from the host's VBUS line.
\r
*/
\r
- #define USB_CONFIG_ATTR_BUSPOWERED 0
b1000000
0
\r
+ #define USB_CONFIG_ATTR_BUSPOWERED 0
x8
0
\r
\r
/** Can be masked with other configuration descriptor attributes for a USB_Descriptor_Configuration_Header_t
\r
* descriptor's ConfigAttributes value to indicate that the specified configuration can draw its power
\r
* from the device's own power source.
\r
*/
\r
\r
/** Can be masked with other configuration descriptor attributes for a USB_Descriptor_Configuration_Header_t
\r
* descriptor's ConfigAttributes value to indicate that the specified configuration can draw its power
\r
* from the device's own power source.
\r
*/
\r
- #define USB_CONFIG_ATTR_SELFPOWERED 0
b1100000
0
\r
+ #define USB_CONFIG_ATTR_SELFPOWERED 0
xC
0
\r
\r
/** Can be masked with other configuration descriptor attributes for a USB_Descriptor_Configuration_Header_t
\r
* descriptor's ConfigAttributes value to indicate that the specified configuration supports the
\r
* remote wakeup feature of the USB standard, allowing a suspended USB device to wake up the host upon
\r
* request.
\r
*/
\r
\r
/** Can be masked with other configuration descriptor attributes for a USB_Descriptor_Configuration_Header_t
\r
* descriptor's ConfigAttributes value to indicate that the specified configuration supports the
\r
* remote wakeup feature of the USB standard, allowing a suspended USB device to wake up the host upon
\r
* request.
\r
*/
\r
- #define USB_CONFIG_ATTR_REMOTEWAKEUP 0
b1010000
0
\r
+ #define USB_CONFIG_ATTR_REMOTEWAKEUP 0
xA
0
\r
\r
/** Can be masked with other endpoint descriptor attributes for a USB_Descriptor_Endpoint_t descriptor's
\r
* Attributes value to indicate that the specified endpoint is not synchronized.
\r
*
\r
* \see The USB specification for more details on the possible Endpoint attributes.
\r
*/
\r
\r
/** Can be masked with other endpoint descriptor attributes for a USB_Descriptor_Endpoint_t descriptor's
\r
* Attributes value to indicate that the specified endpoint is not synchronized.
\r
*
\r
* \see The USB specification for more details on the possible Endpoint attributes.
\r
*/
\r
- #define ENDPOINT_ATTR_NO_SYNC (0
b00
<< 2)
\r
+ #define ENDPOINT_ATTR_NO_SYNC (0 << 2)
\r
\r
/** Can be masked with other endpoint descriptor attributes for a USB_Descriptor_Endpoint_t descriptor's
\r
* Attributes value to indicate that the specified endpoint is asynchronous.
\r
*
\r
* \see The USB specification for more details on the possible Endpoint attributes.
\r
*/
\r
\r
/** Can be masked with other endpoint descriptor attributes for a USB_Descriptor_Endpoint_t descriptor's
\r
* Attributes value to indicate that the specified endpoint is asynchronous.
\r
*
\r
* \see The USB specification for more details on the possible Endpoint attributes.
\r
*/
\r
- #define ENDPOINT_ATTR_ASYNC (
0b0
1 << 2)
\r
+ #define ENDPOINT_ATTR_ASYNC (1 << 2)
\r
\r
/** Can be masked with other endpoint descriptor attributes for a USB_Descriptor_Endpoint_t descriptor's
\r
* Attributes value to indicate that the specified endpoint is adaptive.
\r
*
\r
* \see The USB specification for more details on the possible Endpoint attributes.
\r
*/
\r
\r
/** Can be masked with other endpoint descriptor attributes for a USB_Descriptor_Endpoint_t descriptor's
\r
* Attributes value to indicate that the specified endpoint is adaptive.
\r
*
\r
* \see The USB specification for more details on the possible Endpoint attributes.
\r
*/
\r
- #define ENDPOINT_ATTR_ADAPTIVE (
0b10
<< 2)
\r
+ #define ENDPOINT_ATTR_ADAPTIVE (
2
<< 2)
\r
\r
/** Can be masked with other endpoint descriptor attributes for a USB_Descriptor_Endpoint_t descriptor's
\r
* Attributes value to indicate that the specified endpoint is synchronized.
\r
*
\r
* \see The USB specification for more details on the possible Endpoint attributes.
\r
*/
\r
\r
/** Can be masked with other endpoint descriptor attributes for a USB_Descriptor_Endpoint_t descriptor's
\r
* Attributes value to indicate that the specified endpoint is synchronized.
\r
*
\r
* \see The USB specification for more details on the possible Endpoint attributes.
\r
*/
\r
- #define ENDPOINT_ATTR_SYNC (
0b11
<< 2)
\r
+ #define ENDPOINT_ATTR_SYNC (
3
<< 2)
\r
\r
/** Can be masked with other endpoint descriptor attributes for a USB_Descriptor_Endpoint_t descriptor's
\r
* Attributes value to indicate that the specified endpoint is used for data transfers.
\r
*
\r
* \see The USB specification for more details on the possible Endpoint usage attributes.
\r
*/
\r
\r
/** Can be masked with other endpoint descriptor attributes for a USB_Descriptor_Endpoint_t descriptor's
\r
* Attributes value to indicate that the specified endpoint is used for data transfers.
\r
*
\r
* \see The USB specification for more details on the possible Endpoint usage attributes.
\r
*/
\r
- #define ENDPOINT_USAGE_DATA (0
b00
<< 4)
\r
+ #define ENDPOINT_USAGE_DATA (0 << 4)
\r
\r
/** Can be masked with other endpoint descriptor attributes for a USB_Descriptor_Endpoint_t descriptor's
\r
* Attributes value to indicate that the specified endpoint is used for feedback.
\r
*
\r
* \see The USB specification for more details on the possible Endpoint usage attributes.
\r
*/
\r
\r
/** Can be masked with other endpoint descriptor attributes for a USB_Descriptor_Endpoint_t descriptor's
\r
* Attributes value to indicate that the specified endpoint is used for feedback.
\r
*
\r
* \see The USB specification for more details on the possible Endpoint usage attributes.
\r
*/
\r
- #define ENDPOINT_USAGE_FEEDBACK (
0b0
1 << 4)
\r
+ #define ENDPOINT_USAGE_FEEDBACK (1 << 4)
\r
\r
/** Can be masked with other endpoint descriptor attributes for a USB_Descriptor_Endpoint_t descriptor's
\r
* Attributes value to indicate that the specified endpoint is used for implicit feedback.
\r
*
\r
* \see The USB specification for more details on the possible Endpoint usage attributes.
\r
*/
\r
\r
/** Can be masked with other endpoint descriptor attributes for a USB_Descriptor_Endpoint_t descriptor's
\r
* Attributes value to indicate that the specified endpoint is used for implicit feedback.
\r
*
\r
* \see The USB specification for more details on the possible Endpoint usage attributes.
\r
*/
\r
- #define ENDPOINT_USAGE_IMPLICIT_FEEDBACK (
0b10
<< 4)
\r
+ #define ENDPOINT_USAGE_IMPLICIT_FEEDBACK (
2
<< 4)
\r
\r
/** Gives a void pointer to the specified descriptor (of any type). */
\r
#define DESCRIPTOR_ADDRESS(Descriptor) ((void*)&Descriptor)
\r
\r
/** Gives a void pointer to the specified descriptor (of any type). */
\r
#define DESCRIPTOR_ADDRESS(Descriptor) ((void*)&Descriptor)
\r
@@
-472,12
+480,6
@@
int16_t bString[];
\r
#endif
\r
} USB_Descriptor_String_t;
\r
int16_t bString[];
\r
#endif
\r
} USB_Descriptor_String_t;
\r
-
\r
- typedef struct
\r
- {
\r
- uint16_t Size;
\r
- void* Address;
\r
- } USB_Descriptor_Details_t;
\r
\r
/* Function Prototypes: */
\r
/** Function to retrieve a given descriptor's size and memory location from the given descriptor type value,
\r
\r
/* Function Prototypes: */
\r
/** Function to retrieve a given descriptor's size and memory location from the given descriptor type value,
\r
@@
-519,5
+521,7
@@
#if defined(__cplusplus)
\r
}
\r
#endif
\r
#if defined(__cplusplus)
\r
}
\r
#endif
\r
-
\r
+
\r
#endif
\r
#endif
\r
+
\r
+/** @} */
\r