1 |
577 |
jeremybenn |
/******************** (C) COPYRIGHT 2006 STMicroelectronics ********************
|
2 |
|
|
* File Name : 75x_rtc.h
|
3 |
|
|
* Author : MCD Application Team
|
4 |
|
|
* Date First Issued : 03/10/2006
|
5 |
|
|
* Description : This file contains all the functions prototypes for the
|
6 |
|
|
* RTC software library.
|
7 |
|
|
********************************************************************************
|
8 |
|
|
* History:
|
9 |
|
|
* 07/17/2006 : V1.0
|
10 |
|
|
* 03/10/2006 : V0.1
|
11 |
|
|
********************************************************************************
|
12 |
|
|
* THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
|
13 |
|
|
* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
|
14 |
|
|
* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT,
|
15 |
|
|
* INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE
|
16 |
|
|
* CONTENT OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING
|
17 |
|
|
* INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
|
18 |
|
|
*******************************************************************************/
|
19 |
|
|
|
20 |
|
|
/* Define to prevent recursive inclusion -------------------------------------*/
|
21 |
|
|
#ifndef __75x_RTC_H
|
22 |
|
|
#define __75x_RTC_H
|
23 |
|
|
|
24 |
|
|
/* Includes ------------------------------------------------------------------*/
|
25 |
|
|
#include "75x_map.h"
|
26 |
|
|
|
27 |
|
|
/* Exported types ------------------------------------------------------------*/
|
28 |
|
|
/* Exported constants --------------------------------------------------------*/
|
29 |
|
|
/* RTC interrupts define */
|
30 |
|
|
#define RTC_IT_Overflow 0x0004 /* Overflow interrupt */
|
31 |
|
|
#define RTC_IT_Alarm 0x0002 /* Alarm interrupt */
|
32 |
|
|
#define RTC_IT_Second 0x0001 /* Second interrupt */
|
33 |
|
|
|
34 |
|
|
/* RTC interrupts flags */
|
35 |
|
|
#define RTC_FLAG_RTOFF 0x0020 /* RTC Operation OFF flag */
|
36 |
|
|
#define RTC_FLAG_RSF 0x0008 /* Registers Synchronized flag */
|
37 |
|
|
#define RTC_FLAG_Overflow 0x0004 /* Overflow interrupt flag */
|
38 |
|
|
#define RTC_FLAG_Alarm 0x0002 /* Alarm interrupt flag */
|
39 |
|
|
#define RTC_FLAG_Second 0x0001 /* Second interrupt flag */
|
40 |
|
|
|
41 |
|
|
/* Exported macro ------------------------------------------------------------*/
|
42 |
|
|
/* Exported functions ------------------------------------------------------- */
|
43 |
|
|
|
44 |
|
|
void RTC_DeInit(void);
|
45 |
|
|
void RTC_ITConfig(u16 RTC_IT, FunctionalState NewState);
|
46 |
|
|
void RTC_EnterConfigMode(void);
|
47 |
|
|
void RTC_ExitConfigMode(void);
|
48 |
|
|
u32 RTC_GetCounter(void);
|
49 |
|
|
void RTC_SetCounter(u32 CounterValue);
|
50 |
|
|
void RTC_SetPrescaler(u32 PrescalerValue);
|
51 |
|
|
u32 RTC_GetPrescaler(void);
|
52 |
|
|
void RTC_SetAlarm(u32 AlarmValue);
|
53 |
|
|
u32 RTC_GetDivider(void);
|
54 |
|
|
void RTC_WaitForLastTask(void);
|
55 |
|
|
void RTC_WaitForSynchro(void);
|
56 |
|
|
FlagStatus RTC_GetFlagStatus(u16 RTC_FLAG);
|
57 |
|
|
void RTC_ClearFlag(u16 RTC_FLAG);
|
58 |
|
|
ITStatus RTC_GetITStatus(u16 RTC_IT);
|
59 |
|
|
void RTC_ClearITPendingBit(u16 RTC_IT);
|
60 |
|
|
|
61 |
|
|
#endif /* __75x_RTC_H */
|
62 |
|
|
|
63 |
|
|
/******************* (C) COPYRIGHT 2006 STMicroelectronics *****END OF FILE****/
|