Included Files
- #include <nut/include/cfg/os.h>
- #include <nut/include/cfg/eeprom.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/memdebug.h>
- #include <nut/include/dev/x12rtc.h>
Preprocessor definitions
#define I2C_SLA_RTC 0x6F
#define I2C_SLA_EEPROM 0x57
#define EEPROM_PAGE_SIZE 64
NUTRTC rtcX12x6
Local Variables
rtc_chip
static uint8_t rtc_chip
rtc_status
static uint32_t rtc_status
int X12EepromRead ( unsigned int addr, void* buff, size_t len )
int X12EepromWrite ( unsigned int addr, const void* buff, size_t len )
int X12Init ( void )
int X12RtcClearStatus ( uint32_t sflgs )
int X12RtcGetAlarm ( int idx, struct _tm* tm, int* aflgs )
int X12RtcGetClock ( struct _tm* tm )
int X12RtcGetStatus ( uint32_t* sflgs )
int X12RtcReadRegs ( uint8_t reg, uint8_t* buff, size_t cnt )
int X12RtcSetAlarm ( int idx, const struct _tm* tm, int aflgs )
int X12RtcSetClock ( const struct _tm* tm )
int X12RtcWrite ( int nv, const uint8_t* buff, size_t cnt )
static int X12WaitReady ( void )
static int X12WriteEnable ( int on )