aboutsummaryrefslogtreecommitdiff
path: root/LUFA/Drivers/USB
diff options
context:
space:
mode:
authorDean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28>2011-09-22 05:55:32 +0000
committerDean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28>2011-09-22 05:55:32 +0000
commite4d9bb8dcbf17dd129c442ba03e13f6e213cfedf (patch)
treec96dc45709c9361dceb8c23a7c759990562ac424 /LUFA/Drivers/USB
parent811229c178a5d25c06fb7a217ac7a041741d9275 (diff)
Add missing "used" attribute to ATTR_INIT_SECTION to ensure functions declared with that meta-attribute are not discarded by the linker.
Add missing function and definition documentation. git-svn-id: http://lufa-lib.googlecode.com/svn/trunk@1932 d5102386-fcda-11dd-9fdb-3debd5008f28
Diffstat (limited to 'LUFA/Drivers/USB')
-rw-r--r--LUFA/Drivers/USB/Class/Common/RNDIS.h3
-rw-r--r--LUFA/Drivers/USB/Class/Host/MassStorage.h1
-rw-r--r--LUFA/Drivers/USB/Class/Host/Printer.h1
-rw-r--r--LUFA/Drivers/USB/Core/AVR8/Device_AVR8.h2
-rw-r--r--LUFA/Drivers/USB/Core/AVR8/Host_AVR8.h2
-rw-r--r--LUFA/Drivers/USB/Core/DeviceStandardReq.c7
-rw-r--r--LUFA/Drivers/USB/Core/StdDescriptors.h2
-rw-r--r--LUFA/Drivers/USB/Core/UC3/Device_UC3.h2
-rw-r--r--LUFA/Drivers/USB/Core/UC3/Host_UC3.h2
-rw-r--r--LUFA/Drivers/USB/Core/XMEGA/Device_XMEGA.h2
10 files changed, 23 insertions, 1 deletions
diff --git a/LUFA/Drivers/USB/Class/Common/RNDIS.h b/LUFA/Drivers/USB/Class/Common/RNDIS.h
index 05ab13b7..f931de82 100644
--- a/LUFA/Drivers/USB/Class/Common/RNDIS.h
+++ b/LUFA/Drivers/USB/Class/Common/RNDIS.h
@@ -114,7 +114,10 @@
#define REMOTE_NDIS_MEDIA_STATE_DISCONNECTED 0x00000001UL
//@}
+ /** \name RNDIS Media Types */
+ //@{
#define REMOTE_NDIS_MEDIUM_802_3 0x00000000UL
+ //@}
/** \name RNDIS Connection Types */
//@{
diff --git a/LUFA/Drivers/USB/Class/Host/MassStorage.h b/LUFA/Drivers/USB/Class/Host/MassStorage.h
index ff336f8c..f0dd475f 100644
--- a/LUFA/Drivers/USB/Class/Host/MassStorage.h
+++ b/LUFA/Drivers/USB/Class/Host/MassStorage.h
@@ -122,6 +122,7 @@
} SCSI_Capacity_t;
/* Enums: */
+ /** Enum for the possible error codes returned by the \ref MS_Host_ConfigurePipes() function. */
enum MS_Host_EnumerationFailure_ErrorCodes_t
{
MS_ENUMERROR_NoError = 0, /**< Configuration Descriptor was processed successfully. */
diff --git a/LUFA/Drivers/USB/Class/Host/Printer.h b/LUFA/Drivers/USB/Class/Host/Printer.h
index d9de036a..9f5c8161 100644
--- a/LUFA/Drivers/USB/Class/Host/Printer.h
+++ b/LUFA/Drivers/USB/Class/Host/Printer.h
@@ -105,6 +105,7 @@
} USB_ClassInfo_PRNT_Host_t;
/* Enums: */
+ /** Enum for the possible error codes returned by the \ref PRNT_Host_ConfigurePipes() function. */
enum PRNT_Host_EnumerationFailure_ErrorCodes_t
{
PRNT_ENUMERROR_NoError = 0, /**< Configuration Descriptor was processed successfully. */
diff --git a/LUFA/Drivers/USB/Core/AVR8/Device_AVR8.h b/LUFA/Drivers/USB/Core/AVR8/Device_AVR8.h
index 08604ac1..ec41f5de 100644
--- a/LUFA/Drivers/USB/Core/AVR8/Device_AVR8.h
+++ b/LUFA/Drivers/USB/Core/AVR8/Device_AVR8.h
@@ -148,6 +148,8 @@
/* Inline Functions: */
/** Returns the current USB frame number, when in device mode. Every millisecond the USB bus is active (i.e. enumerated to a host)
* the frame number is incremented by one.
+ *
+ * \return Current USB frame number from the USB controller.
*/
static inline uint16_t USB_Device_GetFrameNumber(void) ATTR_ALWAYS_INLINE ATTR_WARN_UNUSED_RESULT;
static inline uint16_t USB_Device_GetFrameNumber(void)
diff --git a/LUFA/Drivers/USB/Core/AVR8/Host_AVR8.h b/LUFA/Drivers/USB/Core/AVR8/Host_AVR8.h
index b97c45c7..8dbeaa27 100644
--- a/LUFA/Drivers/USB/Core/AVR8/Host_AVR8.h
+++ b/LUFA/Drivers/USB/Core/AVR8/Host_AVR8.h
@@ -128,6 +128,8 @@
/* Inline Functions: */
/** Returns the current USB frame number, when in host mode. Every millisecond the USB bus is active (i.e. not suspended)
* the frame number is incremented by one.
+ *
+ * \return Current USB frame number from the USB controller.
*/
static inline uint16_t USB_Host_GetFrameNumber(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;
static inline uint16_t USB_Host_GetFrameNumber(void)
diff --git a/LUFA/Drivers/USB/Core/DeviceStandardReq.c b/LUFA/Drivers/USB/Core/DeviceStandardReq.c
index c3a111e3..59d3f289 100644
--- a/LUFA/Drivers/USB/Core/DeviceStandardReq.c
+++ b/LUFA/Drivers/USB/Core/DeviceStandardReq.c
@@ -48,11 +48,18 @@ bool USB_Device_RemoteWakeupEnabled;
void USB_Device_ProcessControlRequest(void)
{
+ #if defined(ARCH_BIG_ENDIAN)
USB_ControlRequest.bmRequestType = Endpoint_Read_8();
USB_ControlRequest.bRequest = Endpoint_Read_8();
USB_ControlRequest.wValue = Endpoint_Read_16_LE();
USB_ControlRequest.wIndex = Endpoint_Read_16_LE();
USB_ControlRequest.wLength = Endpoint_Read_16_LE();
+ #else
+ uint8_t* RequestHeader = (uint8_t*)&USB_ControlRequest;
+
+ for (uint8_t RequestHeaderByte = 0; RequestHeaderByte < sizeof(USB_Request_Header_t); RequestHeaderByte++)
+ *(RequestHeader++) = Endpoint_Read_8();
+ #endif
EVENT_USB_Device_ControlRequest();
diff --git a/LUFA/Drivers/USB/Core/StdDescriptors.h b/LUFA/Drivers/USB/Core/StdDescriptors.h
index a37ea09e..f5bacf80 100644
--- a/LUFA/Drivers/USB/Core/StdDescriptors.h
+++ b/LUFA/Drivers/USB/Core/StdDescriptors.h
@@ -669,7 +669,7 @@
{
USB_Descriptor_Header_t Header; /**< Descriptor header, including type and size. */
- #if ((ARCH == ARCH_AVR8) || (ARCH == ARCH_XMEGA))
+ #if (((ARCH == ARCH_AVR8) || (ARCH == ARCH_XMEGA)) && !defined(__DOXYGEN__))
wchar_t UnicodeString[];
#else
uint16_t UnicodeString[]; /**< String data, as unicode characters (alternatively,
diff --git a/LUFA/Drivers/USB/Core/UC3/Device_UC3.h b/LUFA/Drivers/USB/Core/UC3/Device_UC3.h
index fa034b57..a4bdab00 100644
--- a/LUFA/Drivers/USB/Core/UC3/Device_UC3.h
+++ b/LUFA/Drivers/USB/Core/UC3/Device_UC3.h
@@ -145,6 +145,8 @@
/* Inline Functions: */
/** Returns the current USB frame number, when in device mode. Every millisecond the USB bus is active (i.e. enumerated to a host)
* the frame number is incremented by one.
+ *
+ * \return Current USB frame number from the USB controller.
*/
static inline uint16_t USB_Device_GetFrameNumber(void) ATTR_ALWAYS_INLINE ATTR_WARN_UNUSED_RESULT;
static inline uint16_t USB_Device_GetFrameNumber(void)
diff --git a/LUFA/Drivers/USB/Core/UC3/Host_UC3.h b/LUFA/Drivers/USB/Core/UC3/Host_UC3.h
index 61e82f14..60d9b7f6 100644
--- a/LUFA/Drivers/USB/Core/UC3/Host_UC3.h
+++ b/LUFA/Drivers/USB/Core/UC3/Host_UC3.h
@@ -129,6 +129,8 @@
/* Inline Functions: */
/** Returns the current USB frame number, when in host mode. Every millisecond the USB bus is active (i.e. not suspended)
* the frame number is incremented by one.
+ *
+ * \return Current USB frame number from the USB controller.
*/
static inline uint16_t USB_Host_GetFrameNumber(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;
static inline uint16_t USB_Host_GetFrameNumber(void)
diff --git a/LUFA/Drivers/USB/Core/XMEGA/Device_XMEGA.h b/LUFA/Drivers/USB/Core/XMEGA/Device_XMEGA.h
index 0cc53e1d..8764ea1d 100644
--- a/LUFA/Drivers/USB/Core/XMEGA/Device_XMEGA.h
+++ b/LUFA/Drivers/USB/Core/XMEGA/Device_XMEGA.h
@@ -136,6 +136,8 @@
/* Inline Functions: */
/** Returns the current USB frame number, when in device mode. Every millisecond the USB bus is active (i.e. enumerated to a host)
* the frame number is incremented by one.
+ *
+ * \return Current USB frame number from the USB controller.
*/
static inline uint16_t USB_Device_GetFrameNumber(void) ATTR_ALWAYS_INLINE ATTR_WARN_UNUSED_RESULT;
static inline uint16_t USB_Device_GetFrameNumber(void)