Difference between revisions of "Unit RTC"

From Ultibo.org
Jump to: navigation, search
Line 224: Line 224:
 
! '''Note'''
 
! '''Note'''
 
| To be documented
 
| To be documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
 +
'''RTL RTC 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 SysRTCAvailable:Boolean;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Check if an RTC device is 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 SysRTCGetTime:Int64;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the current time from a RTC device</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Note'''
 +
| Returned time is 100 nanosecond ticks since 1 January 1601
 +
|-
 +
|}
 +
</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 SysRTCSetTime(const Time:Int64):Int64;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Set the current time for a RTC device</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Time'''
 +
| The time to be set
 +
|-
 +
! '''Return'''
 +
| The device time after setting (or 0 on failure)
 +
|-
 +
! '''Note'''
 +
| Time and returned time is 100 nanosecond ticks since 1 January 1601
 
|-
 
|-
 
|}
 
|}

Revision as of 04:15, 2 September 2016

Return to Unit Reference


Description


The RTC unit provides the device interface for real time clock modules to be registered with Ultibo core. Each RTC module requires a driver that communicates with the specific hardware to implement the device interface although many devices may use the same chip and will be covered by a single driver.

This unit registers the RTCGetTime and RTCSetTime functions with the Platform unit to enable hardware independent access to a real time clock module.

Constants


To be documented

Type definitions


To be documented

Public variables


To be documented

Function declarations



Initialization functions

[Expand]
procedure RTCInit;
Description: To be documented


RTC functions

[Expand]
function RTCDeviceStart(RTC:PRTCDevice):LongWord;
Description: To be documented


[Expand]
function RTCDeviceStop(RTC:PRTCDevice):LongWord;
Description: To be documented


[Expand]
function RTCDeviceGetTime(RTC:PRTCDevice):Int64;
Description: To be documented


[Expand]
function RTCDeviceSetTime(RTC:PRTCDevice; const Time:Int64):Int64;
Description: To be documented


[Expand]
function RTCDeviceProperties(RTC:PRTCDevice; Properties:PRTCProperties):LongWord;
Description: To be documented


[Expand]
function RTCDeviceCreate:PRTCDevice;
Description: Create a new RTC entry


[Expand]
function RTCDeviceCreateEx(Size:LongWord):PRTCDevice;
Description: Create a new RTC entry


[Expand]
function RTCDeviceDestroy(RTC:PRTCDevice):LongWord;
Description: Destroy an existing RTC entry


[Expand]
function RTCDeviceRegister(RTC:PRTCDevice):LongWord;
Description: Register a new RTC in the RTC table


[Expand]
function RTCDeviceDeregister(RTC:PRTCDevice):LongWord;
Description: Deregister a RTC from the RTC table


[Expand]
function RTCDeviceFind(RTCId:LongWord):PRTCDevice;
Description: To be documented


[Expand]
function RTCDeviceFindByName(const Name:String):PRTCDevice; inline;
Description: To be documented


[Expand]
function RTCDeviceFindByDescription(const Description:String):PRTCDevice; inline;
Description: To be documented


[Expand]
function RTCDeviceEnumerate(Callback:TRTCEnumerate; Data:Pointer):LongWord;
Description: To be documented


[Expand]
function RTCDeviceNotification(RTC:PRTCDevice; Callback:TRTCNotification; Data:Pointer; Notification,Flags:LongWord):LongWord;
Description: To be documented


RTL RTC functions

[Expand]
function SysRTCAvailable:Boolean;
Description: Check if an RTC device is available


[Expand]
function SysRTCGetTime:Int64;
Description: Get the current time from a RTC device


[Expand]
function SysRTCSetTime(const Time:Int64):Int64;
Description: Set the current time for a RTC device


Return to Unit Reference