Difference between revisions of "Unit Platform"

From Ultibo.org
Jump to: navigation, search
Line 318: Line 318:
 
! '''Note'''
 
! '''Note'''
 
| To be documented
 
| To be documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
 +
'''Counter functions (Timer device)'''
 +
 +
<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 CounterAvailable:Boolean; inline;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Check if a counter is currently available</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Note'''
 +
| To be documented
 +
|-
 +
|}
 +
</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 CounterRead:LongWord; inline;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Read the current value of the default counter</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Return'''
 +
| The 32 bit current value of the current or 0 on failure
 +
|-
 +
|}
 +
</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 CounterRead64:Int64; inline;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Read the current value of the default counter</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Return'''
 +
| The 64 bit current value of the current or 0 on failure
 +
|-
 +
|}
 +
</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 CounterWait:LongWord; inline;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Wait for the current interval to expire on the default counter</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Return'''
 +
| ERROR_SUCCESS if the interval expired or another error code on failure
 +
|-
 +
|}
 +
</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 CounterEvent(Callback:TCounterCallback; Data:Pointer):LongWord; inline;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Schedule a function to be called when the current interval expires on the default counter</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Callback'''
 +
| The function to be called when the interval expires
 +
|-
 +
! '''Data'''
 +
| A pointer to be pass to the function when the interval expires (Optional)
 +
|-
 +
! '''Return'''
 +
| ERROR_SUCCESS if the callback was scheduled successfully or another error code on failure
 +
|-
 +
|}
 +
</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 CounterGetRate:LongWord; inline;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the current clock rate in Hz of the default counter</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Return'''
 +
| The current clock rate in Hz or 0 on failure
 +
|-
 +
|}
 +
</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 CounterSetRate(Rate:LongWord):LongWord; inline;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Set the current clock rate in Hz of the default counter</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Rate'''
 +
| The clock rate in Hz to set
 +
|-
 +
! '''Return'''
 +
| ERROR_SUCCESS if the clock rate was set or another error code on failure
 +
|-
 +
|}
 +
</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 CounterGetInterval:LongWord; inline;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the current interval in milliseconds of the default counter</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Return'''
 +
| The current interval in milliseconds or 0 on failure (or not set)
 +
|-
 +
|}
 +
</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 CounterSetInterval(Interval:LongWord):LongWord; inline;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Set the current interval in milliseconds of the default counter</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Interval'''
 +
| The interval in milliseconds to set
 +
|-
 +
! '''Return'''
 +
| ERROR_SUCCESS if the interval was set or another error code on failure
 
|-
 
|-
 
|}
 
|}

Revision as of 05:19, 22 August 2016

Return to Unit Reference


Description


To be documented

Constants


To be documented

Type definitions


To be documented

Public variables


To be documented

Function declarations



Initialization functions

procedure PlatformInit;
Description: Initialize platform specific information for the current hardware
Note To be documented


procedure CPUInit;
Description: Initialize the CPU including performance features etc (Where Applicable)
Note To be documented


procedure FPUInit;
Description: Initialize the Floating Point Processor Unit (Where Applicable)
Note To be documented


procedure GPUInit;
Description: Initialize the Graphics Processor Unit (Where Applicable)
Note To be documented


procedure MMUInit;
Description: Initialize the Memory Management Unit (Where Applicable)
Note To be documented


procedure SMPInit;
Description: Initialize the Symetric Multi Processor support (Where Applicable)
Note Secondary CPU boot is performed by SecondaryInit in Threads


procedure CacheInit;
Description: Initialize CPU Data and Instruction Caching (Where Applicable)
Note To be documented


procedure BoardInit;
Description: Initialize Board specific information (Where Applicable)
Note To be documented


procedure MemoryInit;
Description: Initialize Memory specific information (Where Applicable)
Note To be documented


procedure ClockInit;
Description: Initialize the Clock handling
Note To be documented


procedure PowerInit;
Description: Initialize Power management (Where Applicable)
Note To be documented


procedure MailboxInit;
Description: Initialize Mailbox access (Where Applicable)
Note To be documented


procedure InterruptInit;
Description: Initialize Interrupt handling
Note To be documented


procedure PeripheralInit;
Description: Initialize Peripheral devices (Where Applicable)
Note To be documented


procedure ParseBootTags;
Description: Parse any boot tag information passed by the bootloader (Where Applicable)
Note To be documented


procedure ParseCommandLine;
Description: Setup argc, argv and cmdline and process known command line options (Where Applicable)
Note To be documented


procedure ParseEnvironment;
Description: Setup envp and process known environment options (Where Applicable)
Note To be documented


Boot functions

procedure BootBlink; inline;
Description: Blink the Activity LED (Where Applicable)
Note Intended for startup diagnostics when bootstrapping a new board


LED functions

procedure PowerLEDEnable; inline;
Description: Enable the Power LED (Where Applicable)
Note To be documented


procedure PowerLEDOn; inline;
Description: Turn On the Power LED (Where Applicable)
Note To be documented


procedure PowerLEDOff; inline;
Description: Turn Off the Power LED (Where Applicable)
Note To be documented


procedure ActivityLEDEnable; inline;
Description: Enable the Activity LED (Where Applicable)
Note To be documented


procedure ActivityLEDOn; inline;
Description: Turn On the Activity LED (Where Applicable)
Note To be documented


procedure ActivityLEDOff; inline;
Description: Turn Off the Activity LED (Where Applicable)
Note To be documented


Counter functions (Timer device)

function CounterAvailable:Boolean; inline;
Description: Check if a counter is currently available
Note To be documented


function CounterRead:LongWord; inline;
Description: Read the current value of the default counter
Return The 32 bit current value of the current or 0 on failure


function CounterRead64:Int64; inline;
Description: Read the current value of the default counter
Return The 64 bit current value of the current or 0 on failure


function CounterWait:LongWord; inline;
Description: Wait for the current interval to expire on the default counter
Return ERROR_SUCCESS if the interval expired or another error code on failure


function CounterEvent(Callback:TCounterCallback; Data:Pointer):LongWord; inline;
Description: Schedule a function to be called when the current interval expires on the default counter
Callback The function to be called when the interval expires
Data A pointer to be pass to the function when the interval expires (Optional)
Return ERROR_SUCCESS if the callback was scheduled successfully or another error code on failure


function CounterGetRate:LongWord; inline;
Description: Get the current clock rate in Hz of the default counter
Return The current clock rate in Hz or 0 on failure


function CounterSetRate(Rate:LongWord):LongWord; inline;
Description: Set the current clock rate in Hz of the default counter
Rate The clock rate in Hz to set
Return ERROR_SUCCESS if the clock rate was set or another error code on failure


function CounterGetInterval:LongWord; inline;
Description: Get the current interval in milliseconds of the default counter
Return The current interval in milliseconds or 0 on failure (or not set)


function CounterSetInterval(Interval:LongWord):LongWord; inline;
Description: Set the current interval in milliseconds of the default counter
Interval The interval in milliseconds to set
Return ERROR_SUCCESS if the interval was set or another error code on failure



Return to Unit Reference