DS1338 RTC library RTC + 55 bytes nvram

Embed: (wiki syntax)

« Back to documentation index

DS1338 Class Reference

DS1338 Class Reference

class to use a DS1338 rtc More...

#include <ds1338.h>

Public Member Functions

void read (unsigned char adr, unsigned char count, char *data)
 read bytes
void write (unsigned char adr, unsigned char count, char *data)
 write bytes
void readTime (tm *x)
 read the current time
void writeTime (tm *x)
 read the current time

Detailed Description

class to use a DS1338 rtc

Definition at line 13 of file ds1338.h.


Member Function Documentation

void read ( unsigned char  adr,
unsigned char  count,
char *  data 
)

read bytes

read bytes from nvram (55 bytes available)

Parameters:
adrthe start address
countnumber of byte to read
datawhere to put the bytes
Returns:
the byte
Parameters:
adrthe start address (starts at 0)
countnumber of byte to read
datawhere to put the bytes
Returns:
the byte

Definition at line 30 of file ds1338.cpp.

void readTime ( tm *  time )

read the current time

Parameters:
xthe time;

Definition at line 59 of file ds1338.cpp.

void write ( unsigned char  adr,
unsigned char  count,
char *  data 
)

write bytes

write bytes to nvram (55 bytes available)

Parameters:
adrthe start address
countnumber of byte to write
datato be written
Returns:
the byte
Parameters:
adrthe start address (starts at 0)
countnumber of byte to write
datato be written
Returns:
the byte

Definition at line 45 of file ds1338.cpp.

void writeTime ( tm *  time )

read the current time

write the current time

Parameters:
xthe time;
timethe time;

Definition at line 99 of file ds1338.cpp.