diff options
Diffstat (limited to 'cpukit')
-rw-r--r-- | cpukit/score/cpu/lm32/ChangeLog | 5 | ||||
-rw-r--r-- | cpukit/score/cpu/lm32/rtems/score/cpu.h | 6 |
2 files changed, 9 insertions, 2 deletions
diff --git a/cpukit/score/cpu/lm32/ChangeLog b/cpukit/score/cpu/lm32/ChangeLog index 43beca0f6c..873f24bbab 100644 --- a/cpukit/score/cpu/lm32/ChangeLog +++ b/cpukit/score/cpu/lm32/ChangeLog @@ -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. + 2010-05-29 Ralf Corsépius <ralf.corsepius@rtems.org> * irq.c: Change _exception_stack_frame into void*. diff --git a/cpukit/score/cpu/lm32/rtems/score/cpu.h b/cpukit/score/cpu/lm32/rtems/score/cpu.h index 973fad29b8..be3294fe40 100644 --- a/cpukit/score/cpu/lm32/rtems/score/cpu.h +++ b/cpukit/score/cpu/lm32/rtems/score/cpu.h @@ -1272,8 +1272,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 } |