diff options
| author | Dean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28> | 2011-09-22 05:55:32 +0000 |
|---|---|---|
| committer | Dean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28> | 2011-09-22 05:55:32 +0000 |
| commit | e4d9bb8dcbf17dd129c442ba03e13f6e213cfedf (patch) | |
| tree | c96dc45709c9361dceb8c23a7c759990562ac424 /LUFA/Common | |
| parent | 811229c178a5d25c06fb7a217ac7a041741d9275 (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/Common')
| -rw-r--r-- | LUFA/Common/Attributes.h | 2 | ||||
| -rw-r--r-- | LUFA/Common/Common.h | 2 | ||||
| -rw-r--r-- | LUFA/Common/Endianness.h | 6 |
3 files changed, 9 insertions, 1 deletions
diff --git a/LUFA/Common/Attributes.h b/LUFA/Common/Attributes.h index d6722a28..7ee64136 100644 --- a/LUFA/Common/Attributes.h +++ b/LUFA/Common/Attributes.h @@ -126,7 +126,7 @@ * * \param[in] SectionIndex Initialization section number where the function should be placed. */ - #define ATTR_INIT_SECTION(SectionIndex) __attribute__ ((naked, section (".init" #SectionIndex ))) + #define ATTR_INIT_SECTION(SectionIndex) __attribute__ ((used, naked, section (".init" #SectionIndex ))) /** Marks a function as an alias for another function. * diff --git a/LUFA/Common/Common.h b/LUFA/Common/Common.h index e9faf7af..a9485049 100644 --- a/LUFA/Common/Common.h +++ b/LUFA/Common/Common.h @@ -220,6 +220,8 @@ * etc. * * \param[in] Byte Byte of data whose bits are to be reversed. + * + * \return Input data with the individual bits reversed (mirrored). */ static inline uint8_t BitReverse(uint8_t Byte) ATTR_WARN_UNUSED_RESULT ATTR_CONST; static inline uint8_t BitReverse(uint8_t Byte) diff --git a/LUFA/Common/Endianness.h b/LUFA/Common/Endianness.h index 6e84626e..6b57ed61 100644 --- a/LUFA/Common/Endianness.h +++ b/LUFA/Common/Endianness.h @@ -390,6 +390,8 @@ * \ingroup Group_ByteSwapping * * \param[in] Word Word of data whose bytes are to be swapped. + * + * \return Input data with the individual bytes reversed. */ static inline uint16_t SwapEndian_16(const uint16_t Word) ATTR_WARN_UNUSED_RESULT ATTR_CONST; static inline uint16_t SwapEndian_16(const uint16_t Word) @@ -419,6 +421,8 @@ * \ingroup Group_ByteSwapping * * \param[in] DWord Double word of data whose bytes are to be swapped. + * + * \return Input data with the individual bytes reversed. */ static inline uint32_t SwapEndian_32(const uint32_t DWord) ATTR_WARN_UNUSED_RESULT ATTR_CONST; static inline uint32_t SwapEndian_32(const uint32_t DWord) @@ -453,6 +457,8 @@ * * \param[in,out] Data Pointer to a number containing an even number of bytes to be reversed. * \param[in] Length Length of the data in bytes. + * + * \return Input data with the individual bytes reversed. */ static inline void SwapEndian_n(void* const Data, uint8_t Length) ATTR_NON_NULL_PTR_ARG(1); |
