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/memdebug.h>
- #include <nut/include/dev/x12rtc.h>
Preprocessor definitions
#define NUT_DEPRECATED
#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 ( NUTRTC* rtc )
int X12RtcClearStatus ( NUTRTC* rtc, uint32_t sflgs )
int X12RtcGetAlarm ( NUTRTC* rtc, int idx, struct _tm* tm, int* aflgs )
int X12RtcGetClock ( NUTRTC* rtc, struct _tm* tm )
int X12RtcGetStatus ( NUTRTC* rtc, uint32_t* sflgs )
int X12RtcReadRegs ( uint8_t reg, uint8_t* buff, size_t cnt )
int X12RtcSetAlarm ( NUTRTC* rtc, int idx, const struct _tm* tm, int aflgs )
int X12RtcSetClock ( NUTRTC* rtc, const struct _tm* tm )
int X12RtcWrite ( int nv, const uint8_t* buff, size_t cnt )
static int X12WaitReady ( void )
static int X12WriteEnable ( int on )