From: bernie Date: Tue, 20 Jul 2004 16:20:35 +0000 (+0000) Subject: Move byte-order macros to mware/byteorder.h; Add missing author names. X-Git-Tag: 1.0.0~1180 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=8d5720d85f05d5fa1061cf57684dc2713fd0ad31;p=bertos.git Move byte-order macros to mware/byteorder.h; Add missing author names. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@61 38d2e660-2303-0410-9eaa-f027e97ec537 --- diff --git a/cpu.h b/cpu.h index 09240a0a..51314219 100755 --- a/cpu.h +++ b/cpu.h @@ -11,10 +11,15 @@ * \version $Id$ * * \author Giovanni Bajo + * \author Bernardo Innocenti + * \author Stefano Fedrigo */ /* * $Log$ + * Revision 1.5 2004/07/20 16:20:35 bernie + * Move byte-order macros to mware/byteorder.h; Add missing author names. + * * Revision 1.4 2004/07/20 16:06:04 bernie * Add macros to handle endianess issues. * @@ -213,23 +218,4 @@ CPU_PUSH_WORD((sp), (func)) #endif - -INLINE uint16_t htobe16(uint16_t n); -INLINE uint16_t htobe16(uint16_t n) -{ - if (CPU_BYTE_ORDER == CPU_LITTLE_ENDIAN) - n = n << 8 | n >> 8; - - return n; -} - -INLINE uint16_t htole16(uint16_t n); -INLINE uint16_t htole16(uint16_t n) -{ - if (CPU_BYTE_ORDER == CPU_BIG_ENDIAN) - n = n << 8 | n >> 8; - - return n; -} - #endif /* CPU_H */