Difference between revisions of "Unit RTC"
(16 intermediate revisions by the same user not shown) | |||
Line 4: | Line 4: | ||
=== Description === | === Description === | ||
---- | ---- | ||
+ | |||
+ | '''Ultibo Real Time Clock Device Interface unit''' | ||
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. | 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. | ||
Line 12: | Line 14: | ||
---- | ---- | ||
− | '' | + | |
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''RTC specific constants''' <code> RTC_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>RTC_NAME_PREFIX = 'RTC';</code> | ||
+ | | Name prefix for RTC Devices | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''RTC device type''' <code> RTC_TYPE_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>RTC_TYPE_NONE = 0;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>RTC_TYPE_MAX = 0;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>RTC_TYPE_NAMES:array[RTC_TYPE_NONE..RTC_TYPE_MAX] of String = ('RTC_TYPE_NONE');</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''RTC device state''' <code> RTC_STATE_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>RTC_STATE_DISABLED = 0;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>RTC_STATE_ENABLED = 1;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>RTC_STATE_MAX = 1;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>RTC_STATE_NAMES:array[RTC_STATE_DISABLED..RTC_STATE_MAX] of String = ('RTC_STATE_DISABLED', 'RTC_STATE_ENABLED');</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''RTC device flag''' <code> RTC_FLAG_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>RTC_FLAG_NONE = $00000000;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>RTC_FLAG_ALARM = $00000001;</code> | ||
+ | | Device supports one or more alarms | ||
+ | |- | ||
+ | | <code>RTC_FLAG_WATCHDOG = $00000002;</code> | ||
+ | | Device has a watchdog timer function | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''RTC logging''' <code> RTC_LOG_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>RTC_LOG_LEVEL_DEBUG = LOG_LEVEL_DEBUG;</code> | ||
+ | | RTC debugging messages | ||
+ | |- | ||
+ | | <code>RTC_LOG_LEVEL_INFO = LOG_LEVEL_INFO;</code> | ||
+ | | RTC informational messages, such as a device being attached or detached | ||
+ | |- | ||
+ | | <code>RTC_LOG_LEVEL_WARN = LOG_LEVEL_WARN;</code> | ||
+ | | RTC warning messages | ||
+ | |- | ||
+ | | <code>RTC_LOG_LEVEL_ERROR = LOG_LEVEL_ERROR;</code> | ||
+ | | RTC error messages | ||
+ | |- | ||
+ | | <code>RTC_LOG_LEVEL_NONE = LOG_LEVEL_NONE;</code> | ||
+ | | No RTC messages | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
=== Type definitions === | === Type definitions === | ||
---- | ---- | ||
− | '' | + | |
+ | '''RTC properties''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | <code>PRTCProperties = ^TRTCProperties;</code> | ||
+ | |||
+ | <code>TRTCProperties = record</code> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>Flags:LongWord;</code> | ||
+ | | Device flags (eg RTC_FLAG_ALARM) | ||
+ | |- | ||
+ | | <code>MinTime:Int64;</code> | ||
+ | | Minimum time value represented by the device (Normally the power on reset value) | ||
+ | |- | ||
+ | | <code>MaxTime:Int64;</code> | ||
+ | | Maximum time value represented by the device (Time when a rollover will occur) | ||
+ | |- | ||
+ | | <code>AlarmCount:LongWord;</code> | ||
+ | | Number of alarms supported by the device (0 if not supported) | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | |||
+ | '''RTC enumeration callback''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TRTCEnumerate = function(RTC:PRTCDevice; Data:Pointer):LongWord;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''RTC notification callback''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TRTCNotification = function(Device:PDevice; Data:Pointer; Notification:LongWord):LongWord;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''RTC device start''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TRTCDeviceStart = function(RTC:PRTCDevice):LongWord;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''RTC device stop''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TRTCDeviceStop = function(RTC:PRTCDevice):LongWord;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''RTC device get time''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TRTCDeviceGetTime = function(RTC:PRTCDevice):Int64;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''RTC device set time''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TRTCDeviceSetTime = function(RTC:PRTCDevice; const Time:Int64):Int64;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''RTC device get properties''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TRTCDeviceGetProperties = function(RTC:PRTCDevice; Properties:PRTCProperties):LongWord;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''RTC device''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | <code>PRTCDevice = ^TRTCDevice;</code> | ||
+ | |||
+ | <code>TRTCDevice = record</code> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|''Device Properties'' | ||
+ | |- | ||
+ | | <code>Device:TDevice;</code> | ||
+ | | The Device entry for this RTC | ||
+ | |- | ||
+ | |colspan="2"|''RTC Properties'' | ||
+ | |- | ||
+ | | <code>RTCId:LongWord;</code> | ||
+ | | Unique Id of this RTC in the RTC table | ||
+ | |- | ||
+ | | <code>RTCState:LongWord;</code> | ||
+ | | RTC state (eg RTC_STATE_ENABLED) | ||
+ | |- | ||
+ | | <code>DeviceStart:TRTCDeviceStart;</code> | ||
+ | | A Device specific DeviceStart method implementing the standard RTC device interface | ||
+ | |- | ||
+ | | <code>DeviceStop:TRTCDeviceStop;</code> | ||
+ | | A Device specific DeviceStop method implementing the standard RTC device interface | ||
+ | |- | ||
+ | | <code>DeviceGetTime:TRTCDeviceGetTime;</code> | ||
+ | | A Device specific DeviceGetTime method implementing the standard RTC device interface | ||
+ | |- | ||
+ | | <code>DeviceSetTime:TRTCDeviceSetTime;</code> | ||
+ | | A Device specific DeviceSetTime method implementing the standard RTC device interface | ||
+ | |- | ||
+ | | <code>DeviceGetProperties:TRTCDeviceGetProperties;</code> | ||
+ | | A Device specific DeviceGetProperties method implementing the standard RTC device interface | ||
+ | |- | ||
+ | |colspan="2"|''Statistics Properties'' | ||
+ | |- | ||
+ | | <code>GetCount:LongWord;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SetCount:LongWord;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"|''Driver Properties'' | ||
+ | |- | ||
+ | | <code>Lock:TMutexHandle;</code> | ||
+ | | Device lock | ||
+ | |- | ||
+ | | <code>Properties:TRTCProperties;</code> | ||
+ | | Device properties | ||
+ | |- | ||
+ | |colspan="2"|''Internal Properties'' | ||
+ | |- | ||
+ | | <code>Prev:PRTCDevice;</code> | ||
+ | | Previous entry in RTC table | ||
+ | |- | ||
+ | | <code>Next:PRTCDevice;</code> | ||
+ | | Next entry in RTC table | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
=== Public variables === | === Public variables === | ||
---- | ---- | ||
− | '' | + | |
+ | '''RTC logging''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>RTC_DEFAULT_LOG_LEVEL:LongWord = RTC_LOG_LEVEL_DEBUG;</code> | ||
+ | | style="width: 40%;"|Minimum level for RTC messages. Only messages with level greater than or equal to this will be printed. | ||
+ | |- | ||
+ | |} | ||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>RTC_LOG_ENABLED:Boolean;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | <br /> | ||
=== Function declarations === | === Function declarations === | ||
Line 36: | Line 300: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
− | | | + | | None documented |
|- | |- | ||
|} | |} | ||
Line 43: | Line 307: | ||
<br /> | <br /> | ||
+ | '''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 RTCDeviceStart(RTC:PRTCDevice):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None 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 RTCDeviceStop(RTC:PRTCDevice):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None 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 RTCDeviceGetTime(RTC:PRTCDevice):Int64;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None 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 RTCDeviceSetTime(RTC:PRTCDevice; const Time:Int64):Int64;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None 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 RTCDeviceProperties(RTC:PRTCDevice; Properties:PRTCProperties):LongWord; inline;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the properties for the specified RTC device</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! RTC | ||
+ | | The RTC device to get properties from | ||
+ | |- | ||
+ | ! Properties | ||
+ | | Pointer to a PRTCProperties structure to fill in | ||
+ | |- | ||
+ | ! Return | ||
+ | | ERROR_SUCCESS if completed or another error code on failure | ||
+ | |- | ||
+ | ! Note | ||
+ | | Replaced by RTCDeviceGetProperties for consistency | ||
+ | |- | ||
+ | |} | ||
+ | </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 RTCDeviceGetProperties(RTC:PRTCDevice;Properties:PRTCProperties):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the properties for the specified RTC device</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! RTC | ||
+ | | The RTC device to get properties from | ||
+ | |- | ||
+ | ! Properties | ||
+ | | Pointer to a PRTCProperties structure to fill in | ||
+ | |- | ||
+ | ! Return | ||
+ | | ERROR_SUCCESS if completed 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 RTCDeviceCreate:PRTCDevice;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Create a new RTC entry</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Return | ||
+ | | Pointer to new RTC entry or nil if RTC could not be created | ||
+ | |- | ||
+ | |} | ||
+ | </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 RTCDeviceCreateEx(Size:LongWord):PRTCDevice;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Create a new RTC entry</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Size | ||
+ | | Size in bytes to allocate for new RTC (Including the RTC entry) | ||
+ | |- | ||
+ | ! Return | ||
+ | | Pointer to new RTC entry or nil if RTC could not be created | ||
+ | |- | ||
+ | |} | ||
+ | </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 RTCDeviceDestroy(RTC:PRTCDevice):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Destroy an existing RTC entry</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None 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 RTCDeviceRegister(RTC:PRTCDevice):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Register a new RTC in the RTC table</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None 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 RTCDeviceDeregister(RTC:PRTCDevice):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Deregister a RTC from the RTC table</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None 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 RTCDeviceFind(RTCId:LongWord):PRTCDevice;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None 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 RTCDeviceFindByName(const Name:String):PRTCDevice; inline;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None 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 RTCDeviceFindByDescription(const Description:String):PRTCDevice; inline;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None 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 RTCDeviceEnumerate(Callback:TRTCEnumerate; Data:Pointer):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None 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 RTCDeviceNotification(RTC:PRTCDevice; Callback:TRTCNotification; Data:Pointer; Notification,Flags:LongWord):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None 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 | ||
+ | | None 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 | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | |||
+ | '''RTC helper 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 RTCGetCount:LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the current RTC count</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None 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 RTCDeviceGetDefault:PRTCDevice;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the current default RTC device</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None 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 RTCDeviceSetDefault(RTC:PRTCDevice):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Set the current default RTC device</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None 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 RTCDeviceCheck(RTC:PRTCDevice):PRTCDevice;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Check if the supplied RTC is in the RTC table</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None 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 RTCDeviceTypeToString(RTCType:LongWord):String;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None 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 RTCDeviceStateToString(RTCState:LongWord):String;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None 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 RTCTimeIsValid(const Time:TSystemTime):Boolean;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None 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 RTCSystemTimeToFileTime(const SystemTime:TSystemTime; var FileTime:Int64):Boolean;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' System time is assumed to be UTC and returned file time is UTC</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None 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 RTCFileTimeToSystemTime(const FileTime:Int64; var SystemTime:TSystemTime):Boolean;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' File time is assumed to be UTC and returned system time is UTC</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None 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;">procedure RTCLog(Level:LongWord; RTC:PRTCDevice; const AText:String);</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None 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;">procedure RTCLogInfo(RTC:PRTCDevice; const AText:String); inline;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None 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;">procedure RTCLogWarn(RTC:PRTCDevice; const AText:String); inline;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None 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;">procedure RTCLogError(RTC:PRTCDevice; const AText:String); inline;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None 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;">procedure RTCLogDebug(RTC:PRTCDevice; const AText:String); inline;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
Return to [[Unit_Reference|Unit Reference]] | Return to [[Unit_Reference|Unit Reference]] |
Latest revision as of 03:36, 15 December 2022
Return to Unit Reference
Description
Ultibo Real Time Clock Device Interface unit
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
RTC_*
RTC_NAME_PREFIX = 'RTC';
|
Name prefix for RTC Devices |
RTC_TYPE_*
RTC_TYPE_NONE = 0;
|
|
RTC_TYPE_MAX = 0;
|
|
RTC_TYPE_NAMES:array[RTC_TYPE_NONE..RTC_TYPE_MAX] of String = ('RTC_TYPE_NONE');
|
RTC_STATE_*
RTC_STATE_DISABLED = 0;
|
|
RTC_STATE_ENABLED = 1;
|
|
RTC_STATE_MAX = 1;
|
|
RTC_STATE_NAMES:array[RTC_STATE_DISABLED..RTC_STATE_MAX] of String = ('RTC_STATE_DISABLED', 'RTC_STATE_ENABLED');
|
RTC_FLAG_*
RTC_FLAG_NONE = $00000000;
|
|
RTC_FLAG_ALARM = $00000001;
|
Device supports one or more alarms |
RTC_FLAG_WATCHDOG = $00000002;
|
Device has a watchdog timer function |
RTC_LOG_*
RTC_LOG_LEVEL_DEBUG = LOG_LEVEL_DEBUG;
|
RTC debugging messages |
RTC_LOG_LEVEL_INFO = LOG_LEVEL_INFO;
|
RTC informational messages, such as a device being attached or detached |
RTC_LOG_LEVEL_WARN = LOG_LEVEL_WARN;
|
RTC warning messages |
RTC_LOG_LEVEL_ERROR = LOG_LEVEL_ERROR;
|
RTC error messages |
RTC_LOG_LEVEL_NONE = LOG_LEVEL_NONE;
|
No RTC messages |
Type definitions
RTC properties
PRTCProperties = ^TRTCProperties;
TRTCProperties = record
Flags:LongWord;
|
Device flags (eg RTC_FLAG_ALARM) |
MinTime:Int64;
|
Minimum time value represented by the device (Normally the power on reset value) |
MaxTime:Int64;
|
Maximum time value represented by the device (Time when a rollover will occur) |
AlarmCount:LongWord;
|
Number of alarms supported by the device (0 if not supported) |
RTC enumeration callback
TRTCEnumerate = function(RTC:PRTCDevice; Data:Pointer):LongWord;
|
RTC notification callback
TRTCNotification = function(Device:PDevice; Data:Pointer; Notification:LongWord):LongWord;
|
RTC device start
TRTCDeviceStart = function(RTC:PRTCDevice):LongWord;
|
RTC device stop
TRTCDeviceStop = function(RTC:PRTCDevice):LongWord;
|
RTC device get time
TRTCDeviceGetTime = function(RTC:PRTCDevice):Int64;
|
RTC device set time
TRTCDeviceSetTime = function(RTC:PRTCDevice; const Time:Int64):Int64;
|
RTC device get properties
TRTCDeviceGetProperties = function(RTC:PRTCDevice; Properties:PRTCProperties):LongWord;
|
RTC device
PRTCDevice = ^TRTCDevice;
TRTCDevice = record
Device Properties | |
Device:TDevice;
|
The Device entry for this RTC |
RTC Properties | |
RTCId:LongWord;
|
Unique Id of this RTC in the RTC table |
RTCState:LongWord;
|
RTC state (eg RTC_STATE_ENABLED) |
DeviceStart:TRTCDeviceStart;
|
A Device specific DeviceStart method implementing the standard RTC device interface |
DeviceStop:TRTCDeviceStop;
|
A Device specific DeviceStop method implementing the standard RTC device interface |
DeviceGetTime:TRTCDeviceGetTime;
|
A Device specific DeviceGetTime method implementing the standard RTC device interface |
DeviceSetTime:TRTCDeviceSetTime;
|
A Device specific DeviceSetTime method implementing the standard RTC device interface |
DeviceGetProperties:TRTCDeviceGetProperties;
|
A Device specific DeviceGetProperties method implementing the standard RTC device interface |
Statistics Properties | |
GetCount:LongWord;
|
|
SetCount:LongWord;
|
|
Driver Properties | |
Lock:TMutexHandle;
|
Device lock |
Properties:TRTCProperties;
|
Device properties |
Internal Properties | |
Prev:PRTCDevice;
|
Previous entry in RTC table |
Next:PRTCDevice;
|
Next entry in RTC table |
Public variables
RTC logging
RTC_DEFAULT_LOG_LEVEL:LongWord = RTC_LOG_LEVEL_DEBUG;
|
Minimum level for RTC messages. Only messages with level greater than or equal to this will be printed. |
RTC_LOG_ENABLED:Boolean;
|
Function declarations
Initialization functions
procedure RTCInit;
Note | None documented |
---|
RTC functions
function RTCDeviceStart(RTC:PRTCDevice):LongWord;
Note | None documented |
---|
function RTCDeviceStop(RTC:PRTCDevice):LongWord;
Note | None documented |
---|
function RTCDeviceGetTime(RTC:PRTCDevice):Int64;
Note | None documented |
---|
function RTCDeviceSetTime(RTC:PRTCDevice; const Time:Int64):Int64;
Note | None documented |
---|
function RTCDeviceProperties(RTC:PRTCDevice; Properties:PRTCProperties):LongWord; inline;
RTC | The RTC device to get properties from |
---|---|
Properties | Pointer to a PRTCProperties structure to fill in |
Return | ERROR_SUCCESS if completed or another error code on failure |
Note | Replaced by RTCDeviceGetProperties for consistency |
function RTCDeviceGetProperties(RTC:PRTCDevice;Properties:PRTCProperties):LongWord;
RTC | The RTC device to get properties from |
---|---|
Properties | Pointer to a PRTCProperties structure to fill in |
Return | ERROR_SUCCESS if completed or another error code on failure |
function RTCDeviceCreate:PRTCDevice;
Return | Pointer to new RTC entry or nil if RTC could not be created |
---|
function RTCDeviceCreateEx(Size:LongWord):PRTCDevice;
Size | Size in bytes to allocate for new RTC (Including the RTC entry) |
---|---|
Return | Pointer to new RTC entry or nil if RTC could not be created |
function RTCDeviceDestroy(RTC:PRTCDevice):LongWord;
Note | None documented |
---|
function RTCDeviceRegister(RTC:PRTCDevice):LongWord;
Note | None documented |
---|
function RTCDeviceDeregister(RTC:PRTCDevice):LongWord;
Note | None documented |
---|
function RTCDeviceFind(RTCId:LongWord):PRTCDevice;
Note | None documented |
---|
function RTCDeviceFindByName(const Name:String):PRTCDevice; inline;
Note | None documented |
---|
function RTCDeviceFindByDescription(const Description:String):PRTCDevice; inline;
Note | None documented |
---|
function RTCDeviceEnumerate(Callback:TRTCEnumerate; Data:Pointer):LongWord;
Note | None documented |
---|
function RTCDeviceNotification(RTC:PRTCDevice; Callback:TRTCNotification; Data:Pointer; Notification,Flags:LongWord):LongWord;
Note | None documented |
---|
RTL RTC functions
function SysRTCAvailable:Boolean;
Note | None documented |
---|
function SysRTCGetTime:Int64;
Note | Returned time is 100 nanosecond ticks since 1 January 1601 |
---|
function SysRTCSetTime(const Time:Int64):Int64;
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 |
RTC helper functions
function RTCGetCount:LongWord;
Note | None documented |
---|
function RTCDeviceGetDefault:PRTCDevice;
Note | None documented |
---|
function RTCDeviceSetDefault(RTC:PRTCDevice):LongWord;
Note | None documented |
---|
function RTCDeviceCheck(RTC:PRTCDevice):PRTCDevice;
Note | None documented |
---|
function RTCDeviceTypeToString(RTCType:LongWord):String;
Note | None documented |
---|
function RTCDeviceStateToString(RTCState:LongWord):String;
Note | None documented |
---|
function RTCTimeIsValid(const Time:TSystemTime):Boolean;
Note | None documented |
---|
function RTCSystemTimeToFileTime(const SystemTime:TSystemTime; var FileTime:Int64):Boolean;
Note | None documented |
---|
function RTCFileTimeToSystemTime(const FileTime:Int64; var SystemTime:TSystemTime):Boolean;
Note | None documented |
---|
procedure RTCLog(Level:LongWord; RTC:PRTCDevice; const AText:String);
Note | None documented |
---|
procedure RTCLogInfo(RTC:PRTCDevice; const AText:String); inline;
Note | None documented |
---|
procedure RTCLogWarn(RTC:PRTCDevice; const AText:String); inline;
Note | None documented |
---|
procedure RTCLogError(RTC:PRTCDevice; const AText:String); inline;
Note | None documented |
---|
procedure RTCLogDebug(RTC:PRTCDevice; const AText:String); inline;
Note | None documented |
---|
Return to Unit Reference