CARME-M4 BSP  V1.5
rtc_ext.h
Go to the documentation of this file.
1 #ifndef __RTC_EXT_H__
2 #define __RTC_EXT_H__
3 
74 #ifdef __cplusplus
75 extern "C" {
76 #endif /* __cplusplus */
77 
78 /*----- Header-Files -------------------------------------------------------*/
79 #include <stm32f4xx.h> /* Processor STM32F407IG */
80 #include <rtc.h> /* CARME RTC definitions */
81 
82 /*----- Macros -------------------------------------------------------------*/
83 #define CARME_RTC_REG_SEC 0x00
84 #define CARME_RTC_REG_MIN 0x01
85 #define CARME_RTC_REG_HOUR 0x02
86 #define CARME_RTC_REG_WDAY 0x03
87 #define CARME_RTC_REG_DAY 0x04
88 #define CARME_RTC_REG_MONTH 0x05
89 #define CARME_RTC_REG_YEAR 0x06
90 #define CARME_RTC_REG_CTRL 0x07
92 #define CARME_RTC_I2C_ADDR 0xD0
94 /*----- Data types ---------------------------------------------------------*/
95 
96 /*----- Function prototypes ------------------------------------------------*/
97 void CARME_RTC_Ext_Init(void);
100 
101 /*----- Data ---------------------------------------------------------------*/
102 
103 /*----- Implementation -----------------------------------------------------*/
104 
105 #ifdef __cplusplus
106 }
107 #endif /* __cplusplus */
108 
115 #endif /* __RTC_EXT_H__ */
RTC interface. Communication interface to use the RTC from the CARME-M4.
void CARME_RTC_Ext_GetTime(CARME_RTC_TIME_t *time)
Get the Time from the external RTC on mainboard.
Definition: rtc_ext.c:184
void CARME_RTC_Ext_SetTime(CARME_RTC_TIME_t *time)
Set the Time of the external RTC on the mainboard.
Definition: rtc_ext.c:121
Structure to store a full date and time.
Definition: rtc.h:93
void CARME_RTC_Ext_Init(void)
Initialize the RTC on the CARME mainboard.
Definition: rtc_ext.c:100