aboutsummaryrefslogtreecommitdiff
path: root/LUFA/Drivers/USB/Core/AVR8
diff options
context:
space:
mode:
authorDean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28>2011-04-12 03:03:56 +0000
committerDean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28>2011-04-12 03:03:56 +0000
commit9e7b53ef2e85a505274594ba5601c4ece84cc33d (patch)
treeb560fb306c067c44266a494f2d40f16132e0a9f4 /LUFA/Drivers/USB/Core/AVR8
parent9ebaf2ecadb2c37b3d33fd01d3ab03863ebeeeb7 (diff)
Add missing function attributes to the pipe/endpoint functions for all architectures.
Perform endianness correction in the HID report parser for big-endian platforms. git-svn-id: http://lufa-lib.googlecode.com/svn/trunk@1734 d5102386-fcda-11dd-9fdb-3debd5008f28
Diffstat (limited to 'LUFA/Drivers/USB/Core/AVR8')
-rw-r--r--LUFA/Drivers/USB/Core/AVR8/Device_AVR8.h3
-rw-r--r--LUFA/Drivers/USB/Core/AVR8/Endpoint_AVR8.h1
-rw-r--r--LUFA/Drivers/USB/Core/AVR8/Host_AVR8.h1
-rw-r--r--LUFA/Drivers/USB/Core/AVR8/OTG_AVR8.h2
-rw-r--r--LUFA/Drivers/USB/Core/AVR8/Pipe_AVR8.h3
5 files changed, 7 insertions, 3 deletions
diff --git a/LUFA/Drivers/USB/Core/AVR8/Device_AVR8.h b/LUFA/Drivers/USB/Core/AVR8/Device_AVR8.h
index 47f58b27..f88c2f1b 100644
--- a/LUFA/Drivers/USB/Core/AVR8/Device_AVR8.h
+++ b/LUFA/Drivers/USB/Core/AVR8/Device_AVR8.h
@@ -137,6 +137,7 @@
/** 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.
*/
+ static inline uint16_t USB_Device_GetFrameNumber(void) ATTR_ALWAYS_INLINE ATTR_WARN_UNUSED_RESULT;
static inline uint16_t USB_Device_GetFrameNumber(void)
{
return UDFNUM;
@@ -191,7 +192,7 @@
UDADDR |= (1 << ADDEN);
}
- static inline bool USB_Device_IsAddressSet(void) ATTR_ALWAYS_INLINE;
+ static inline bool USB_Device_IsAddressSet(void) ATTR_ALWAYS_INLINE ATTR_WARN_UNUSED_RESULT;
static inline bool USB_Device_IsAddressSet(void)
{
return (UDADDR & (1 << ADDEN));
diff --git a/LUFA/Drivers/USB/Core/AVR8/Endpoint_AVR8.h b/LUFA/Drivers/USB/Core/AVR8/Endpoint_AVR8.h
index 166a49c7..1727da0d 100644
--- a/LUFA/Drivers/USB/Core/AVR8/Endpoint_AVR8.h
+++ b/LUFA/Drivers/USB/Core/AVR8/Endpoint_AVR8.h
@@ -394,6 +394,7 @@
*
* \return Total number of busy banks in the selected endpoint.
*/
+ static inline uint8_t Endpoint_GetBusyBanks(void) ATTR_ALWAYS_INLINE ATTR_WARN_UNUSED_RESULT;
static inline uint8_t Endpoint_GetBusyBanks(void)
{
return (UESTA0X & (0x03 << NBUSYBK0));
diff --git a/LUFA/Drivers/USB/Core/AVR8/Host_AVR8.h b/LUFA/Drivers/USB/Core/AVR8/Host_AVR8.h
index 2bf13cd2..836c83b6 100644
--- a/LUFA/Drivers/USB/Core/AVR8/Host_AVR8.h
+++ b/LUFA/Drivers/USB/Core/AVR8/Host_AVR8.h
@@ -140,6 +140,7 @@
/** 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.
*/
+ static inline uint16_t USB_Host_GetFrameNumber(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;
static inline uint16_t USB_Host_GetFrameNumber(void)
{
return UHFNUM;
diff --git a/LUFA/Drivers/USB/Core/AVR8/OTG_AVR8.h b/LUFA/Drivers/USB/Core/AVR8/OTG_AVR8.h
index a7903375..fda145c1 100644
--- a/LUFA/Drivers/USB/Core/AVR8/OTG_AVR8.h
+++ b/LUFA/Drivers/USB/Core/AVR8/OTG_AVR8.h
@@ -93,7 +93,7 @@
*
* \return Boolean \c true if currently sending a HNP to the other connected device, \c false otherwise
*/
- static inline bool USB_OTG_Device_IsSendingHNP(void) ATTR_ALWAYS_INLINE;
+ static inline bool USB_OTG_Device_IsSendingHNP(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;
static inline bool USB_OTG_Device_IsSendingHNP(void)
{
return ((OTGCON & (1 << HNPREQ)) ? true : false);
diff --git a/LUFA/Drivers/USB/Core/AVR8/Pipe_AVR8.h b/LUFA/Drivers/USB/Core/AVR8/Pipe_AVR8.h
index 2e89f6de..8022a812 100644
--- a/LUFA/Drivers/USB/Core/AVR8/Pipe_AVR8.h
+++ b/LUFA/Drivers/USB/Core/AVR8/Pipe_AVR8.h
@@ -273,7 +273,7 @@
*
* \return The current pipe token, as a \c PIPE_TOKEN_* mask.
*/
- static inline uint8_t Pipe_GetPipeToken(void) ATTR_ALWAYS_INLINE;
+ static inline uint8_t Pipe_GetPipeToken(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;
static inline uint8_t Pipe_GetPipeToken(void)
{
return (UPCFG0X & (0x03 << PTOKEN0));
@@ -433,6 +433,7 @@
*
* \return Total number of busy banks in the selected pipe.
*/
+ static inline uint8_t Pipe_GetBusyBanks(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;
static inline uint8_t Pipe_GetBusyBanks(void)
{
return (UPSTAX & (0x03 << NBUSYBK0));