SetupFunctions.c 789 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /** @file
  2. Copyright (c) 2004 - 2019, Intel Corporation. All rights reserved.<BR>
  3. SPDX-License-Identifier: BSD-2-Clause-Patent
  4. Module Name:
  5. SetupFunctions.c
  6. Abstract:
  7. Revision History
  8. --*/
  9. #include "PlatformSetupDxe.h"
  10. VOID
  11. AsciiToUnicode (
  12. IN CHAR8 *AsciiString,
  13. IN CHAR16 *UnicodeString
  14. )
  15. {
  16. UINT8 Index;
  17. Index = 0;
  18. while (AsciiString[Index] != 0) {
  19. UnicodeString[Index] = (CHAR16)AsciiString[Index];
  20. Index++;
  21. }
  22. }
  23. VOID
  24. SwapEntries (
  25. IN CHAR8 *Data
  26. )
  27. {
  28. UINT16 Index;
  29. CHAR8 Temp8;
  30. Index = 0;
  31. while (Data[Index] != 0 && Data[Index+1] != 0) {
  32. Temp8 = Data[Index];
  33. Data[Index] = Data[Index+1];
  34. Data[Index+1] = Temp8;
  35. Index +=2;
  36. }
  37. return;
  38. }