1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2<html> 3 4<head> 5<META http-equiv="Content-Type" content="text/html; charset=windows-1252"> 6<META name="GENERATOR" content="IBM WebSphere Studio Homepage Builder Version 7.0.0.0 for Windows"> 7<META http-equiv="Content-Style-Type" content="text/css"> 8<title>RTC_InitSWClock</title> 9<LINK rel="stylesheet" href="../css/nitro.css" type="text/css"> 10</head> 11 12<body> 13 14<h1 align="left">RTC_InitSWClock <img src="../image/NTR.gif" align="middle"><img src="../image/TWL.gif" align="middle"></h1> 15 16<h2>Syntax</h2> 17 18<dl> 19 <dd> 20<CODE>#include <nitro/rtc.h></CODE><BR> 21<PRE><CODE><A href="RTCResult.html">RTCResult</A> RTC_InitSWClock( void );</CODE></PRE> 22 </dd> 23 24</dl><h2>Arguments</h2> 25<p>None.</p> 26 27<h2>Return Values</h2> 28<p> 29Returns the return value from calling the <code><A href="RTC_SyncSWClock.html">RTC_SyncSWClock</A></code> function during initialization. 30</p> 31 32<H2>Description</H2> 33<P> 34Initializes the software clock. The software clock calculates the time based on the tick value that can be obtained from the <code><A href="../os/time/OS_GetTick.html">OS_GetTick</A></code> function. 35</P> 36 37<P> 38The <code><A href="RTC_SyncSWClock.html">RTC_SyncSWClock</A></code> function is called during initialization to synchronize the software and real-time clock. Following initialization, you can call the <code><A href="RTC_GetSWClockTick.html">RTC_GetSWClockTick</A></code> function to get the total number of ticks that have elapsed since midnight on January 1, 2000. Date and time data can be obtained by calling the <code><A href="RTC_GetDateTimeExFromSWClock.html">RTC_GetDateTimeExFromSWClock</A></code> function. 39</P> 40 41<P> 42The software clock does not advance while the TWL system is in sleep mode. Calling this function will therefore add a function to the callback list to invoke <code><A href="RTC_SyncSWClock.html">RTC_SyncSWClock</A></code> on recovery from sleep mode and re-synchronize the software clock with the real-time clock. 43</P> 44 45<P> 46The <code><A href="../os/time/OS_InitTick.html">OS_InitTick</A></code> function must be called before this one to initialize ticks. Do not call this function while PXI interrupts are disabled, because it calls the <code><A href="RTC_GetDateTime.html">RTC_GetDateTime</A></code> function internally. 47</P> 48 49<h2>See Also</h2> 50<P><CODE><A href="RTC_SyncSWClock.html">RTC_SyncSWClock</A>, <A href="RTC_GetSWClockTick.html">RTC_GetSWClockTick</A>, <A href="RTC_GetDateTimeExFromSWClock.html">RTC_GetDateTimeExFromSWClock</A>, <A href="RTCResult.html">RTCResult</A></CODE></P> 51 52<H2>Revision History</H2> 53<P> 542008/04/17 Initial version. 55</P> 56<hr><p>CONFIDENTIAL</p></body> 57</html> 58