Unit DS1307

From Ultibo.org
Revision as of 23:51, 13 October 2016 by Ultibo (Talk | contribs)

Jump to: navigation, search

Return to Unit Reference


Description


The Maxim DS1307 is an I2C interface, battery backed real time clock chip with full BCD clock and calendar and 56 bytes of software accessible NVRAM. The chip supports 12 or 24 hour format and is widely used in low cost RTC devices available from a range of suppliers.

This driver extends the real time clock API to include functions for directly reading and writing the NVRAM which could be used for storing device specific information and configuration or for non volatile storage of keys, passwords or tokens.

Constants


To be documented

Type definitions


To be documented

Public variables


To be documented

Function declarations



Initialization functions

[Expand]
procedure DS1307Init;
Description: To be documented


DS1307 RTC functions

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


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


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


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


DS1307 helper functions

[Expand]
function DS1307ReadRTC(RTC:PRTCDevice; Buffer:Pointer; Size:LongWord):LongWord;
Description: To be documented


[Expand]
function DS1307WriteRTC(RTC:PRTCDevice; Buffer:Pointer; Size:LongWord):LongWord;
Description: To be documented


[Expand]
function DS1307ReadNVRAM(RTC:PRTCDevice; Offset:Byte; Buffer:Pointer; Size:LongWord):LongWord;
Description: To be documented


[Expand]
function DS1307WriteNVRAM(RTC:PRTCDevice; Offset:Byte; Buffer:Pointer; Size:LongWord):LongWord;
Description: To be documented


[Expand]
function DS1307ReadControl(RTC:PRTCDevice; var Control:Byte):LongWord;
Description: To be documented


[Expand]
function DS1307WriteControl(RTC:PRTCDevice; Control:Byte):LongWord;
Description: To be documented


[Expand]
function DS1307DefaultRTCTime(RTC:PRTCDevice; Buffer:Pointer; Size:LongWord):Boolean;
Description: To be documented


[Expand]
function DS1307FileTimeToRTCTime(RTC:PRTCDevice; const FileTime:Int64; Buffer:Pointer; Size:LongWord):Boolean;
Description: To be documented


[Expand]
function DS1307RTCTimeToFileTime(RTC:PRTCDevice; Buffer:Pointer; Size:LongWord; var FileTime:Int64):Boolean;
Description: To be documented


Return to Unit Reference