3 Copyright (c) 2004, Intel Corporation. All rights reserved.<BR>
4 This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
16 Collection of usefull UI functions.
22 #ifndef _EFI_UI_LIB_H_
23 #define _EFI_UI_LIB_H_
26 #include "TianoTypes.h"
27 #include "EfiDriverLib.h"
37 Converts frequency in Hz to Unicode string.
38 Three significant digits are delivered. Used for processor info display.
41 String - string that will contain the frequency.
42 Val - value to convert, minimum is 100000 i.e., 0.1 MHz.
45 String that contains the frequency.
58 Converts size in bytes to Unicode string.
59 Used for memory/cache size display.
62 String - string that will contain the value
63 Val - value to convert in bytes
66 String that contains the value.
79 Converts 8 bit version value to Unicode string.
80 The upper nibble contains the upper part, the lower nibble contains the minor part.
81 The output format is <major>.<minor>.
84 String - string that will contain the version value
85 Version - Version value to convert
88 String that contains the version value.
96 IN EFI_MAC_ADDRESS
*MacAddr
,
102 Converts MAC address to Unicode string.
103 The value is 64-bit and the resulting string will be 12
104 digit hex number in pairs of digits separated by dashes.
107 String - string that will contain the value
108 MacAddr - MAC address to convert
109 AddrSize - Size of address
112 String that contains the value.
120 IN EFI_IPv4_ADDRESS
*Ip4Addr
125 Converts IP v4 address to Unicode string.
126 The value is 64-bit and the resulting string will
127 be four decimal values 0-255 separated by dots.
130 String - string that will contain the value
131 Ip4Addr - IP v4 address to convert from
135 String that contain the value
142 OUT EFI_IPv4_ADDRESS
*Ip4Addr
,
148 Parses and converts Unicode string to IP v4 address.
149 The value will 64-bit.
150 The string must be four decimal values 0-255 separated by dots.
151 The string is parsed and format verified.
154 Ip4Addr - pointer to the variable to store the value to
155 String - string that contains the value to parse and convert
158 EFI_SUCCESS - if successful
159 EFI_INVALID_PARAMETER - if String contains invalid IP v4 format
166 OUT CHAR16
*UnicodeStr
,
172 Converts ASCII characters to Unicode.
175 UnicodeStr - the Unicode string to be written to. The buffer must be large enough.
176 AsciiStr - The ASCII string to be converted.
179 The address to the Unicode string - same as UnicodeStr.
187 IN CHAR16
*UnicodeStr
192 Converts ASCII characters to Unicode.
193 Assumes that the Unicode characters are only these defined in the ASCII set.
196 AsciiStr - The ASCII string to be written to. The buffer must be large enough.
197 UnicodeStr - the Unicode string to be converted.
200 The address to the ASCII string - same as AsciiStr.