|
|
Line 28: |
Line 28: |
| ---- | | ---- |
| | | |
− | : <code>function Min(A,B:LongInt):LongInt;</code> - Return the minimum value of A and B
| |
− | : <code>function Max(A,B:LongInt):LongInt;</code> - Return the maximum value of A and B
| |
| | | |
− | : <code>function RoundUp(Value,Multiple:LongWord):LongWord;</code> - Round Value to the next highest multiple of Multiple
| + | '''Global functions''' |
− | : <code>function RoundDown(Value,Multiple:LongWord):LongWord;</code> - Round Value to the next lowest multiple of Multiple
| + | |
− | | + | |
− | : <code>function HIWORD(L:LongInt):Word;</code> - Return the high word of L
| + | |
− | : <code>function LOWORD(L:LongInt):Word;</code> - Return the low word of L
| + | |
− | | + | |
− | : <code>function HIBYTE(W:LongInt):Byte;</code> - Return the high byte of W
| + | |
− | : <code>function LOBYTE(W:LongInt):Byte;</code> - Return the low byte of W
| + | |
− | | + | |
− | : <code>function MAKELONG(A,B:LongInt):LongInt;</code> - Make a longword value from A and B
| + | |
− | : <code>function MAKEWORD(A,B:LongInt):Word;</code> - Make a word value from A and B
| + | |
− | | + | |
− | : <code>function WordNtoBE(Value:Word):Word;</code> - Convert word Value from native to big endian
| + | |
− | : <code>function WordBEtoN(Value:Word):Word;</code> - Convert word Value from big endian to native
| + | |
− | | + | |
− | : <code>function LongWordNtoBE(Value:LongWord):LongWord;</code> - Convert longword Value from native to big endian
| + | |
− | : <code>function LongWordBEtoN(Value:LongWord):LongWord;</code> - Convert longword Value from big endian to native
| + | |
− | | + | |
− | : <code>function Int64NtoBE(const Value:Int64):Int64;</code> - Convert int64 Value from native to big endian
| + | |
− | : <code>function Int64BEtoN(const Value:Int64):Int64;</code> - Convert int64 Value from big endian to native
| + | |
− | | + | |
− | : <code>function GetLastError:LongWord;</code> - Return the last error code for the current thread
| + | |
− | : <code>procedure SetLastError(LastError:LongWord);</code> - Set the last error code for the current thread
| + | |
− | | + | |
− | | + | |
− | : <code>function ErrorToString(Error:LongWord):String;</code> - Convert an error code value to a string
| + | |
− | : <code>function SysErrorToString(ErrorCode:Integer):String;</code> - Convert an error code value to a string (RTL)
| + | |
− | | + | |
− | : <code>function BooleanToString(Value:Boolean):String;</code> - Convert a boolean value to a string
| + | |
− | | + | |
− | : <code>function CPUTypeToString(CPUType:LongWord):String;</code> - Convert a CPU type constant to a string
| + | |
− | : <code>function CPUModelToString(CPUModel:LongWord):String;</code> - Convert a CPU model constant to a string
| + | |
− | : <code>function CPUIDToString(CPUID:LongWord):String;</code> - Convert a CPU ID constant to a string
| + | |
− | | + | |
− | : <code>function FPUTypeToString(FPUType:LongWord):String;</code> - Convert a FPU type constant to a string
| + | |
− | : <code>function GPUTypeToString(GPUType:LongWord):String;</code> - Convert a GPU type constant to a string
| + | |
− | | + | |
− | : <code>function CacheTypeToString(CacheType:LongWord):String;</code> - Convert a filesystem Cache type constant to a string
| + | |
− | | + | |
− | : <code>function BoardTypeToString(BoardType:LongWord):String;</code> - Convert a Board type constant to a string
| + | |
− | : <code>function MachineTypeToString(MachineType:LongWord):String;</code> - Convert a Machine type constant to a string
| + | |
− | | + | |
− | : <code>function PowerIDToString(PowerID:LongWord):String;</code> - Convert a Power ID constant to a string
| + | |
− | : <code>function PowerStateToString(PowerState:LongWord):String;</code> - Convert a Power state constant to a string
| + | |
− | | + | |
− | : <code>function ClockIDToString(ClockID:LongWord):String;</code> - Convert a Clock ID constant to a string
| + | |
− | : <code>function ClockStateToString(ClockState:LongWord):String;</code> - Convert a Clock state constant to a string
| + | |
− | | + | |
− | : <code>function TurboIDToString(TurboID:LongWord):String;</code> - Convert a Turbo ID constant to a string
| + | |
− | | + | |
− | : <code>function VoltageIDToString(VoltageID:LongWord):String;</code> - Convert a Voltage ID constant to a string
| + | |
− | | + | |
− | : <code>function TemperatureIDToString(TemperatureID:LongWord):String;</code> - Convert a Temperature ID constant to a string
| + | |
− | | + | |
− | : <code>function LogLevelToLoggingSeverity(LogLevel:LongWord):LongWord;</code> - Convert a log level constant to a severity level
| + | |
| | | |
| + | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> |
| + | <pre style="border: 0; padding-bottom:0px;">function Min(A,B:LongInt):LongInt; inline;</pre> |
| + | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Return the minimum value of A and B</div> |
| + | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> |
| + | {| class="wikitable" style="font-size: 14px; background: white;" |
| + | |- |
| + | ! '''Note''' |
| + | | ''None applicable'' |
| + | |- |
| + | |} |
| + | </div></div> |
| + | <br /> |
| + | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> |
| + | <pre style="border: 0; padding-bottom:0px;">function Max(A,B:LongInt):LongInt; inline;</pre> |
| + | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Return the maximum value of A and B</div> |
| + | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> |
| + | {| class="wikitable" style="font-size: 14px; background: white;" |
| + | |- |
| + | ! '''Note''' |
| + | | ''None applicable'' |
| + | |- |
| + | |} |
| + | </div></div> |
| + | <br /> |
| | | |
| Return to [[Unit_Reference|Unit Reference]] | | Return to [[Unit_Reference|Unit Reference]] |
The GlobalConfig unit contains variables used throughout Ultibo core to provide configuration and parameters to common modules and sub systems. Many of these variables may also be passed on the command line as environment variables to customize the behavior of Ultibo core without needing to recompile the application. This unit also includes a small number of widely used common functions.