* * $Log: x12rtc.c,v $ * Revision 1.1.2.1 2006/02/02 14:01:17 haraldkipp * Year translation was completely broken. Fixed. * * Revision 1.1 2005/10/24 10:21:57 haraldkipp * Initial check in. * * *
Defines | |
#define | I2C_SLA_RTC 0x6F |
#define | I2C_SLA_EEPROM 0x57 |
#define | EEPROM_PAGE_SIZE 64 |
Functions | |
int | X12RtcReadRegs (u_char reg, u_char *buff, size_t cnt) |
Read RTC registers. | |
int | X12RtcWrite (int nv, CONST u_char *buff, size_t cnt) |
Write to RTC registers. | |
int | X12RtcGetClock (struct _tm *tm) |
Get date and time from an X12xx hardware clock. | |
int | X12RtcSetClock (CONST struct _tm *tm) |
Set an X12xx hardware clock. | |
int | X12RtcGetAlarm (int idx, struct _tm *tm, int *aflgs) |
Get alarm date and time of an X12xx hardware clock. | |
int | X12RtcSetAlarm (int idx, struct _tm *tm, int aflgs) |
Set alarm of an X12xx hardware clock. | |
int | X12RtcGetStatus (u_long *sflgs) |
Query RTC status flags. | |
int | X12RtcClearStatus (u_long sflgs) |
Clear RTC status flags. | |
int | X12EepromRead (u_int addr, void *buff, size_t len) |
Read contents from non-volatile EEPROM. | |
int | X12EepromWrite (u_int addr, CONST void *buff, size_t len) |
Store buffer contents in non-volatile EEPROM. | |
int | X12Init (void) |
Initialize the interface to an Intersil X12xx hardware clock. |
|
Read RTC registers.
|
|
Write to RTC registers.
|
|
Get date and time from an X12xx hardware clock.
|
|
Set an X12xx hardware clock. New time will be taken over at the beginning of the next second.
|
|
Get alarm date and time of an X12xx hardware clock.
|
|
Set alarm of an X12xx hardware clock.
|
|
Query RTC status flags.
|
|
Clear RTC status flags.
|
|
Read contents from non-volatile EEPROM.
|
|
Store buffer contents in non-volatile EEPROM. The EEPROM of the X122x has a capacity of 512 bytes, while the X1286 is able to store 32 kBytes.
|
|
Initialize the interface to an Intersil X12xx hardware clock.
|