2011-11-09 Werner Almesberger <werner@almesberger.net>

PR 1955/cpukit
	* rtems/score/cpu.h: Convert CPU_swap_u16 into a static inline.
This commit is contained in:
Joel Sherrill
2011-11-09 15:15:25 +00:00
parent 4689f30c3c
commit 552a80fcbc
2 changed files with 9 additions and 2 deletions
+5
View File
@@ -1,3 +1,8 @@
2011-11-09 Werner Almesberger <werner@almesberger.net>
PR 1955/cpukit
* rtems/score/cpu.h: Convert CPU_swap_u16 into a static inline.
2011-09-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
PR 1914/cpukit
+4 -2
View File
@@ -1258,8 +1258,10 @@ static inline uint32_t CPU_swap_u32(
* @param[in] value is the value to be swapped
* @return the value after being endian swapped
*/
#define CPU_swap_u16( value ) \
(((value&0xff) << 8) | ((value >> 8)&0xff))
static inline uint16_t CPU_swap_u16(uint16_t v)
{
return v << 8 | v >> 8;
}
#ifdef __cplusplus
}