VirtualBox

source: vbox/trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseLib/SwapBytes16.c@ 80924

Last change on this file since 80924 was 80721, checked in by vboxsync, 6 years ago

Devices/EFI/FirmwareNew: Start upgrade process to edk2-stable201908 (compiles on Windows and works to some extent), bugref:4643

  • Property svn:eol-style set to native
File size: 621 bytes
Line 
1/** @file
2 Math worker functions.
3
4 Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
6
7**/
8
9
10
11
12#include "BaseLibInternals.h"
13
14/**
15 Switches the endianess of a 16-bit integer.
16
17 This function swaps the bytes in a 16-bit unsigned value to switch the value
18 from little endian to big endian or vice versa. The byte swapped value is
19 returned.
20
21 @param Value A 16-bit unsigned value.
22
23 @return The byte swapped Value.
24
25**/
26UINT16
27EFIAPI
28SwapBytes16 (
29 IN UINT16 Value
30 )
31{
32 return (UINT16) ((Value<< 8) | (Value>> 8));
33}
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette