File nut/dev/x12rtc.c

References Functions: X12Init() nut/dev/x12rtc.c
  X12RtcClearStatus() nut/dev/x12rtc.c
  X12RtcGetAlarm() nut/dev/x12rtc.c
  X12RtcGetClock() nut/dev/x12rtc.c
  X12RtcGetStatus() nut/dev/x12rtc.c
  X12RtcSetAlarm() nut/dev/x12rtc.c
  X12RtcSetClock() nut/dev/x12rtc.c

Included Files


Preprocessor definitions

#define I2C_SLA_RTC 0x6F

#define I2C_SLA_EEPROM 0x57

#define EEPROM_PAGE_SIZE 64


Global Variable rtcX12x6

NUTRTC rtcX12x6
Visible in:   nut/dev/x12rtc.c

Local Variables

rtc_chip
static u_char rtc_chip
Used in: X12Init()  
  X12RtcGetClock()  
  X12RtcSetClock()  

rtc_status
static u_long rtc_status

Used in: X12RtcClearStatus()  
  X12RtcGetStatus()  

Global Function X12EepromRead()

int X12EepromRead ( u_int addr, void* buff, size_t len )
Prototyped in: nut/include/dev/x12rtc.h
Calls: TwMasterTransact() nut/dev/twbbif.c

Global Function X12EepromWrite()

int X12EepromWrite ( u_int addr, const void* buff, size_t len )
Prototyped in: nut/include/dev/x12rtc.h
Calls: TwMasterTransact() nut/dev/twbbif.c
  X12WaitReady() nut/dev/x12rtc.c
  X12WriteEnable() nut/dev/x12rtc.c
  free(), malloc(), memcpy()

Global Function X12Init()

int X12Init ( void )
Prototyped in: nut/include/dev/x12rtc.h
Calls: NutSleep() nut/os/timer.c
  TwInit() nut/dev/twbbif.c
  X12RtcGetStatus() nut/dev/x12rtc.c
  X12RtcReadRegs() nut/dev/x12rtc.c
Used in:   nut/dev/x12rtc.c
References Variables: rtc_chip nut/dev/x12rtc.c

Global Function X12RtcClearStatus()

int X12RtcClearStatus ( u_long sflgs )
Prototyped in: nut/include/dev/x12rtc.h
Used in:   nut/dev/x12rtc.c
References Variables: rtc_status nut/dev/x12rtc.c

Global Function X12RtcGetAlarm()

int X12RtcGetAlarm ( int idx, struct _tm* tm, int* aflgs )
Prototyped in: nut/include/dev/x12rtc.h
Calls: X12RtcReadRegs() nut/dev/x12rtc.c
  memset()
Used in:   nut/dev/x12rtc.c

Global Function X12RtcGetClock()

int X12RtcGetClock ( struct _tm* tm )
Prototyped in: nut/include/dev/x12rtc.h
Calls: X12RtcReadRegs() nut/dev/x12rtc.c
Used in:   nut/dev/x12rtc.c
References Variables: rtc_chip nut/dev/x12rtc.c

Global Function X12RtcGetStatus()

int X12RtcGetStatus ( u_long* sflgs )
Prototyped in: nut/include/dev/x12rtc.h
Calls: X12RtcReadRegs() nut/dev/x12rtc.c
Called by: X12Init() nut/dev/x12rtc.c
Used in:   nut/dev/x12rtc.c
References Variables: rtc_status nut/dev/x12rtc.c

Global Function X12RtcReadRegs()

int X12RtcReadRegs ( u_char reg, u_char* buff, size_t cnt )
Prototyped in: nut/include/dev/x12rtc.h
Calls: TwMasterTransact() nut/dev/twbbif.c
Called by: X12Init() nut/dev/x12rtc.c
  X12RtcGetAlarm() nut/dev/x12rtc.c
  X12RtcGetClock() nut/dev/x12rtc.c
  X12RtcGetStatus() nut/dev/x12rtc.c

Global Function X12RtcSetAlarm()

int X12RtcSetAlarm ( int idx, const struct _tm* tm, int aflgs )
Prototyped in: nut/include/dev/x12rtc.h
Calls: X12RtcWrite() nut/dev/x12rtc.c
  memset()
Used in:   nut/dev/x12rtc.c

Global Function X12RtcSetClock()

int X12RtcSetClock ( const struct _tm* tm )
Prototyped in: nut/include/dev/x12rtc.h
Calls: X12RtcWrite() nut/dev/x12rtc.c
  memset()
Used in:   nut/dev/x12rtc.c
References Variables: rtc_chip nut/dev/x12rtc.c

Global Function X12RtcWrite()

int X12RtcWrite ( int nv, const u_char* buff, size_t cnt )
Prototyped in: nut/include/dev/x12rtc.h
Calls: TwMasterTransact() nut/dev/twbbif.c
  X12WaitReady() nut/dev/x12rtc.c
  X12WriteEnable() nut/dev/x12rtc.c
Called by: X12RtcSetAlarm() nut/dev/x12rtc.c
  X12RtcSetClock() nut/dev/x12rtc.c

Local Function X12WaitReady()

static int X12WaitReady ( void )
Calls: TwMasterTransact() nut/dev/twbbif.c
Called by: X12EepromWrite() nut/dev/x12rtc.c
  X12RtcWrite() nut/dev/x12rtc.c

Local Function X12WriteEnable()

static int X12WriteEnable ( int on )
Calls: TwMasterTransact() nut/dev/twbbif.c
Called by: X12EepromWrite() nut/dev/x12rtc.c
  X12RtcWrite() nut/dev/x12rtc.c