REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3737 Apply uncrustify changes to .c/.h files in the MdePkg package Cc: Andrew Fish <afish@apple.com> Cc: Leif Lindholm <leif@nuviainc.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
31 lines
629 B
C
31 lines
629 B
C
/** @file
|
|
Math worker functions.
|
|
|
|
Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
|
|
SPDX-License-Identifier: BSD-2-Clause-Patent
|
|
|
|
**/
|
|
|
|
#include "BaseLibInternals.h"
|
|
|
|
/**
|
|
Switches the endianess of a 16-bit integer.
|
|
|
|
This function swaps the bytes in a 16-bit unsigned value to switch the value
|
|
from little endian to big endian or vice versa. The byte swapped value is
|
|
returned.
|
|
|
|
@param Value A 16-bit unsigned value.
|
|
|
|
@return The byte swapped Value.
|
|
|
|
**/
|
|
UINT16
|
|
EFIAPI
|
|
SwapBytes16 (
|
|
IN UINT16 Value
|
|
)
|
|
{
|
|
return (UINT16)((Value<< 8) | (Value>> 8));
|
|
}
|