diff options
author | Dean Camera <dean@fourwalledcubicle.com> | 2011-09-22 05:55:32 +0000 |
---|---|---|
committer | Dean Camera <dean@fourwalledcubicle.com> | 2011-09-22 05:55:32 +0000 |
commit | 77dbfd3cc44b91ea04990c65f3de70267ceb2460 (patch) | |
tree | c96dc45709c9361dceb8c23a7c759990562ac424 /LUFA/Drivers/USB/Core | |
parent | 022fa26b43f062ca6e4b23c64ec2d0d0bab7e377 (diff) | |
download | lufa-77dbfd3cc44b91ea04990c65f3de70267ceb2460.tar.gz lufa-77dbfd3cc44b91ea04990c65f3de70267ceb2460.tar.bz2 lufa-77dbfd3cc44b91ea04990c65f3de70267ceb2460.zip |
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.
Diffstat (limited to 'LUFA/Drivers/USB/Core')
-rw-r--r-- | LUFA/Drivers/USB/Core/AVR8/Device_AVR8.h | 2 | ||||
-rw-r--r-- | LUFA/Drivers/USB/Core/AVR8/Host_AVR8.h | 2 | ||||
-rw-r--r-- | LUFA/Drivers/USB/Core/DeviceStandardReq.c | 7 | ||||
-rw-r--r-- | LUFA/Drivers/USB/Core/StdDescriptors.h | 2 | ||||
-rw-r--r-- | LUFA/Drivers/USB/Core/UC3/Device_UC3.h | 2 | ||||
-rw-r--r-- | LUFA/Drivers/USB/Core/UC3/Host_UC3.h | 2 | ||||
-rw-r--r-- | LUFA/Drivers/USB/Core/XMEGA/Device_XMEGA.h | 2 |
7 files changed, 18 insertions, 1 deletions
diff --git a/LUFA/Drivers/USB/Core/AVR8/Device_AVR8.h b/LUFA/Drivers/USB/Core/AVR8/Device_AVR8.h index 08604ac1e..ec41f5de3 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 b97c45c79..8dbeaa271 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 c3a111e35..59d3f2896 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 a37ea09e7..f5bacf804 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 fa034b576..a4bdab004 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 61e82f14c..60d9b7f64 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 0cc53e1d4..8764ea1d2 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) |