Download Pluto 5 Manual
Transcript
Page 80
3.5.15.4 Example
The following code writes a string to the E2Rom and reads it back in order to test for the presence of the
device.
const char*
char* str[64];
BYTE sr;
E2RStr[]={“E2Rom detected”};
sr=WriteE2Rom(E2RomStr,sizeof(E2RomStr),&E2RomDevice,0);
sr|=ReadE2Rom(&E2RomDevice,0,sizeof(E2RomStr),str);
if(sr) TxString(device,channel,E2RStr);
else TxString(device,channel,"E2Rom not detected...\r");
3.6
Real Time Clock
This module contains a device drive for accessing the real time clock.
3.6.1
BYTE
StartRTC
StartRTC(const DEVICE* dev)
3.6.1.1 Descriptions
Start the RTC running.
3.6.1.2
Parameters
3.6.1.2.1 Parameter1 – dev
A pointer to the RTC device driver structure.
3.6.1.3 Return Value
TRUE on success.
FALSE otherwise.
3.6.1.4 Example
if(StartRTC(&RTCDevice))
{
// Clock is now running
}
3.6.2
BYTE
StopRTC
StopRTC(const DEVICE* dev)
3.6.2.1 Descriptions
Stop the RTC.
3.6.2.2
Parameters
3.6.2.2.1 Parameter1 – dev
A pointer to the RTC device driver structure.
3.6.2.3 Return Value
TRUE on success. FALSE otherwise.
3.6.2.4 Example
if(StopRTC(&RTCDevice))
{ // Clock is now running }
Document No. 80-16040 Issue 6r1
HEBER LTD