EDK2 doxygen online documents - Firmware Encoding Index 1
EDK2 doxygen online documents - Firmware Encoding Index

StdLib/LibC/Main/bswap16.c

Go to the documentation of this file.
00001 /*  $NetBSD: bswap16.c,v 1.1 2005/12/20 19:28:51 christos Exp $    */
00002 
00003 /*
00004  * Written by Manuel Bouyer <bouyer@NetBSD.org>.
00005  * Public domain.
00006  */
00007 
00008 //#include <sys/cdefs.h>
00009 //#if defined(LIBC_SCCS) && !defined(lint)
00010 //__RCSID("$NetBSD: bswap16.c,v 1.1 2005/12/20 19:28:51 christos Exp $");
00011 //#endif /* LIBC_SCCS and not lint */
00012 
00013 //#include <sys/types.h>
00014 //#include <machine/bswap.h>
00015 
00016 #undef bswap16
00017 
00018 UINT16
00019 bswap16(UINT16 x)
00020 {
00021   return ((x << 8) & 0xff00) | ((x >> 8) & 0x00ff);
00022 }
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Defines