RTC Task and Library Details

















Task Overview - Task

Real Time Clock

Task Overview - Library

The RTC task and associated library calls, handle the base time keeping facility on a platform. The date and time are handled as the number of seconds since 00:00:00 on the 1st of January 1970 (also called 'Unix Time').

Task Attributes

Task priority : 128 (normal priority)
Task depends on : Tasks/OS/Library/OS.a

Task Description

This task supplies the current time and date (in Unix time - the number of seconds since midnight on the 1st of January, 1970).

Library Description

To be written.

Task History
   
 08 November 2005GJP Created
 05 February 2009GJP Added external read/write of registers
   

Task Function Calls

Here follows a list of functions supplied by this library with a brief description of each. By clicking on a function name, further information will be shown.

FunctionBrief
Lib_RTCGetGet current time
Lib_RTCReadRegisterRead a register from RTC
Lib_RTCSetSet current time
Lib_RTCWriteRegisterWrite a register to RTC











Lib_RTCGet
Get current time

Function prototype

 DWORD Lib_RTCGet();



Input parameter(s)
  
 None 
  


Return value
  
 DWORD - Unix time
  


Purpose
Library function to call up the RTC task to perform a read of the current time. This time, is the number of seconds since 00:00:00 of the 1st of January 1970 (called Unix time).

History
   
 08 November 2005GJP Created
   

Click here to report an error


Back to top








Lib_RTCReadRegister
Read a register from RTC

Function prototype

 BYTE Lib_RTCReadRegister(
                           BYTE addr
 );



Input parameter(s)
  
 BYTE addr - address of register
  


Return value
  
 BYTE - contents of specified register
  


Purpose
Function purpose description pending.

History
   
 05 February 2009GJP Created
   

Click here to report an error


Back to top








Lib_RTCSet
Set current time

Function prototype

 void Lib_RTCSet(
                  DWORD time
 );



Input parameter(s)
  
 DWORD time - Unix time
  


Return value
  
 None 
  


Purpose
Library function to call up the RTC task to perform a setting of the current time. This time, is the number of seconds since 00:00:00 of the 1st of January 1970 (called Unix time).

History
   
 08 November 2005GJP Created
   

Click here to report an error


Back to top








Lib_RTCWriteRegister
Write a register to RTC

Function prototype

 vodi Lib_RTCWriteRegister(
                            BYTE addr,
                            BYTE data
 );



Input parameter(s)
  
 BYTE addr - address of register
 BYTE data - data to place into register
  


Return value
  
 None 
  


Purpose
Function purpose description pending.

History
   
 05 February 2009GJP Created
   

Click here to report an error


Back to top


Back to top


Home   News   Shop   MDOS   Adelian   Luan   Acorn & RISC OS   Consultancy   Hosting   Support   Repository   Contact   Admin                  T and C   Privacy Statement


Click here to report an error or fault with this page