Included Files
- #include <nut/include/cfg/os.h>
- #include <nut/include/dev/twif.h>
- #include <nut/include/sys/event.h>
- #include <nut/include/sys/timer.h>
- #include <nut/include/time.h>
- #include </usr/avr/include/string.h>
- #include <nut/include/dev/x12rtc.h>
Preprocessor definitions
#define I2C_SLA_RTC 0x6F
#define I2C_SLA_EEPROM 0x57
#define EEPROM_PAGE_SIZE 64
Local Variables
rtc_status
static u_long rtc_status
int X12EepromRead ( u_int addr, void* buff, size_t len )
int X12EepromWrite ( u_int addr, const void* buff, size_t len )
int X12Init ( void )
int X12RtcClearStatus ( u_long sflgs )
int X12RtcGetAlarm ( int idx, struct _tm* tm, int* aflgs )
int X12RtcGetClock ( struct _tm* tm )
int X12RtcGetStatus ( u_long* sflgs )
int X12RtcReadRegs ( u_char reg, u_char* buff, size_t cnt )
int X12RtcSetAlarm ( int idx, struct _tm* tm, int aflgs )
int X12RtcSetClock ( const struct _tm* tm )
int X12RtcWrite ( int nv, const u_char* buff, size_t cnt )
static int X12WaitReady ( void )
static int X12WriteEnable ( int on )