mbed library sources

Dependents:   frdm_kl05z_gpio_test

Fork of mbed-src by mbed official

Committer:
mbed_official
Date:
Mon Dec 02 11:30:05 2013 +0000
Revision:
52:a51c77007319
Child:
70:c1fbde68b492
Synchronized with git revision 49df530ae72ce97ccc773d1f2c13b38e868e6abd

Full URL: https://github.com/mbedmicro/mbed/commit/49df530ae72ce97ccc773d1f2c13b38e868e6abd/

Add STMicroelectronics NUCLEO_F103RB target

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mbed_official 52:a51c77007319 1 /**
mbed_official 52:a51c77007319 2 ******************************************************************************
mbed_official 52:a51c77007319 3 * @file stm32f10x_rtc.h
mbed_official 52:a51c77007319 4 * @author MCD Application Team
mbed_official 52:a51c77007319 5 * @version V3.5.0
mbed_official 52:a51c77007319 6 * @date 11-March-2011
mbed_official 52:a51c77007319 7 * @brief This file contains all the functions prototypes for the RTC firmware
mbed_official 52:a51c77007319 8 * library.
mbed_official 52:a51c77007319 9 ******************************************************************************
mbed_official 52:a51c77007319 10 * @attention
mbed_official 52:a51c77007319 11 *
mbed_official 52:a51c77007319 12 * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
mbed_official 52:a51c77007319 13 * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
mbed_official 52:a51c77007319 14 * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
mbed_official 52:a51c77007319 15 * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
mbed_official 52:a51c77007319 16 * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
mbed_official 52:a51c77007319 17 * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
mbed_official 52:a51c77007319 18 *
mbed_official 52:a51c77007319 19 * <h2><center>&copy; COPYRIGHT 2011 STMicroelectronics</center></h2>
mbed_official 52:a51c77007319 20 ******************************************************************************
mbed_official 52:a51c77007319 21 */
mbed_official 52:a51c77007319 22
mbed_official 52:a51c77007319 23 /* Define to prevent recursive inclusion -------------------------------------*/
mbed_official 52:a51c77007319 24 #ifndef __STM32F10x_RTC_H
mbed_official 52:a51c77007319 25 #define __STM32F10x_RTC_H
mbed_official 52:a51c77007319 26
mbed_official 52:a51c77007319 27 #ifdef __cplusplus
mbed_official 52:a51c77007319 28 extern "C" {
mbed_official 52:a51c77007319 29 #endif
mbed_official 52:a51c77007319 30
mbed_official 52:a51c77007319 31 /* Includes ------------------------------------------------------------------*/
mbed_official 52:a51c77007319 32 #include "stm32f10x.h"
mbed_official 52:a51c77007319 33
mbed_official 52:a51c77007319 34 /** @addtogroup STM32F10x_StdPeriph_Driver
mbed_official 52:a51c77007319 35 * @{
mbed_official 52:a51c77007319 36 */
mbed_official 52:a51c77007319 37
mbed_official 52:a51c77007319 38 /** @addtogroup RTC
mbed_official 52:a51c77007319 39 * @{
mbed_official 52:a51c77007319 40 */
mbed_official 52:a51c77007319 41
mbed_official 52:a51c77007319 42 /** @defgroup RTC_Exported_Types
mbed_official 52:a51c77007319 43 * @{
mbed_official 52:a51c77007319 44 */
mbed_official 52:a51c77007319 45
mbed_official 52:a51c77007319 46 /**
mbed_official 52:a51c77007319 47 * @}
mbed_official 52:a51c77007319 48 */
mbed_official 52:a51c77007319 49
mbed_official 52:a51c77007319 50 /** @defgroup RTC_Exported_Constants
mbed_official 52:a51c77007319 51 * @{
mbed_official 52:a51c77007319 52 */
mbed_official 52:a51c77007319 53
mbed_official 52:a51c77007319 54 /** @defgroup RTC_interrupts_define
mbed_official 52:a51c77007319 55 * @{
mbed_official 52:a51c77007319 56 */
mbed_official 52:a51c77007319 57
mbed_official 52:a51c77007319 58 #define RTC_IT_OW ((uint16_t)0x0004) /*!< Overflow interrupt */
mbed_official 52:a51c77007319 59 #define RTC_IT_ALR ((uint16_t)0x0002) /*!< Alarm interrupt */
mbed_official 52:a51c77007319 60 #define RTC_IT_SEC ((uint16_t)0x0001) /*!< Second interrupt */
mbed_official 52:a51c77007319 61 #define IS_RTC_IT(IT) ((((IT) & (uint16_t)0xFFF8) == 0x00) && ((IT) != 0x00))
mbed_official 52:a51c77007319 62 #define IS_RTC_GET_IT(IT) (((IT) == RTC_IT_OW) || ((IT) == RTC_IT_ALR) || \
mbed_official 52:a51c77007319 63 ((IT) == RTC_IT_SEC))
mbed_official 52:a51c77007319 64 /**
mbed_official 52:a51c77007319 65 * @}
mbed_official 52:a51c77007319 66 */
mbed_official 52:a51c77007319 67
mbed_official 52:a51c77007319 68 /** @defgroup RTC_interrupts_flags
mbed_official 52:a51c77007319 69 * @{
mbed_official 52:a51c77007319 70 */
mbed_official 52:a51c77007319 71
mbed_official 52:a51c77007319 72 #define RTC_FLAG_RTOFF ((uint16_t)0x0020) /*!< RTC Operation OFF flag */
mbed_official 52:a51c77007319 73 #define RTC_FLAG_RSF ((uint16_t)0x0008) /*!< Registers Synchronized flag */
mbed_official 52:a51c77007319 74 #define RTC_FLAG_OW ((uint16_t)0x0004) /*!< Overflow flag */
mbed_official 52:a51c77007319 75 #define RTC_FLAG_ALR ((uint16_t)0x0002) /*!< Alarm flag */
mbed_official 52:a51c77007319 76 #define RTC_FLAG_SEC ((uint16_t)0x0001) /*!< Second flag */
mbed_official 52:a51c77007319 77 #define IS_RTC_CLEAR_FLAG(FLAG) ((((FLAG) & (uint16_t)0xFFF0) == 0x00) && ((FLAG) != 0x00))
mbed_official 52:a51c77007319 78 #define IS_RTC_GET_FLAG(FLAG) (((FLAG) == RTC_FLAG_RTOFF) || ((FLAG) == RTC_FLAG_RSF) || \
mbed_official 52:a51c77007319 79 ((FLAG) == RTC_FLAG_OW) || ((FLAG) == RTC_FLAG_ALR) || \
mbed_official 52:a51c77007319 80 ((FLAG) == RTC_FLAG_SEC))
mbed_official 52:a51c77007319 81 #define IS_RTC_PRESCALER(PRESCALER) ((PRESCALER) <= 0xFFFFF)
mbed_official 52:a51c77007319 82
mbed_official 52:a51c77007319 83 /**
mbed_official 52:a51c77007319 84 * @}
mbed_official 52:a51c77007319 85 */
mbed_official 52:a51c77007319 86
mbed_official 52:a51c77007319 87 /**
mbed_official 52:a51c77007319 88 * @}
mbed_official 52:a51c77007319 89 */
mbed_official 52:a51c77007319 90
mbed_official 52:a51c77007319 91 /** @defgroup RTC_Exported_Macros
mbed_official 52:a51c77007319 92 * @{
mbed_official 52:a51c77007319 93 */
mbed_official 52:a51c77007319 94
mbed_official 52:a51c77007319 95 /**
mbed_official 52:a51c77007319 96 * @}
mbed_official 52:a51c77007319 97 */
mbed_official 52:a51c77007319 98
mbed_official 52:a51c77007319 99 /** @defgroup RTC_Exported_Functions
mbed_official 52:a51c77007319 100 * @{
mbed_official 52:a51c77007319 101 */
mbed_official 52:a51c77007319 102
mbed_official 52:a51c77007319 103 void RTC_ITConfig(uint16_t RTC_IT, FunctionalState NewState);
mbed_official 52:a51c77007319 104 void RTC_EnterConfigMode(void);
mbed_official 52:a51c77007319 105 void RTC_ExitConfigMode(void);
mbed_official 52:a51c77007319 106 uint32_t RTC_GetCounter(void);
mbed_official 52:a51c77007319 107 void RTC_SetCounter(uint32_t CounterValue);
mbed_official 52:a51c77007319 108 void RTC_SetPrescaler(uint32_t PrescalerValue);
mbed_official 52:a51c77007319 109 void RTC_SetAlarm(uint32_t AlarmValue);
mbed_official 52:a51c77007319 110 uint32_t RTC_GetDivider(void);
mbed_official 52:a51c77007319 111 void RTC_WaitForLastTask(void);
mbed_official 52:a51c77007319 112 void RTC_WaitForSynchro(void);
mbed_official 52:a51c77007319 113 FlagStatus RTC_GetFlagStatus(uint16_t RTC_FLAG);
mbed_official 52:a51c77007319 114 void RTC_ClearFlag(uint16_t RTC_FLAG);
mbed_official 52:a51c77007319 115 ITStatus RTC_GetITStatus(uint16_t RTC_IT);
mbed_official 52:a51c77007319 116 void RTC_ClearITPendingBit(uint16_t RTC_IT);
mbed_official 52:a51c77007319 117
mbed_official 52:a51c77007319 118 #ifdef __cplusplus
mbed_official 52:a51c77007319 119 }
mbed_official 52:a51c77007319 120 #endif
mbed_official 52:a51c77007319 121
mbed_official 52:a51c77007319 122 #endif /* __STM32F10x_RTC_H */
mbed_official 52:a51c77007319 123 /**
mbed_official 52:a51c77007319 124 * @}
mbed_official 52:a51c77007319 125 */
mbed_official 52:a51c77007319 126
mbed_official 52:a51c77007319 127 /**
mbed_official 52:a51c77007319 128 * @}
mbed_official 52:a51c77007319 129 */
mbed_official 52:a51c77007319 130
mbed_official 52:a51c77007319 131 /**
mbed_official 52:a51c77007319 132 * @}
mbed_official 52:a51c77007319 133 */
mbed_official 52:a51c77007319 134
mbed_official 52:a51c77007319 135 /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/