diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 1998-04-27 16:10:16 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 1998-04-27 16:10:16 +0000 |
commit | b0aba4c46b14204f7de6471512136de7003877c4 (patch) | |
tree | c3128754275e49fb155f41a327d5938385395cb8 /c/src/exec/score/cpu/unix/cpu.h | |
parent | Fixed spelling errors. (diff) | |
download | rtems-b0aba4c46b14204f7de6471512136de7003877c4.tar.bz2 |
Added swap of unsigned16
Diffstat (limited to 'c/src/exec/score/cpu/unix/cpu.h')
-rw-r--r-- | c/src/exec/score/cpu/unix/cpu.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/c/src/exec/score/cpu/unix/cpu.h b/c/src/exec/score/cpu/unix/cpu.h index 13558267a0..1667438f92 100644 --- a/c/src/exec/score/cpu/unix/cpu.h +++ b/c/src/exec/score/cpu/unix/cpu.h @@ -991,6 +991,9 @@ static inline unsigned int CPU_swap_u32( return( swapped ); } +#define CPU_swap_u16( value ) \ + (((value&0xff) << 8) | ((value >> 8)&0xff)) + /* * Special Purpose Routines to hide the use of UNIX system calls. */ |