CARME-M4 BSP  V1.5
External RTC

RTC on CARME mainboard. More...

+ Collaboration diagram for External RTC:

Files

file  rtc_ext.h
 Communication interface to use the RTC on the CARME mainboard.
 
file  rtc_ext.c
 Communication interface to use the RTC on the CARME mainboard.
 

Macros

#define CARME_RTC_REG_SEC   0x00
 
#define CARME_RTC_REG_MIN   0x01
 
#define CARME_RTC_REG_HOUR   0x02
 
#define CARME_RTC_REG_WDAY   0x03
 
#define CARME_RTC_REG_DAY   0x04
 
#define CARME_RTC_REG_MONTH   0x05
 
#define CARME_RTC_REG_YEAR   0x06
 
#define CARME_RTC_REG_CTRL   0x07
 
#define CARME_RTC_I2C_ADDR   0xD0
 

Functions

void CARME_RTC_Ext_Init (void)
 Initialize the RTC on the CARME mainboard. More...
 
void CARME_RTC_Ext_SetTime (CARME_RTC_TIME_t *time)
 Set the Time of the external RTC on the mainboard. More...
 
void CARME_RTC_Ext_GetTime (CARME_RTC_TIME_t *time)
 Get the Time from the external RTC on mainboard. More...
 

Detailed Description

RTC on CARME mainboard.

Macro Definition Documentation

#define CARME_RTC_I2C_ADDR   0xD0

RTC I2C slave address

Definition at line 92 of file rtc_ext.h.

#define CARME_RTC_REG_CTRL   0x07

Register address for control

Definition at line 90 of file rtc_ext.h.

#define CARME_RTC_REG_DAY   0x04

Register address for day

Definition at line 87 of file rtc_ext.h.

#define CARME_RTC_REG_HOUR   0x02

Register address for hour

Definition at line 85 of file rtc_ext.h.

#define CARME_RTC_REG_MIN   0x01

Register address for minute

Definition at line 84 of file rtc_ext.h.

#define CARME_RTC_REG_MONTH   0x05

Register address for month

Definition at line 88 of file rtc_ext.h.

#define CARME_RTC_REG_SEC   0x00

Register address for second

Definition at line 83 of file rtc_ext.h.

#define CARME_RTC_REG_WDAY   0x03

Register address for day of week

Definition at line 86 of file rtc_ext.h.

#define CARME_RTC_REG_YEAR   0x06

Register address for year

Definition at line 89 of file rtc_ext.h.

Function Documentation

void CARME_RTC_Ext_GetTime ( CARME_RTC_TIME_t time)

Get the Time from the external RTC on mainboard.

Parameters
[out]timeThe current time is stored in this struct.
Returns
None

Definition at line 184 of file rtc_ext.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void CARME_RTC_Ext_Init ( void  )

Initialize the RTC on the CARME mainboard.

Returns
None

Definition at line 100 of file rtc_ext.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void CARME_RTC_Ext_SetTime ( CARME_RTC_TIME_t time)

Set the Time of the external RTC on the mainboard.

Parameters
[in]timeThis time will be set as the new system time.
The user has to verify that the given date is valid.
Returns
None

Definition at line 121 of file rtc_ext.c.

+ Here is the call graph for this function: