Difference between revisions of "Unit Platform"
From Ultibo.org
Line 1,353: | Line 1,353: | ||
! '''Note''' | ! '''Note''' | ||
| To be documented | | To be documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | |||
+ | '''Clock functions''' | ||
+ | |||
+ | <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 ClockGetTime:Int64;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the current system time in 100 nanosecond ticks since 1/1/1601</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Return''' | ||
+ | | The current system time | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | This is the same time format as Windows FILE_TIME and is intended to allow compatibility with file system functions etc. By default the time returned by this function is considered to be UTC but the actual conversion between UTC and local time is handled at a higher level. | ||
|- | |- | ||
|} | |} |
Revision as of 05:30, 22 August 2016
Return to Unit Reference
Contents
[hide]Description
To be documented
Constants
To be documented
Type definitions
To be documented
Public variables
To be documented
Function declarations
Initialization functions
[Expand]
procedure PlatformInit;
Description: Initialize platform specific information for the current hardware
[Expand]
procedure CPUInit;
Description: Initialize the CPU including performance features etc (Where Applicable)
[Expand]
procedure FPUInit;
Description: Initialize the Floating Point Processor Unit (Where Applicable)
[Expand]
procedure SMPInit;
Description: Initialize the Symetric Multi Processor support (Where Applicable)
[Expand]
procedure CacheInit;
Description: Initialize CPU Data and Instruction Caching (Where Applicable)
[Expand]
procedure MemoryInit;
Description: Initialize Memory specific information (Where Applicable)
[Expand]
procedure ParseBootTags;
Description: Parse any boot tag information passed by the bootloader (Where Applicable)
[Expand]
procedure ParseCommandLine;
Description: Setup argc, argv and cmdline and process known command line options (Where Applicable)
[Expand]
procedure ParseEnvironment;
Description: Setup envp and process known environment options (Where Applicable)
Boot functions
LED functions
[Expand]
procedure ActivityLEDEnable; inline;
Description: Enable the Activity LED (Where Applicable)
[Expand]
procedure ActivityLEDOff; inline;
Description: Turn Off the Activity LED (Where Applicable)
Counter functions (Timer device)
[Expand]
function CounterAvailable:Boolean; inline;
Description: Check if a counter is currently available
[Expand]
function CounterRead:LongWord; inline;
Description: Read the current value of the default counter
[Expand]
function CounterRead64:Int64; inline;
Description: Read the current value of the default counter
[Expand]
function CounterWait:LongWord; inline;
Description: Wait for the current interval to expire on the default counter
[Expand]
function CounterEvent(Callback:TCounterCallback; Data:Pointer):LongWord; inline;
Description: Schedule a function to be called when the current interval expires on the default counter
[Expand]
function CounterGetRate:LongWord; inline;
Description: Get the current clock rate in Hz of the default counter
[Expand]
function CounterSetRate(Rate:LongWord):LongWord; inline;
Description: Set the current clock rate in Hz of the default counter
[Expand]
function CounterGetInterval:LongWord; inline;
Description: Get the current interval in milliseconds of the default counter
[Expand]
function CounterSetInterval(Interval:LongWord):LongWord; inline;
Description: Set the current interval in milliseconds of the default counter
Mailbox functions
[Expand]
function MailboxReceive(Mailbox,Channel:LongWord):LongWord; inline;
Description: Receive from specifed mailbox on specified channel
[Expand]
procedure MailboxSend(Mailbox,Channel,Data:LongWord); inline;
Description: Send to specifed mailbox on specified channel
[Expand]
function MailboxCall(Mailbox,Channel,Data:LongWord; var Response:LongWord):LongWord; inline;
Description: Perform a transaction (Send/Receive) to specifed mailbox on specified channel
[Expand]
function MailboxCallEx(Mailbox,Channel,Data:LongWord; var Response:LongWord; Timeout:LongWord):LongWord; inline;
Description: Perform a transaction (Send/Receive) to specifed mailbox on specified channel
[Expand]
function MailboxPropertyCall(Mailbox,Channel:LongWord; Data:Pointer; var Response:LongWord):LongWord; inline;
Description: Perform a property tag transaction (Send/Receive) to specifed mailbox on specified channel
[Expand]
function MailboxPropertyCallEx(Mailbox,Channel:LongWord; Data:Pointer; var Response:LongWord; Timeout:LongWord):LongWord; inline;
Description: Perform a property tag transaction (Send/Receive) to specifed mailbox on specified channel
Random number functions
[Expand]
function RandomAvailable:Boolean; inline;
Description: Check if a hardware random number generator is currently available
Watchdog Timer Functions
[Expand]
function WatchdogAvailable:Boolean; inline;
Description: Check if a watchdog timer is currently available
[Expand]
function WatchdogStart(Milliseconds:LongWord):LongWord; inline;
Description: To be documented
[Expand]
function WatchdogRefresh(Milliseconds:LongWord):LongWord; inline;
Description: To be documented
Interrupt request (IRQ) functions
[Expand]
function RequestIRQ(CPUID,Number:LongWord; Handler:TInterruptHandler; Parameter:Pointer):LongWord; inline;
Description: Request registration of the supplied handler to the specified IRQ number
[Expand]
function ReleaseIRQ(CPUID,Number:LongWord; Handler:TInterruptHandler; Parameter:Pointer):LongWord; inline;
Description: Request deregistration of the supplied handler from the specified IRQ number
[Expand]
function RequestExIRQ(CPUID,Number:LongWord; Handler:TInterruptHandler; HandlerEx:TInterruptExHandler; Parameter:Pointer):LongWord; inline;
Description: Request registration of the supplied extended handler to the specified IRQ number
[Expand]
function ReleaseExIRQ(CPUID,Number:LongWord; Handler:TInterruptHandler; HandlerEx:TInterruptExHandler; Parameter:Pointer):LongWord; inline;
Description: Request deregistration of the supplied extended handler from the specified IRQ number
Fast interrupt request (FIQ) functions
[Expand]
function RequestFIQ(CPUID,Number:LongWord; Handler:TInterruptHandler; Parameter:Pointer):LongWord; inline;
Description: Request registration of the supplied handler to the specified FIQ number
[Expand]
function ReleaseFIQ(CPUID,Number:LongWord; Handler:TInterruptHandler; Parameter:Pointer):LongWord; inline;
Description: Request deregistration of the supplied handler from the specified FIQ number
[Expand]
function RequestExFIQ(CPUID,Number:LongWord; Handler:TInterruptHandler; HandlerEx:TInterruptExHandler; Parameter:Pointer):LongWord; inline;
Description: Request registration of the supplied extended handler to the specified FIQ number
[Expand]
function ReleaseExFIQ(CPUID,Number:LongWord; Handler:TInterruptHandler; HandlerEx:TInterruptExHandler; Parameter:Pointer):LongWord; inline;
Description: Request deregistration of the supplied extended handler from the specified FIQ number
System functions
[Expand]
function SystemGetUptime:Int64; inline;
Description: Get the current system up time in 100 nanosecond ticks since 1/1/1601
[Expand]
procedure SystemCall(Number:LongWord; Param1,Param2,Param3:PtrUInt); inline;
Description: Perform a System Call function with the supplied parameters (Where Applicable)
CPU Functions
[Expand]
function CPUGetMemory(var Address:PtrUInt; var Length:LongWord):LongWord; inline;
Description: Get the memory start and size available to the CPU
[Expand]
function CPUGetPercentage(CPUID:LongWord):Double; inline;
Description: Get the last second ulitization of the specified CPU in percentage
[Expand]
function CPUGetUtilization(CPUID:LongWord):LongWord; inline;
Description: Get the last second ulitization of the specified CPU
[Expand]
function CPUGetRevision:LongWord; inline;
Description: Get the CPU revision of the current CPU
[Expand]
function CPUGetDescription:String; inline;
Description: Get the CPU description of the current CPU
FPU functions
GPU functions
[Expand]
function GPUGetMemory(var Address:PtrUInt; var Length:LongWord):LongWord; inline;
Description: Get the memory start and size available to the GPU
Cache functions
[Expand]
function L1CacheGetType:LongWord; inline;
Description: Get the L1 cache type for this board
[Expand]
function L1DataCacheGetSize:LongWord; inline;
Description: Get the L1 data cache size for this board
[Expand]
function L1DataCacheGetLineSize:LongWord; inline;
Description: Get the L1 data cache line size for this board
[Expand]
function L1InstructionCacheGetSize:LongWord; inline;
Description: Get the L1 instruction cache size for this board
[Expand]
function L1InstructionCacheGetLineSize:LongWord; inline;
Description: Get the L1 instruction cache line size for this board
[Expand]
function L2CacheGetType:LongWord; inline;
Description: Get the L2 cache type for this board
[Expand]
function L2CacheGetSize:LongWord; inline;
Description: Get the L2 cache size for this board
[Expand]
function L2CacheGetLineSize:LongWord; inline;
Description: Get the L2 cache line size for this board
Board functions
[Expand]
function BoardGetRevision:LongWord; inline;
Description: Get the current Board revision number
[Expand]
function BoardGetMACAddress:String; inline;
Description: Get the current Board MAC address (Where Applicable)
Firmware functions
[Expand]
function FirmwareGetRevision:LongWord; inline;
Description: Get the current board Firmware Revision
Machine functions
Memory functions
[Expand]
function MemoryGetPageSize:LongWord; inline;
Description: Get the page size of system memory
[Expand]
function MemoryGetLargePageSize:LongWord; inline;
Description: Get the large page size of system memory (Where Applicable)
Power functions
[Expand]
function PowerGetWait(PowerId:LongWord):LongWord; inline;
Description: Get the enable wait time in Microseconds of the specified device
[Expand]
function PowerGetState(PowerId:LongWord):LongWord; inline;
Description: Get the power state of the specified device
[Expand]
function PowerSetState(PowerId,State:LongWord; Wait:Boolean):LongWord; inline;
Description: Set the power state of the specified device (Optionally waiting for ready)
Clock functions
[Expand]
function ClockGetTime:Int64;
Description: Get the current system time in 100 nanosecond ticks since 1/1/1601
Return to Unit Reference