mbed library sources

Fork of mbed-src by mbed official

Committer:
moirans2
Date:
Wed Jan 14 20:53:08 2015 +0000
Revision:
445:9a3ffe6cfa19
Parent:
441:d2c15dda23c1
internal clock stm32L051

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mbed_official 340:28d1f895c6fe 1 /**
mbed_official 340:28d1f895c6fe 2 ******************************************************************************
mbed_official 340:28d1f895c6fe 3 * @file stm32f0xx_hal_rtc.h
mbed_official 340:28d1f895c6fe 4 * @author MCD Application Team
mbed_official 441:d2c15dda23c1 5 * @version V1.2.0
mbed_official 441:d2c15dda23c1 6 * @date 11-December-2014
mbed_official 340:28d1f895c6fe 7 * @brief Header file of RTC HAL module.
mbed_official 340:28d1f895c6fe 8 ******************************************************************************
mbed_official 340:28d1f895c6fe 9 * @attention
mbed_official 340:28d1f895c6fe 10 *
mbed_official 340:28d1f895c6fe 11 * <h2><center>&copy; COPYRIGHT(c) 2014 STMicroelectronics</center></h2>
mbed_official 340:28d1f895c6fe 12 *
mbed_official 340:28d1f895c6fe 13 * Redistribution and use in source and binary forms, with or without modification,
mbed_official 340:28d1f895c6fe 14 * are permitted provided that the following conditions are met:
mbed_official 340:28d1f895c6fe 15 * 1. Redistributions of source code must retain the above copyright notice,
mbed_official 340:28d1f895c6fe 16 * this list of conditions and the following disclaimer.
mbed_official 340:28d1f895c6fe 17 * 2. Redistributions in binary form must reproduce the above copyright notice,
mbed_official 340:28d1f895c6fe 18 * this list of conditions and the following disclaimer in the documentation
mbed_official 340:28d1f895c6fe 19 * and/or other materials provided with the distribution.
mbed_official 340:28d1f895c6fe 20 * 3. Neither the name of STMicroelectronics nor the names of its contributors
mbed_official 340:28d1f895c6fe 21 * may be used to endorse or promote products derived from this software
mbed_official 340:28d1f895c6fe 22 * without specific prior written permission.
mbed_official 340:28d1f895c6fe 23 *
mbed_official 340:28d1f895c6fe 24 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
mbed_official 340:28d1f895c6fe 25 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
mbed_official 340:28d1f895c6fe 26 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
mbed_official 340:28d1f895c6fe 27 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
mbed_official 340:28d1f895c6fe 28 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
mbed_official 340:28d1f895c6fe 29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
mbed_official 340:28d1f895c6fe 30 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
mbed_official 340:28d1f895c6fe 31 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
mbed_official 340:28d1f895c6fe 32 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
mbed_official 340:28d1f895c6fe 33 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
mbed_official 340:28d1f895c6fe 34 *
mbed_official 340:28d1f895c6fe 35 ******************************************************************************
mbed_official 340:28d1f895c6fe 36 */
mbed_official 340:28d1f895c6fe 37
mbed_official 340:28d1f895c6fe 38 /* Define to prevent recursive inclusion -------------------------------------*/
mbed_official 340:28d1f895c6fe 39 #ifndef __STM32F0xx_HAL_RTC_H
mbed_official 340:28d1f895c6fe 40 #define __STM32F0xx_HAL_RTC_H
mbed_official 340:28d1f895c6fe 41
mbed_official 340:28d1f895c6fe 42 #ifdef __cplusplus
mbed_official 340:28d1f895c6fe 43 extern "C" {
mbed_official 340:28d1f895c6fe 44 #endif
mbed_official 340:28d1f895c6fe 45
mbed_official 340:28d1f895c6fe 46 /* Includes ------------------------------------------------------------------*/
mbed_official 340:28d1f895c6fe 47 #include "stm32f0xx_hal_def.h"
mbed_official 340:28d1f895c6fe 48
mbed_official 340:28d1f895c6fe 49 /** @addtogroup STM32F0xx_HAL_Driver
mbed_official 340:28d1f895c6fe 50 * @{
mbed_official 340:28d1f895c6fe 51 */
mbed_official 340:28d1f895c6fe 52
mbed_official 340:28d1f895c6fe 53 /** @addtogroup RTC RTC HAL module driver
mbed_official 340:28d1f895c6fe 54 * @{
mbed_official 340:28d1f895c6fe 55 */
mbed_official 340:28d1f895c6fe 56
mbed_official 340:28d1f895c6fe 57 /* Exported types ------------------------------------------------------------*/
mbed_official 340:28d1f895c6fe 58 /** @defgroup RTC_Exported_Types RTC Exported Types
mbed_official 340:28d1f895c6fe 59 * @{
mbed_official 340:28d1f895c6fe 60 */
mbed_official 340:28d1f895c6fe 61
mbed_official 340:28d1f895c6fe 62 /**
mbed_official 340:28d1f895c6fe 63 * @brief HAL State structures definition
mbed_official 340:28d1f895c6fe 64 */
mbed_official 340:28d1f895c6fe 65 typedef enum
mbed_official 340:28d1f895c6fe 66 {
mbed_official 340:28d1f895c6fe 67 HAL_RTC_STATE_RESET = 0x00, /*!< RTC not yet initialized or disabled */
mbed_official 340:28d1f895c6fe 68 HAL_RTC_STATE_READY = 0x01, /*!< RTC initialized and ready for use */
mbed_official 340:28d1f895c6fe 69 HAL_RTC_STATE_BUSY = 0x02, /*!< RTC process is ongoing */
mbed_official 340:28d1f895c6fe 70 HAL_RTC_STATE_TIMEOUT = 0x03, /*!< RTC timeout state */
mbed_official 340:28d1f895c6fe 71 HAL_RTC_STATE_ERROR = 0x04 /*!< RTC error state */
mbed_official 340:28d1f895c6fe 72
mbed_official 340:28d1f895c6fe 73 }HAL_RTCStateTypeDef;
mbed_official 340:28d1f895c6fe 74
mbed_official 340:28d1f895c6fe 75 /**
mbed_official 340:28d1f895c6fe 76 * @brief RTC Configuration Structure definition
mbed_official 340:28d1f895c6fe 77 */
mbed_official 340:28d1f895c6fe 78 typedef struct
mbed_official 340:28d1f895c6fe 79 {
mbed_official 340:28d1f895c6fe 80 uint32_t HourFormat; /*!< Specifies the RTC Hour Format.
mbed_official 340:28d1f895c6fe 81 This parameter can be a value of @ref RTC_Hour_Formats */
mbed_official 340:28d1f895c6fe 82
mbed_official 340:28d1f895c6fe 83 uint32_t AsynchPrediv; /*!< Specifies the RTC Asynchronous Predivider value.
mbed_official 340:28d1f895c6fe 84 This parameter must be a number between Min_Data = 0x00 and Max_Data = 0x7F */
mbed_official 340:28d1f895c6fe 85
mbed_official 340:28d1f895c6fe 86 uint32_t SynchPrediv; /*!< Specifies the RTC Synchronous Predivider value.
mbed_official 340:28d1f895c6fe 87 This parameter must be a number between Min_Data = 0x00 and Max_Data = 0x7FFF */
mbed_official 340:28d1f895c6fe 88
mbed_official 340:28d1f895c6fe 89 uint32_t OutPut; /*!< Specifies which signal will be routed to the RTC output.
mbed_official 340:28d1f895c6fe 90 This parameter can be a value of @ref RTCEx_Output_selection_Definitions */
mbed_official 340:28d1f895c6fe 91
mbed_official 340:28d1f895c6fe 92 uint32_t OutPutPolarity; /*!< Specifies the polarity of the output signal.
mbed_official 340:28d1f895c6fe 93 This parameter can be a value of @ref RTC_Output_Polarity_Definitions */
mbed_official 340:28d1f895c6fe 94
mbed_official 340:28d1f895c6fe 95 uint32_t OutPutType; /*!< Specifies the RTC Output Pin mode.
mbed_official 340:28d1f895c6fe 96 This parameter can be a value of @ref RTC_Output_Type_ALARM_OUT */
mbed_official 340:28d1f895c6fe 97 }RTC_InitTypeDef;
mbed_official 340:28d1f895c6fe 98
mbed_official 340:28d1f895c6fe 99 /**
mbed_official 340:28d1f895c6fe 100 * @brief RTC Time structure definition
mbed_official 340:28d1f895c6fe 101 */
mbed_official 340:28d1f895c6fe 102 typedef struct
mbed_official 340:28d1f895c6fe 103 {
mbed_official 340:28d1f895c6fe 104 uint8_t Hours; /*!< Specifies the RTC Time Hour.
mbed_official 340:28d1f895c6fe 105 This parameter must be a number between Min_Data = 0 and Max_Data = 12 if the RTC_HourFormat_12 is selected.
mbed_official 340:28d1f895c6fe 106 This parameter must be a number between Min_Data = 0 and Max_Data = 23 if the RTC_HourFormat_24 is selected */
mbed_official 340:28d1f895c6fe 107
mbed_official 340:28d1f895c6fe 108 uint8_t Minutes; /*!< Specifies the RTC Time Minutes.
mbed_official 340:28d1f895c6fe 109 This parameter must be a number between Min_Data = 0 and Max_Data = 59 */
mbed_official 340:28d1f895c6fe 110
mbed_official 340:28d1f895c6fe 111 uint8_t Seconds; /*!< Specifies the RTC Time Seconds.
mbed_official 340:28d1f895c6fe 112 This parameter must be a number between Min_Data = 0 and Max_Data = 59 */
mbed_official 340:28d1f895c6fe 113
mbed_official 340:28d1f895c6fe 114 uint32_t SubSeconds; /*!< Specifies the RTC Time SubSeconds.
mbed_official 340:28d1f895c6fe 115 This parameter must be a number between Min_Data = 0 and Max_Data = 59 */
mbed_official 340:28d1f895c6fe 116
mbed_official 340:28d1f895c6fe 117 uint8_t TimeFormat; /*!< Specifies the RTC AM/PM Time.
mbed_official 340:28d1f895c6fe 118 This parameter can be a value of @ref RTC_AM_PM_Definitions */
mbed_official 340:28d1f895c6fe 119
mbed_official 340:28d1f895c6fe 120 uint32_t DayLightSaving; /*!< Specifies RTC_DayLightSaveOperation: the value of hour adjustment.
mbed_official 340:28d1f895c6fe 121 This parameter can be a value of @ref RTC_DayLightSaving_Definitions */
mbed_official 340:28d1f895c6fe 122
mbed_official 340:28d1f895c6fe 123 uint32_t StoreOperation; /*!< Specifies RTC_StoreOperation value to be written in the BCK bit
mbed_official 340:28d1f895c6fe 124 in CR register to store the operation.
mbed_official 340:28d1f895c6fe 125 This parameter can be a value of @ref RTC_StoreOperation_Definitions */
mbed_official 340:28d1f895c6fe 126 }RTC_TimeTypeDef;
mbed_official 340:28d1f895c6fe 127
mbed_official 340:28d1f895c6fe 128 /**
mbed_official 340:28d1f895c6fe 129 * @brief RTC Date structure definition
mbed_official 340:28d1f895c6fe 130 */
mbed_official 340:28d1f895c6fe 131 typedef struct
mbed_official 340:28d1f895c6fe 132 {
mbed_official 340:28d1f895c6fe 133 uint8_t WeekDay; /*!< Specifies the RTC Date WeekDay.
mbed_official 340:28d1f895c6fe 134 This parameter can be a value of @ref RTC_WeekDay_Definitions */
mbed_official 340:28d1f895c6fe 135
mbed_official 340:28d1f895c6fe 136 uint8_t Month; /*!< Specifies the RTC Date Month (in BCD format).
mbed_official 340:28d1f895c6fe 137 This parameter can be a value of @ref RTC_Month_Date_Definitions */
mbed_official 340:28d1f895c6fe 138
mbed_official 340:28d1f895c6fe 139 uint8_t Date; /*!< Specifies the RTC Date.
mbed_official 340:28d1f895c6fe 140 This parameter must be a number between Min_Data = 1 and Max_Data = 31 */
mbed_official 340:28d1f895c6fe 141
mbed_official 340:28d1f895c6fe 142 uint8_t Year; /*!< Specifies the RTC Date Year.
mbed_official 340:28d1f895c6fe 143 This parameter must be a number between Min_Data = 0 and Max_Data = 99 */
mbed_official 340:28d1f895c6fe 144
mbed_official 340:28d1f895c6fe 145 }RTC_DateTypeDef;
mbed_official 340:28d1f895c6fe 146
mbed_official 340:28d1f895c6fe 147 /**
mbed_official 340:28d1f895c6fe 148 * @brief RTC Alarm structure definition
mbed_official 340:28d1f895c6fe 149 */
mbed_official 340:28d1f895c6fe 150 typedef struct
mbed_official 340:28d1f895c6fe 151 {
mbed_official 340:28d1f895c6fe 152 RTC_TimeTypeDef AlarmTime; /*!< Specifies the RTC Alarm Time members */
mbed_official 340:28d1f895c6fe 153
mbed_official 340:28d1f895c6fe 154 uint32_t AlarmMask; /*!< Specifies the RTC Alarm Masks.
mbed_official 340:28d1f895c6fe 155 This parameter can be a value of @ref RTC_AlarmMask_Definitions */
mbed_official 340:28d1f895c6fe 156
mbed_official 340:28d1f895c6fe 157 uint32_t AlarmSubSecondMask; /*!< Specifies the RTC Alarm SubSeconds Masks.
mbed_official 340:28d1f895c6fe 158 This parameter can be a value of @ref RTC_Alarm_Sub_Seconds_Masks_Definitions */
mbed_official 340:28d1f895c6fe 159
mbed_official 340:28d1f895c6fe 160 uint32_t AlarmDateWeekDaySel; /*!< Specifies the RTC Alarm is on Date or WeekDay.
mbed_official 340:28d1f895c6fe 161 This parameter can be a value of @ref RTC_AlarmDateWeekDay_Definitions */
mbed_official 340:28d1f895c6fe 162
mbed_official 340:28d1f895c6fe 163 uint8_t AlarmDateWeekDay; /*!< Specifies the RTC Alarm Date/WeekDay.
mbed_official 340:28d1f895c6fe 164 If the Alarm Date is selected, this parameter must be set to a value in the 1-31 range.
mbed_official 340:28d1f895c6fe 165 If the Alarm WeekDay is selected, this parameter can be a value of @ref RTC_WeekDay_Definitions */
mbed_official 340:28d1f895c6fe 166
mbed_official 340:28d1f895c6fe 167 uint32_t Alarm; /*!< Specifies the alarm .
mbed_official 340:28d1f895c6fe 168 This parameter can be a value of @ref RTC_Alarms_Definitions */
mbed_official 340:28d1f895c6fe 169 }RTC_AlarmTypeDef;
mbed_official 340:28d1f895c6fe 170
mbed_official 340:28d1f895c6fe 171 /**
mbed_official 340:28d1f895c6fe 172 * @brief Time Handle Structure definition
mbed_official 340:28d1f895c6fe 173 */
mbed_official 340:28d1f895c6fe 174 typedef struct
mbed_official 340:28d1f895c6fe 175 {
mbed_official 340:28d1f895c6fe 176 RTC_TypeDef *Instance; /*!< Register base address */
mbed_official 340:28d1f895c6fe 177
mbed_official 340:28d1f895c6fe 178 RTC_InitTypeDef Init; /*!< RTC required parameters */
mbed_official 340:28d1f895c6fe 179
mbed_official 340:28d1f895c6fe 180 HAL_LockTypeDef Lock; /*!< RTC locking object */
mbed_official 340:28d1f895c6fe 181
mbed_official 340:28d1f895c6fe 182 __IO HAL_RTCStateTypeDef State; /*!< Time communication state */
mbed_official 340:28d1f895c6fe 183
mbed_official 340:28d1f895c6fe 184 }RTC_HandleTypeDef;
mbed_official 340:28d1f895c6fe 185 /**
mbed_official 340:28d1f895c6fe 186 * @}
mbed_official 340:28d1f895c6fe 187 */
mbed_official 340:28d1f895c6fe 188
mbed_official 340:28d1f895c6fe 189 /* Exported constants --------------------------------------------------------*/
mbed_official 340:28d1f895c6fe 190 /** @defgroup RTC_Exported_Constants RTC Exported Constants
mbed_official 340:28d1f895c6fe 191 * @{
mbed_official 340:28d1f895c6fe 192 */
mbed_official 340:28d1f895c6fe 193
mbed_official 340:28d1f895c6fe 194 /** @defgroup RTC_Mask_Definition RTC Mask Definition
mbed_official 340:28d1f895c6fe 195 * @{
mbed_official 340:28d1f895c6fe 196 */
mbed_official 340:28d1f895c6fe 197 /* Masks Definition */
mbed_official 340:28d1f895c6fe 198 #define RTC_TR_RESERVED_MASK ((uint32_t)0x007F7F7F)
mbed_official 340:28d1f895c6fe 199 #define RTC_DR_RESERVED_MASK ((uint32_t)0x00FFFF3F)
mbed_official 340:28d1f895c6fe 200 #define RTC_INIT_MASK ((uint32_t)0xFFFFFFFF)
mbed_official 340:28d1f895c6fe 201 #define RTC_RSF_MASK ((uint32_t)0xFFFFFF5F)
mbed_official 340:28d1f895c6fe 202
mbed_official 340:28d1f895c6fe 203 #define RTC_TIMEOUT_VALUE 1000
mbed_official 340:28d1f895c6fe 204 /**
mbed_official 340:28d1f895c6fe 205 * @}
mbed_official 340:28d1f895c6fe 206 */
mbed_official 340:28d1f895c6fe 207
mbed_official 340:28d1f895c6fe 208 /** @defgroup RTC_Hour_Formats RTC Hour Formats
mbed_official 340:28d1f895c6fe 209 * @{
mbed_official 340:28d1f895c6fe 210 */
mbed_official 340:28d1f895c6fe 211 #define RTC_HOURFORMAT_24 ((uint32_t)0x00000000)
mbed_official 340:28d1f895c6fe 212 #define RTC_HOURFORMAT_12 ((uint32_t)0x00000040)
mbed_official 340:28d1f895c6fe 213
mbed_official 340:28d1f895c6fe 214 #define IS_RTC_HOUR_FORMAT(FORMAT) (((FORMAT) == RTC_HOURFORMAT_12) || \
mbed_official 340:28d1f895c6fe 215 ((FORMAT) == RTC_HOURFORMAT_24))
mbed_official 340:28d1f895c6fe 216 /**
mbed_official 340:28d1f895c6fe 217 * @}
mbed_official 340:28d1f895c6fe 218 */
mbed_official 340:28d1f895c6fe 219
mbed_official 340:28d1f895c6fe 220 /** @defgroup RTC_Output_Polarity_Definitions RTC Output Polarity Definitions
mbed_official 340:28d1f895c6fe 221 * @{
mbed_official 340:28d1f895c6fe 222 */
mbed_official 340:28d1f895c6fe 223 #define RTC_OUTPUT_POLARITY_HIGH ((uint32_t)0x00000000)
mbed_official 340:28d1f895c6fe 224 #define RTC_OUTPUT_POLARITY_LOW ((uint32_t)0x00100000)
mbed_official 340:28d1f895c6fe 225
mbed_official 340:28d1f895c6fe 226 #define IS_RTC_OUTPUT_POL(POL) (((POL) == RTC_OUTPUT_POLARITY_HIGH) || \
mbed_official 340:28d1f895c6fe 227 ((POL) == RTC_OUTPUT_POLARITY_LOW))
mbed_official 340:28d1f895c6fe 228 /**
mbed_official 340:28d1f895c6fe 229 * @}
mbed_official 340:28d1f895c6fe 230 */
mbed_official 340:28d1f895c6fe 231
mbed_official 340:28d1f895c6fe 232 /** @defgroup RTC_Output_Type_ALARM_OUT RTC Output Type ALARM OUT
mbed_official 340:28d1f895c6fe 233 * @{
mbed_official 340:28d1f895c6fe 234 */
mbed_official 340:28d1f895c6fe 235 #define RTC_OUTPUT_TYPE_OPENDRAIN ((uint32_t)0x00000000)
mbed_official 340:28d1f895c6fe 236 #define RTC_OUTPUT_TYPE_PUSHPULL ((uint32_t)0x00040000)
mbed_official 340:28d1f895c6fe 237
mbed_official 340:28d1f895c6fe 238 #define IS_RTC_OUTPUT_TYPE(TYPE) (((TYPE) == RTC_OUTPUT_TYPE_OPENDRAIN) || \
mbed_official 340:28d1f895c6fe 239 ((TYPE) == RTC_OUTPUT_TYPE_PUSHPULL))
mbed_official 340:28d1f895c6fe 240
mbed_official 340:28d1f895c6fe 241 /**
mbed_official 340:28d1f895c6fe 242 * @}
mbed_official 340:28d1f895c6fe 243 */
mbed_official 340:28d1f895c6fe 244
mbed_official 340:28d1f895c6fe 245 /** @defgroup RTC_Asynchronous_Predivider RTC Asynchronous Predivider
mbed_official 340:28d1f895c6fe 246 * @{
mbed_official 340:28d1f895c6fe 247 */
mbed_official 340:28d1f895c6fe 248 #define IS_RTC_ASYNCH_PREDIV(PREDIV) ((PREDIV) <= (uint32_t)0x7F)
mbed_official 340:28d1f895c6fe 249 /**
mbed_official 340:28d1f895c6fe 250 * @}
mbed_official 340:28d1f895c6fe 251 */
mbed_official 340:28d1f895c6fe 252
mbed_official 340:28d1f895c6fe 253 /** @defgroup RTC_Synchronous_Predivider RTC Synchronous Predivider
mbed_official 340:28d1f895c6fe 254 * @{
mbed_official 340:28d1f895c6fe 255 */
mbed_official 340:28d1f895c6fe 256 #define IS_RTC_SYNCH_PREDIV(PREDIV) ((PREDIV) <= (uint32_t)0x7FFF)
mbed_official 340:28d1f895c6fe 257 /**
mbed_official 340:28d1f895c6fe 258 * @}
mbed_official 340:28d1f895c6fe 259 */
mbed_official 340:28d1f895c6fe 260
mbed_official 340:28d1f895c6fe 261 /** @defgroup RTC_Time_Definitions RTC Time Definitions
mbed_official 340:28d1f895c6fe 262 * @{
mbed_official 340:28d1f895c6fe 263 */
mbed_official 340:28d1f895c6fe 264 #define IS_RTC_HOUR12(HOUR) (((HOUR) > (uint32_t)0) && ((HOUR) <= (uint32_t)12))
mbed_official 340:28d1f895c6fe 265 #define IS_RTC_HOUR24(HOUR) ((HOUR) <= (uint32_t)23)
mbed_official 340:28d1f895c6fe 266 #define IS_RTC_MINUTES(MINUTES) ((MINUTES) <= (uint32_t)59)
mbed_official 340:28d1f895c6fe 267 #define IS_RTC_SECONDS(SECONDS) ((SECONDS) <= (uint32_t)59)
mbed_official 340:28d1f895c6fe 268 /**
mbed_official 340:28d1f895c6fe 269 * @}
mbed_official 340:28d1f895c6fe 270 */
mbed_official 340:28d1f895c6fe 271
mbed_official 340:28d1f895c6fe 272 /** @defgroup RTC_AM_PM_Definitions RTC AM PM Definitions
mbed_official 340:28d1f895c6fe 273 * @{
mbed_official 340:28d1f895c6fe 274 */
mbed_official 340:28d1f895c6fe 275 #define RTC_HOURFORMAT12_AM ((uint8_t)0x00)
mbed_official 340:28d1f895c6fe 276 #define RTC_HOURFORMAT12_PM ((uint8_t)0x40)
mbed_official 340:28d1f895c6fe 277
mbed_official 340:28d1f895c6fe 278 #define IS_RTC_HOURFORMAT12(PM) (((PM) == RTC_HOURFORMAT12_AM) || ((PM) == RTC_HOURFORMAT12_PM))
mbed_official 340:28d1f895c6fe 279 /**
mbed_official 340:28d1f895c6fe 280 * @}
mbed_official 340:28d1f895c6fe 281 */
mbed_official 340:28d1f895c6fe 282
mbed_official 340:28d1f895c6fe 283 /** @defgroup RTC_DayLightSaving_Definitions RTC DayLightSaving Definitions
mbed_official 340:28d1f895c6fe 284 * @{
mbed_official 340:28d1f895c6fe 285 */
mbed_official 340:28d1f895c6fe 286 #define RTC_DAYLIGHTSAVING_SUB1H ((uint32_t)0x00020000)
mbed_official 340:28d1f895c6fe 287 #define RTC_DAYLIGHTSAVING_ADD1H ((uint32_t)0x00010000)
mbed_official 340:28d1f895c6fe 288 #define RTC_DAYLIGHTSAVING_NONE ((uint32_t)0x00000000)
mbed_official 340:28d1f895c6fe 289
mbed_official 340:28d1f895c6fe 290 #define IS_RTC_DAYLIGHT_SAVING(SAVE) (((SAVE) == RTC_DAYLIGHTSAVING_SUB1H) || \
mbed_official 340:28d1f895c6fe 291 ((SAVE) == RTC_DAYLIGHTSAVING_ADD1H) || \
mbed_official 340:28d1f895c6fe 292 ((SAVE) == RTC_DAYLIGHTSAVING_NONE))
mbed_official 340:28d1f895c6fe 293 /**
mbed_official 340:28d1f895c6fe 294 * @}
mbed_official 340:28d1f895c6fe 295 */
mbed_official 340:28d1f895c6fe 296
mbed_official 340:28d1f895c6fe 297 /** @defgroup RTC_StoreOperation_Definitions RTC StoreOperation Definitions
mbed_official 340:28d1f895c6fe 298 * @{
mbed_official 340:28d1f895c6fe 299 */
mbed_official 340:28d1f895c6fe 300 #define RTC_STOREOPERATION_RESET ((uint32_t)0x00000000)
mbed_official 340:28d1f895c6fe 301 #define RTC_STOREOPERATION_SET ((uint32_t)0x00040000)
mbed_official 340:28d1f895c6fe 302
mbed_official 340:28d1f895c6fe 303 #define IS_RTC_STORE_OPERATION(OPERATION) (((OPERATION) == RTC_STOREOPERATION_RESET) || \
mbed_official 340:28d1f895c6fe 304 ((OPERATION) == RTC_STOREOPERATION_SET))
mbed_official 340:28d1f895c6fe 305 /**
mbed_official 340:28d1f895c6fe 306 * @}
mbed_official 340:28d1f895c6fe 307 */
mbed_official 340:28d1f895c6fe 308
mbed_official 340:28d1f895c6fe 309 /** @defgroup RTC_Input_parameter_format_definitions RTC Input parameter format definitions
mbed_official 340:28d1f895c6fe 310 * @{
mbed_official 340:28d1f895c6fe 311 */
mbed_official 340:28d1f895c6fe 312 #define FORMAT_BIN ((uint32_t)0x000000000)
mbed_official 340:28d1f895c6fe 313 #define FORMAT_BCD ((uint32_t)0x000000001)
mbed_official 340:28d1f895c6fe 314
mbed_official 340:28d1f895c6fe 315 #define IS_RTC_FORMAT(FORMAT) (((FORMAT) == FORMAT_BIN) || ((FORMAT) == FORMAT_BCD))
mbed_official 340:28d1f895c6fe 316 /**
mbed_official 340:28d1f895c6fe 317 * @}
mbed_official 340:28d1f895c6fe 318 */
mbed_official 340:28d1f895c6fe 319
mbed_official 340:28d1f895c6fe 320 /** @defgroup RTC_Year_Date_Definitions RTC Year Date Definitions
mbed_official 340:28d1f895c6fe 321 * @{
mbed_official 340:28d1f895c6fe 322 */
mbed_official 340:28d1f895c6fe 323 #define IS_RTC_YEAR(YEAR) ((YEAR) <= (uint32_t)99)
mbed_official 340:28d1f895c6fe 324 /**
mbed_official 340:28d1f895c6fe 325 * @}
mbed_official 340:28d1f895c6fe 326 */
mbed_official 340:28d1f895c6fe 327
mbed_official 340:28d1f895c6fe 328 /** @defgroup RTC_Month_Date_Definitions RTC Month Date Definitions
mbed_official 340:28d1f895c6fe 329 * @{
mbed_official 340:28d1f895c6fe 330 */
mbed_official 340:28d1f895c6fe 331
mbed_official 340:28d1f895c6fe 332 /* Coded in BCD format */
mbed_official 340:28d1f895c6fe 333 #define RTC_MONTH_JANUARY ((uint8_t)0x01)
mbed_official 340:28d1f895c6fe 334 #define RTC_MONTH_FEBRUARY ((uint8_t)0x02)
mbed_official 340:28d1f895c6fe 335 #define RTC_MONTH_MARCH ((uint8_t)0x03)
mbed_official 340:28d1f895c6fe 336 #define RTC_MONTH_APRIL ((uint8_t)0x04)
mbed_official 340:28d1f895c6fe 337 #define RTC_MONTH_MAY ((uint8_t)0x05)
mbed_official 340:28d1f895c6fe 338 #define RTC_MONTH_JUNE ((uint8_t)0x06)
mbed_official 340:28d1f895c6fe 339 #define RTC_MONTH_JULY ((uint8_t)0x07)
mbed_official 340:28d1f895c6fe 340 #define RTC_MONTH_AUGUST ((uint8_t)0x08)
mbed_official 340:28d1f895c6fe 341 #define RTC_MONTH_SEPTEMBER ((uint8_t)0x09)
mbed_official 340:28d1f895c6fe 342 #define RTC_MONTH_OCTOBER ((uint8_t)0x10)
mbed_official 340:28d1f895c6fe 343 #define RTC_MONTH_NOVEMBER ((uint8_t)0x11)
mbed_official 340:28d1f895c6fe 344 #define RTC_MONTH_DECEMBER ((uint8_t)0x12)
mbed_official 340:28d1f895c6fe 345
mbed_official 340:28d1f895c6fe 346 #define IS_RTC_MONTH(MONTH) (((MONTH) >= (uint32_t)1) && ((MONTH) <= (uint32_t)12))
mbed_official 340:28d1f895c6fe 347 #define IS_RTC_DATE(DATE) (((DATE) >= (uint32_t)1) && ((DATE) <= (uint32_t)31))
mbed_official 340:28d1f895c6fe 348 /**
mbed_official 340:28d1f895c6fe 349 * @}
mbed_official 340:28d1f895c6fe 350 */
mbed_official 340:28d1f895c6fe 351
mbed_official 340:28d1f895c6fe 352 /** @defgroup RTC_WeekDay_Definitions RTC WeekDay Definitions
mbed_official 340:28d1f895c6fe 353 * @{
mbed_official 340:28d1f895c6fe 354 */
mbed_official 340:28d1f895c6fe 355 #define RTC_WEEKDAY_MONDAY ((uint8_t)0x01)
mbed_official 340:28d1f895c6fe 356 #define RTC_WEEKDAY_TUESDAY ((uint8_t)0x02)
mbed_official 340:28d1f895c6fe 357 #define RTC_WEEKDAY_WEDNESDAY ((uint8_t)0x03)
mbed_official 340:28d1f895c6fe 358 #define RTC_WEEKDAY_THURSDAY ((uint8_t)0x04)
mbed_official 340:28d1f895c6fe 359 #define RTC_WEEKDAY_FRIDAY ((uint8_t)0x05)
mbed_official 340:28d1f895c6fe 360 #define RTC_WEEKDAY_SATURDAY ((uint8_t)0x06)
mbed_official 340:28d1f895c6fe 361 #define RTC_WEEKDAY_SUNDAY ((uint8_t)0x07)
mbed_official 340:28d1f895c6fe 362
mbed_official 340:28d1f895c6fe 363 #define IS_RTC_WEEKDAY(WEEKDAY) (((WEEKDAY) == RTC_WEEKDAY_MONDAY) || \
mbed_official 340:28d1f895c6fe 364 ((WEEKDAY) == RTC_WEEKDAY_TUESDAY) || \
mbed_official 340:28d1f895c6fe 365 ((WEEKDAY) == RTC_WEEKDAY_WEDNESDAY) || \
mbed_official 340:28d1f895c6fe 366 ((WEEKDAY) == RTC_WEEKDAY_THURSDAY) || \
mbed_official 340:28d1f895c6fe 367 ((WEEKDAY) == RTC_WEEKDAY_FRIDAY) || \
mbed_official 340:28d1f895c6fe 368 ((WEEKDAY) == RTC_WEEKDAY_SATURDAY) || \
mbed_official 340:28d1f895c6fe 369 ((WEEKDAY) == RTC_WEEKDAY_SUNDAY))
mbed_official 340:28d1f895c6fe 370 /**
mbed_official 340:28d1f895c6fe 371 * @}
mbed_official 340:28d1f895c6fe 372 */
mbed_official 340:28d1f895c6fe 373
mbed_official 340:28d1f895c6fe 374 /** @defgroup RTC_Alarm_Definitions RTC Alarm Definitions
mbed_official 340:28d1f895c6fe 375 * @{
mbed_official 340:28d1f895c6fe 376 */
mbed_official 340:28d1f895c6fe 377 #define IS_RTC_ALARM_DATE_WEEKDAY_DATE(DATE) (((DATE) >(uint32_t) 0) && ((DATE) <= (uint32_t)31))
mbed_official 340:28d1f895c6fe 378 #define IS_RTC_ALARM_DATE_WEEKDAY_WEEKDAY(WEEKDAY) (((WEEKDAY) == RTC_WEEKDAY_MONDAY) || \
mbed_official 340:28d1f895c6fe 379 ((WEEKDAY) == RTC_WEEKDAY_TUESDAY) || \
mbed_official 340:28d1f895c6fe 380 ((WEEKDAY) == RTC_WEEKDAY_WEDNESDAY) || \
mbed_official 340:28d1f895c6fe 381 ((WEEKDAY) == RTC_WEEKDAY_THURSDAY) || \
mbed_official 340:28d1f895c6fe 382 ((WEEKDAY) == RTC_WEEKDAY_FRIDAY) || \
mbed_official 340:28d1f895c6fe 383 ((WEEKDAY) == RTC_WEEKDAY_SATURDAY) || \
mbed_official 340:28d1f895c6fe 384 ((WEEKDAY) == RTC_WEEKDAY_SUNDAY))
mbed_official 340:28d1f895c6fe 385 /**
mbed_official 340:28d1f895c6fe 386 * @}
mbed_official 340:28d1f895c6fe 387 */
mbed_official 340:28d1f895c6fe 388
mbed_official 340:28d1f895c6fe 389 /** @defgroup RTC_AlarmDateWeekDay_Definitions RTC AlarmDateWeekDay Definitions
mbed_official 340:28d1f895c6fe 390 * @{
mbed_official 340:28d1f895c6fe 391 */
mbed_official 340:28d1f895c6fe 392 #define RTC_ALARMDATEWEEKDAYSEL_DATE ((uint32_t)0x00000000)
mbed_official 340:28d1f895c6fe 393 #define RTC_ALARMDATEWEEKDAYSEL_WEEKDAY ((uint32_t)0x40000000)
mbed_official 340:28d1f895c6fe 394
mbed_official 340:28d1f895c6fe 395 #define IS_RTC_ALARM_DATE_WEEKDAY_SEL(SEL) (((SEL) == RTC_ALARMDATEWEEKDAYSEL_DATE) || \
mbed_official 340:28d1f895c6fe 396 ((SEL) == RTC_ALARMDATEWEEKDAYSEL_WEEKDAY))
mbed_official 340:28d1f895c6fe 397 /**
mbed_official 340:28d1f895c6fe 398 * @}
mbed_official 340:28d1f895c6fe 399 */
mbed_official 340:28d1f895c6fe 400
mbed_official 340:28d1f895c6fe 401 /** @defgroup RTC_AlarmMask_Definitions RTC AlarmMask Definitions
mbed_official 340:28d1f895c6fe 402 * @{
mbed_official 340:28d1f895c6fe 403 */
mbed_official 340:28d1f895c6fe 404 #define RTC_ALARMMASK_NONE ((uint32_t)0x00000000)
mbed_official 340:28d1f895c6fe 405 #define RTC_ALARMMASK_DATEWEEKDAY RTC_ALRMAR_MSK4
mbed_official 340:28d1f895c6fe 406 #define RTC_ALARMMASK_HOURS RTC_ALRMAR_MSK3
mbed_official 340:28d1f895c6fe 407 #define RTC_ALARMMASK_MINUTES RTC_ALRMAR_MSK2
mbed_official 340:28d1f895c6fe 408 #define RTC_ALARMMASK_SECONDS RTC_ALRMAR_MSK1
mbed_official 340:28d1f895c6fe 409 #define RTC_ALARMMASK_ALL ((uint32_t)0x80808080)
mbed_official 340:28d1f895c6fe 410
mbed_official 340:28d1f895c6fe 411 #define IS_ALARM_MASK(MASK) (((MASK) & 0x7F7F7F7F) == (uint32_t)RESET)
mbed_official 340:28d1f895c6fe 412 /**
mbed_official 340:28d1f895c6fe 413 * @}
mbed_official 340:28d1f895c6fe 414 */
mbed_official 340:28d1f895c6fe 415
mbed_official 340:28d1f895c6fe 416 /** @defgroup RTC_Alarms_Definitions RTC Alarms Definitions
mbed_official 340:28d1f895c6fe 417 * @{
mbed_official 340:28d1f895c6fe 418 */
mbed_official 340:28d1f895c6fe 419 #define RTC_ALARM_A RTC_CR_ALRAE
mbed_official 340:28d1f895c6fe 420
mbed_official 340:28d1f895c6fe 421 #define IS_ALARM(ALARM) ((ALARM) == RTC_ALARM_A)
mbed_official 340:28d1f895c6fe 422 /**
mbed_official 340:28d1f895c6fe 423 * @}
mbed_official 340:28d1f895c6fe 424 */
mbed_official 340:28d1f895c6fe 425
mbed_official 340:28d1f895c6fe 426 /** @defgroup RTC_Alarm_Sub_Seconds_Value RTC Alarm Sub Seconds Value
mbed_official 340:28d1f895c6fe 427 * @{
mbed_official 340:28d1f895c6fe 428 */
mbed_official 340:28d1f895c6fe 429 #define IS_RTC_ALARM_SUB_SECOND_VALUE(VALUE) ((VALUE) <= (uint32_t)0x00007FFF)
mbed_official 340:28d1f895c6fe 430 /**
mbed_official 340:28d1f895c6fe 431 * @}
mbed_official 340:28d1f895c6fe 432 */
mbed_official 340:28d1f895c6fe 433
mbed_official 340:28d1f895c6fe 434 /** @defgroup RTC_Alarm_Sub_Seconds_Masks_Definitions RTC Alarm Sub Seconds Masks Definitions
mbed_official 340:28d1f895c6fe 435 * @{
mbed_official 340:28d1f895c6fe 436 */
mbed_official 340:28d1f895c6fe 437 #define RTC_ALARMSUBSECONDMASK_ALL ((uint32_t)0x00000000) /*!< All Alarm SS fields are masked.
mbed_official 340:28d1f895c6fe 438 There is no comparison on sub seconds
mbed_official 340:28d1f895c6fe 439 for Alarm */
mbed_official 340:28d1f895c6fe 440 #define RTC_ALARMSUBSECONDMASK_SS14_1 ((uint32_t)0x01000000) /*!< SS[14:1] are don't care in Alarm
mbed_official 340:28d1f895c6fe 441 comparison. Only SS[0] is compared. */
mbed_official 340:28d1f895c6fe 442 #define RTC_ALARMSUBSECONDMASK_SS14_2 ((uint32_t)0x02000000) /*!< SS[14:2] are don't care in Alarm
mbed_official 340:28d1f895c6fe 443 comparison. Only SS[1:0] are compared */
mbed_official 340:28d1f895c6fe 444 #define RTC_ALARMSUBSECONDMASK_SS14_3 ((uint32_t)0x03000000) /*!< SS[14:3] are don't care in Alarm
mbed_official 340:28d1f895c6fe 445 comparison. Only SS[2:0] are compared */
mbed_official 340:28d1f895c6fe 446 #define RTC_ALARMSUBSECONDMASK_SS14_4 ((uint32_t)0x04000000) /*!< SS[14:4] are don't care in Alarm
mbed_official 340:28d1f895c6fe 447 comparison. Only SS[3:0] are compared */
mbed_official 340:28d1f895c6fe 448 #define RTC_ALARMSUBSECONDMASK_SS14_5 ((uint32_t)0x05000000) /*!< SS[14:5] are don't care in Alarm
mbed_official 340:28d1f895c6fe 449 comparison. Only SS[4:0] are compared */
mbed_official 340:28d1f895c6fe 450 #define RTC_ALARMSUBSECONDMASK_SS14_6 ((uint32_t)0x06000000) /*!< SS[14:6] are don't care in Alarm
mbed_official 340:28d1f895c6fe 451 comparison. Only SS[5:0] are compared */
mbed_official 340:28d1f895c6fe 452 #define RTC_ALARMSUBSECONDMASK_SS14_7 ((uint32_t)0x07000000) /*!< SS[14:7] are don't care in Alarm
mbed_official 340:28d1f895c6fe 453 comparison. Only SS[6:0] are compared */
mbed_official 340:28d1f895c6fe 454 #define RTC_ALARMSUBSECONDMASK_SS14_8 ((uint32_t)0x08000000) /*!< SS[14:8] are don't care in Alarm
mbed_official 340:28d1f895c6fe 455 comparison. Only SS[7:0] are compared */
mbed_official 340:28d1f895c6fe 456 #define RTC_ALARMSUBSECONDMASK_SS14_9 ((uint32_t)0x09000000) /*!< SS[14:9] are don't care in Alarm
mbed_official 340:28d1f895c6fe 457 comparison. Only SS[8:0] are compared */
mbed_official 340:28d1f895c6fe 458 #define RTC_ALARMSUBSECONDMASK_SS14_10 ((uint32_t)0x0A000000) /*!< SS[14:10] are don't care in Alarm
mbed_official 340:28d1f895c6fe 459 comparison. Only SS[9:0] are compared */
mbed_official 340:28d1f895c6fe 460 #define RTC_ALARMSUBSECONDMASK_SS14_11 ((uint32_t)0x0B000000) /*!< SS[14:11] are don't care in Alarm
mbed_official 340:28d1f895c6fe 461 comparison. Only SS[10:0] are compared */
mbed_official 340:28d1f895c6fe 462 #define RTC_ALARMSUBSECONDMASK_SS14_12 ((uint32_t)0x0C000000) /*!< SS[14:12] are don't care in Alarm
mbed_official 340:28d1f895c6fe 463 comparison.Only SS[11:0] are compared */
mbed_official 340:28d1f895c6fe 464 #define RTC_ALARMSUBSECONDMASK_SS14_13 ((uint32_t)0x0D000000) /*!< SS[14:13] are don't care in Alarm
mbed_official 340:28d1f895c6fe 465 comparison. Only SS[12:0] are compared */
mbed_official 340:28d1f895c6fe 466 #define RTC_ALARMSUBSECONDMASK_SS14 ((uint32_t)0x0E000000) /*!< SS[14] is don't care in Alarm
mbed_official 340:28d1f895c6fe 467 comparison.Only SS[13:0] are compared */
mbed_official 340:28d1f895c6fe 468 #define RTC_ALARMSUBSECONDMASK_None ((uint32_t)0x0F000000) /*!< SS[14:0] are compared and must match
mbed_official 340:28d1f895c6fe 469 to activate alarm. */
mbed_official 340:28d1f895c6fe 470
mbed_official 340:28d1f895c6fe 471 #define IS_RTC_ALARM_SUB_SECOND_MASK(MASK) (((MASK) == RTC_ALARMSUBSECONDMASK_ALL) || \
mbed_official 340:28d1f895c6fe 472 ((MASK) == RTC_ALARMSUBSECONDMASK_SS14_1) || \
mbed_official 340:28d1f895c6fe 473 ((MASK) == RTC_ALARMSUBSECONDMASK_SS14_2) || \
mbed_official 340:28d1f895c6fe 474 ((MASK) == RTC_ALARMSUBSECONDMASK_SS14_3) || \
mbed_official 340:28d1f895c6fe 475 ((MASK) == RTC_ALARMSUBSECONDMASK_SS14_4) || \
mbed_official 340:28d1f895c6fe 476 ((MASK) == RTC_ALARMSUBSECONDMASK_SS14_5) || \
mbed_official 340:28d1f895c6fe 477 ((MASK) == RTC_ALARMSUBSECONDMASK_SS14_6) || \
mbed_official 340:28d1f895c6fe 478 ((MASK) == RTC_ALARMSUBSECONDMASK_SS14_7) || \
mbed_official 340:28d1f895c6fe 479 ((MASK) == RTC_ALARMSUBSECONDMASK_SS14_8) || \
mbed_official 340:28d1f895c6fe 480 ((MASK) == RTC_ALARMSUBSECONDMASK_SS14_9) || \
mbed_official 340:28d1f895c6fe 481 ((MASK) == RTC_ALARMSUBSECONDMASK_SS14_10) || \
mbed_official 340:28d1f895c6fe 482 ((MASK) == RTC_ALARMSUBSECONDMASK_SS14_11) || \
mbed_official 340:28d1f895c6fe 483 ((MASK) == RTC_ALARMSUBSECONDMASK_SS14_12) || \
mbed_official 340:28d1f895c6fe 484 ((MASK) == RTC_ALARMSUBSECONDMASK_SS14_13) || \
mbed_official 340:28d1f895c6fe 485 ((MASK) == RTC_ALARMSUBSECONDMASK_SS14) || \
mbed_official 340:28d1f895c6fe 486 ((MASK) == RTC_ALARMSUBSECONDMASK_None))
mbed_official 340:28d1f895c6fe 487 /**
mbed_official 340:28d1f895c6fe 488 * @}
mbed_official 340:28d1f895c6fe 489 */
mbed_official 340:28d1f895c6fe 490
mbed_official 340:28d1f895c6fe 491 /** @defgroup RTC_Interrupts_Definitions RTC Interrupts Definitions
mbed_official 340:28d1f895c6fe 492 * @{
mbed_official 340:28d1f895c6fe 493 */
mbed_official 340:28d1f895c6fe 494 #define RTC_IT_TS ((uint32_t)0x00008000)
mbed_official 340:28d1f895c6fe 495 #define RTC_IT_WUT ((uint32_t)0x00004000)
mbed_official 340:28d1f895c6fe 496 #define RTC_IT_ALRA ((uint32_t)0x00001000)
mbed_official 340:28d1f895c6fe 497 #define RTC_IT_TAMP ((uint32_t)0x00000004) /* Used only to Enable the Tamper Interrupt */
mbed_official 340:28d1f895c6fe 498 #define RTC_IT_TAMP1 ((uint32_t)0x00020000)
mbed_official 340:28d1f895c6fe 499 #define RTC_IT_TAMP2 ((uint32_t)0x00040000)
mbed_official 340:28d1f895c6fe 500 #define RTC_IT_TAMP3 ((uint32_t)0x00080000)
mbed_official 340:28d1f895c6fe 501 /**
mbed_official 340:28d1f895c6fe 502 * @}
mbed_official 340:28d1f895c6fe 503 */
mbed_official 340:28d1f895c6fe 504
mbed_official 340:28d1f895c6fe 505 /** @defgroup RTC_Flags_Definitions RTC Flags Definitions
mbed_official 340:28d1f895c6fe 506 * @{
mbed_official 340:28d1f895c6fe 507 */
mbed_official 340:28d1f895c6fe 508 #define RTC_FLAG_RECALPF ((uint32_t)0x00010000)
mbed_official 340:28d1f895c6fe 509 #define RTC_FLAG_TAMP3F ((uint32_t)0x00008000)
mbed_official 340:28d1f895c6fe 510 #define RTC_FLAG_TAMP2F ((uint32_t)0x00004000)
mbed_official 340:28d1f895c6fe 511 #define RTC_FLAG_TAMP1F ((uint32_t)0x00002000)
mbed_official 340:28d1f895c6fe 512 #define RTC_FLAG_TSOVF ((uint32_t)0x00001000)
mbed_official 340:28d1f895c6fe 513 #define RTC_FLAG_TSF ((uint32_t)0x00000800)
mbed_official 340:28d1f895c6fe 514 #define RTC_FLAG_WUTF ((uint32_t)0x00000400)
mbed_official 340:28d1f895c6fe 515 #define RTC_FLAG_ALRAF ((uint32_t)0x00000100)
mbed_official 340:28d1f895c6fe 516 #define RTC_FLAG_INITF ((uint32_t)0x00000040)
mbed_official 340:28d1f895c6fe 517 #define RTC_FLAG_RSF ((uint32_t)0x00000020)
mbed_official 340:28d1f895c6fe 518 #define RTC_FLAG_INITS ((uint32_t)0x00000010)
mbed_official 340:28d1f895c6fe 519 #define RTC_FLAG_SHPF ((uint32_t)0x00000008)
mbed_official 340:28d1f895c6fe 520 #define RTC_FLAG_WUTWF ((uint32_t)0x00000004)
mbed_official 340:28d1f895c6fe 521 #define RTC_FLAG_ALRAWF ((uint32_t)0x00000001)
mbed_official 340:28d1f895c6fe 522 /**
mbed_official 340:28d1f895c6fe 523 * @}
mbed_official 340:28d1f895c6fe 524 */
mbed_official 340:28d1f895c6fe 525
mbed_official 340:28d1f895c6fe 526 /**
mbed_official 340:28d1f895c6fe 527 * @}
mbed_official 340:28d1f895c6fe 528 */
mbed_official 340:28d1f895c6fe 529
mbed_official 340:28d1f895c6fe 530 /* Exported macros -----------------------------------------------------------*/
mbed_official 340:28d1f895c6fe 531 /** @defgroup RTC_Exported_Macros RTC Exported Macros
mbed_official 340:28d1f895c6fe 532 * @{
mbed_official 340:28d1f895c6fe 533 */
mbed_official 340:28d1f895c6fe 534
mbed_official 340:28d1f895c6fe 535 /** @brief Reset RTC handle state
mbed_official 340:28d1f895c6fe 536 * @param __HANDLE__: RTC handle.
mbed_official 340:28d1f895c6fe 537 * @retval None
mbed_official 340:28d1f895c6fe 538 */
mbed_official 340:28d1f895c6fe 539 #define __HAL_RTC_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_RTC_STATE_RESET)
mbed_official 340:28d1f895c6fe 540
mbed_official 340:28d1f895c6fe 541 /**
mbed_official 340:28d1f895c6fe 542 * @brief Disable the write protection for RTC registers.
mbed_official 340:28d1f895c6fe 543 * @param __HANDLE__: specifies the RTC handle.
mbed_official 340:28d1f895c6fe 544 * @retval None
mbed_official 340:28d1f895c6fe 545 */
mbed_official 340:28d1f895c6fe 546 #define __HAL_RTC_WRITEPROTECTION_DISABLE(__HANDLE__) \
mbed_official 340:28d1f895c6fe 547 do{ \
mbed_official 340:28d1f895c6fe 548 (__HANDLE__)->Instance->WPR = 0xCA; \
mbed_official 340:28d1f895c6fe 549 (__HANDLE__)->Instance->WPR = 0x53; \
mbed_official 340:28d1f895c6fe 550 } while(0)
mbed_official 340:28d1f895c6fe 551
mbed_official 340:28d1f895c6fe 552 /**
mbed_official 340:28d1f895c6fe 553 * @brief Enable the write protection for RTC registers.
mbed_official 340:28d1f895c6fe 554 * @param __HANDLE__: specifies the RTC handle.
mbed_official 340:28d1f895c6fe 555 * @retval None
mbed_official 340:28d1f895c6fe 556 */
mbed_official 340:28d1f895c6fe 557 #define __HAL_RTC_WRITEPROTECTION_ENABLE(__HANDLE__) \
mbed_official 340:28d1f895c6fe 558 do{ \
mbed_official 340:28d1f895c6fe 559 (__HANDLE__)->Instance->WPR = 0xFF; \
mbed_official 340:28d1f895c6fe 560 } while(0)
mbed_official 340:28d1f895c6fe 561
mbed_official 340:28d1f895c6fe 562 /**
mbed_official 340:28d1f895c6fe 563 * @brief Enable the RTC ALARMA peripheral.
mbed_official 340:28d1f895c6fe 564 * @param __HANDLE__: specifies the RTC handle.
mbed_official 340:28d1f895c6fe 565 * @retval None
mbed_official 340:28d1f895c6fe 566 */
mbed_official 340:28d1f895c6fe 567 #define __HAL_RTC_ALARMA_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->CR |= (RTC_CR_ALRAE))
mbed_official 340:28d1f895c6fe 568
mbed_official 340:28d1f895c6fe 569 /**
mbed_official 340:28d1f895c6fe 570 * @brief Disable the RTC ALARMA peripheral.
mbed_official 340:28d1f895c6fe 571 * @param __HANDLE__: specifies the RTC handle.
mbed_official 340:28d1f895c6fe 572 * @retval None
mbed_official 340:28d1f895c6fe 573 */
mbed_official 340:28d1f895c6fe 574 #define __HAL_RTC_ALARMA_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->CR &= ~(RTC_CR_ALRAE))
mbed_official 340:28d1f895c6fe 575
mbed_official 340:28d1f895c6fe 576 /**
mbed_official 340:28d1f895c6fe 577 * @brief Enable the RTC Alarm interrupt.
mbed_official 340:28d1f895c6fe 578 * @param __HANDLE__: specifies the RTC handle.
mbed_official 340:28d1f895c6fe 579 * @param __INTERRUPT__: specifies the RTC Alarm interrupt sources to be enabled or disabled.
mbed_official 340:28d1f895c6fe 580 * This parameter can be any combination of the following values:
mbed_official 340:28d1f895c6fe 581 * @arg RTC_IT_ALRA: Alarm A interrupt
mbed_official 340:28d1f895c6fe 582 * @retval None
mbed_official 340:28d1f895c6fe 583 */
mbed_official 340:28d1f895c6fe 584 #define __HAL_RTC_ALARM_ENABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->CR |= (__INTERRUPT__))
mbed_official 340:28d1f895c6fe 585
mbed_official 340:28d1f895c6fe 586 /**
mbed_official 340:28d1f895c6fe 587 * @brief Disable the RTC Alarm interrupt.
mbed_official 340:28d1f895c6fe 588 * @param __HANDLE__: specifies the RTC handle.
mbed_official 340:28d1f895c6fe 589 * @param __INTERRUPT__: specifies the RTC Alarm interrupt sources to be enabled or disabled.
mbed_official 340:28d1f895c6fe 590 * This parameter can be any combination of the following values:
mbed_official 340:28d1f895c6fe 591 * @arg RTC_IT_ALRA: Alarm A interrupt
mbed_official 340:28d1f895c6fe 592 * @retval None
mbed_official 340:28d1f895c6fe 593 */
mbed_official 340:28d1f895c6fe 594 #define __HAL_RTC_ALARM_DISABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->CR &= ~(__INTERRUPT__))
mbed_official 340:28d1f895c6fe 595
mbed_official 340:28d1f895c6fe 596 /**
mbed_official 340:28d1f895c6fe 597 * @brief Check whether the specified RTC Alarm interrupt has occurred or not.
mbed_official 340:28d1f895c6fe 598 * @param __HANDLE__: specifies the RTC handle.
mbed_official 340:28d1f895c6fe 599 * @param __FLAG__: specifies the RTC Alarm interrupt sources to be enabled or disabled.
mbed_official 340:28d1f895c6fe 600 * This parameter can be:
mbed_official 340:28d1f895c6fe 601 * @arg RTC_IT_ALRA: Alarm A interrupt
mbed_official 340:28d1f895c6fe 602 * @retval None
mbed_official 340:28d1f895c6fe 603 */
mbed_official 340:28d1f895c6fe 604 #define __HAL_RTC_ALARM_GET_IT(__HANDLE__, __FLAG__) ((((((__HANDLE__)->Instance->ISR)& ((__FLAG__)>> 4)) & 0x0000FFFF) != RESET)? SET : RESET)
mbed_official 340:28d1f895c6fe 605
mbed_official 340:28d1f895c6fe 606 /**
mbed_official 340:28d1f895c6fe 607 * @brief Get the selected RTC Alarm's flag status.
mbed_official 340:28d1f895c6fe 608 * @param __HANDLE__: specifies the RTC handle.
mbed_official 340:28d1f895c6fe 609 * @param __FLAG__: specifies the RTC Alarm Flag sources to be enabled or disabled.
mbed_official 340:28d1f895c6fe 610 * This parameter can be:
mbed_official 340:28d1f895c6fe 611 * @arg RTC_FLAG_ALRAF
mbed_official 340:28d1f895c6fe 612 * @arg RTC_FLAG_ALRAWF
mbed_official 340:28d1f895c6fe 613 * @retval None
mbed_official 340:28d1f895c6fe 614 */
mbed_official 340:28d1f895c6fe 615 #define __HAL_RTC_ALARM_GET_FLAG(__HANDLE__, __FLAG__) (((((__HANDLE__)->Instance->ISR) & (__FLAG__)) != RESET)? SET : RESET)
mbed_official 340:28d1f895c6fe 616
mbed_official 340:28d1f895c6fe 617 /**
mbed_official 340:28d1f895c6fe 618 * @brief Clear the RTC Alarm's pending flags.
mbed_official 340:28d1f895c6fe 619 * @param __HANDLE__: specifies the RTC handle.
mbed_official 340:28d1f895c6fe 620 * @param __FLAG__: specifies the RTC Alarm Flag sources to be enabled or disabled.
mbed_official 340:28d1f895c6fe 621 * This parameter can be:
mbed_official 340:28d1f895c6fe 622 * @arg RTC_FLAG_ALRAF
mbed_official 340:28d1f895c6fe 623 * @retval None
mbed_official 340:28d1f895c6fe 624 */
mbed_official 340:28d1f895c6fe 625 #define __HAL_RTC_ALARM_CLEAR_FLAG(__HANDLE__, __FLAG__) ((__HANDLE__)->Instance->ISR) = (~(((__FLAG__) | RTC_ISR_INIT)& 0x0000FFFF)|((__HANDLE__)->Instance->ISR & RTC_ISR_INIT))
mbed_official 340:28d1f895c6fe 626
mbed_official 340:28d1f895c6fe 627
mbed_official 340:28d1f895c6fe 628 #define RTC_EXTI_LINE_ALARM_EVENT ((uint32_t)0x00020000) /*!< External interrupt line 17 Connected to the RTC Alarm event */
mbed_official 340:28d1f895c6fe 629 #define RTC_EXTI_LINE_TAMPER_TIMESTAMP_EVENT ((uint32_t)0x00080000) /*!< External interrupt line 19 Connected to the RTC Tamper and Time Stamp events */
mbed_official 340:28d1f895c6fe 630 #define RTC_EXTI_LINE_WAKEUPTIMER_EVENT ((uint32_t)0x00100000) /*!< External interrupt line 20 Connected to the RTC Wakeup event */
mbed_official 340:28d1f895c6fe 631
mbed_official 340:28d1f895c6fe 632 /**
mbed_official 340:28d1f895c6fe 633 * @brief Enable the RTC Exti line.
mbed_official 340:28d1f895c6fe 634 * @param __EXTILINE__: specifies the RTC Exti sources to be enabled or disabled.
mbed_official 340:28d1f895c6fe 635 * This parameter can be:
mbed_official 340:28d1f895c6fe 636 * @arg RTC_EXTI_LINE_ALARM_EVENT
mbed_official 340:28d1f895c6fe 637 * @arg RTC_EXTI_LINE_TAMPER_TIMESTAMP_EVENT
mbed_official 340:28d1f895c6fe 638 * @arg RTC_EXTI_LINE_WAKEUPTIMER_EVENT
mbed_official 340:28d1f895c6fe 639 * @retval None
mbed_official 340:28d1f895c6fe 640 */
mbed_official 340:28d1f895c6fe 641 #define __HAL_RTC_EXTI_ENABLE_IT(__EXTILINE__) (EXTI->IMR |= (__EXTILINE__))
mbed_official 340:28d1f895c6fe 642
mbed_official 340:28d1f895c6fe 643 /* alias define maintained for legacy */
mbed_official 340:28d1f895c6fe 644 #define __HAL_RTC_ENABLE_IT __HAL_RTC_EXTI_ENABLE_IT
mbed_official 340:28d1f895c6fe 645
mbed_official 340:28d1f895c6fe 646 /**
mbed_official 340:28d1f895c6fe 647 * @brief Disable the RTC Exti line.
mbed_official 340:28d1f895c6fe 648 * @param __EXTILINE__: specifies the RTC Exti sources to be enabled or disabled.
mbed_official 340:28d1f895c6fe 649 * This parameter can be:
mbed_official 340:28d1f895c6fe 650 * @arg RTC_EXTI_LINE_ALARM_EVENT
mbed_official 340:28d1f895c6fe 651 * @arg RTC_EXTI_LINE_TAMPER_TIMESTAMP_EVENT
mbed_official 340:28d1f895c6fe 652 * @arg RTC_EXTI_LINE_WAKEUPTIMER_EVENT
mbed_official 340:28d1f895c6fe 653 * @retval None
mbed_official 340:28d1f895c6fe 654 */
mbed_official 340:28d1f895c6fe 655 #define __HAL_RTC_EXTI_DISABLE_IT(__EXTILINE__) (EXTI->IMR &= ~(__EXTILINE__))
mbed_official 340:28d1f895c6fe 656
mbed_official 340:28d1f895c6fe 657 /* alias define maintained for legacy */
mbed_official 340:28d1f895c6fe 658 #define __HAL_RTC_DISABLE_IT __HAL_RTC_EXTI_DISABLE_IT
mbed_official 340:28d1f895c6fe 659
mbed_official 340:28d1f895c6fe 660 /**
mbed_official 340:28d1f895c6fe 661 * @brief Generates a Software interrupt on selected EXTI line.
mbed_official 340:28d1f895c6fe 662 * @param __EXTILINE__: specifies the RTC Exti sources to be enabled or disabled.
mbed_official 340:28d1f895c6fe 663 * This parameter can be:
mbed_official 340:28d1f895c6fe 664 * @arg RTC_EXTI_LINE_ALARM_EVENT
mbed_official 340:28d1f895c6fe 665 * @arg RTC_EXTI_LINE_TAMPER_TIMESTAMP_EVENT
mbed_official 340:28d1f895c6fe 666 * @arg RTC_EXTI_LINE_WAKEUPTIMER_EVENT
mbed_official 340:28d1f895c6fe 667 * @retval None
mbed_official 340:28d1f895c6fe 668 */
mbed_official 340:28d1f895c6fe 669 #define __HAL_RTC_EXTI_GENERATE_SWIT(__EXTILINE__) (EXTI->SWIER |= (__EXTILINE__))
mbed_official 340:28d1f895c6fe 670
mbed_official 340:28d1f895c6fe 671 /**
mbed_official 340:28d1f895c6fe 672 * @brief Clear the RTC Exti flags.
mbed_official 340:28d1f895c6fe 673 * @param __FLAG__: specifies the RTC Exti sources to be enabled or disabled.
mbed_official 340:28d1f895c6fe 674 * This parameter can be:
mbed_official 340:28d1f895c6fe 675 * @arg RTC_EXTI_LINE_ALARM_EVENT
mbed_official 340:28d1f895c6fe 676 * @arg RTC_EXTI_LINE_TAMPER_TIMESTAMP_EVENT
mbed_official 340:28d1f895c6fe 677 * @arg RTC_EXTI_LINE_WAKEUPTIMER_EVENT
mbed_official 340:28d1f895c6fe 678 * @retval None
mbed_official 340:28d1f895c6fe 679 */
mbed_official 340:28d1f895c6fe 680 #define __HAL_RTC_EXTI_CLEAR_FLAG(__FLAG__) (EXTI->PR = (__FLAG__))
mbed_official 340:28d1f895c6fe 681
mbed_official 340:28d1f895c6fe 682 /* alias define maintained for legacy */
mbed_official 340:28d1f895c6fe 683 #define __HAL_RTC_CLEAR_FLAG __HAL_RTC_EXTI_CLEAR_FLAG
mbed_official 340:28d1f895c6fe 684
mbed_official 340:28d1f895c6fe 685 /**
mbed_official 340:28d1f895c6fe 686 * @}
mbed_official 340:28d1f895c6fe 687 */
mbed_official 340:28d1f895c6fe 688
mbed_official 340:28d1f895c6fe 689 /* Include RTC HAL Extension module */
mbed_official 340:28d1f895c6fe 690 #include "stm32f0xx_hal_rtc_ex.h"
mbed_official 340:28d1f895c6fe 691
mbed_official 340:28d1f895c6fe 692 /* Exported functions --------------------------------------------------------*/
mbed_official 340:28d1f895c6fe 693 /** @addtogroup RTC_Exported_Functions RTC Exported Functions
mbed_official 340:28d1f895c6fe 694 * @{
mbed_official 340:28d1f895c6fe 695 */
mbed_official 340:28d1f895c6fe 696
mbed_official 340:28d1f895c6fe 697 /** @addtogroup RTC_Exported_Functions_Group1
mbed_official 340:28d1f895c6fe 698 * @{
mbed_official 340:28d1f895c6fe 699 */
mbed_official 340:28d1f895c6fe 700
mbed_official 340:28d1f895c6fe 701 /* Initialization and de-initialization functions ****************************/
mbed_official 340:28d1f895c6fe 702 HAL_StatusTypeDef HAL_RTC_Init(RTC_HandleTypeDef *hrtc);
mbed_official 340:28d1f895c6fe 703 HAL_StatusTypeDef HAL_RTC_DeInit(RTC_HandleTypeDef *hrtc);
mbed_official 340:28d1f895c6fe 704 void HAL_RTC_MspInit(RTC_HandleTypeDef *hrtc);
mbed_official 340:28d1f895c6fe 705 void HAL_RTC_MspDeInit(RTC_HandleTypeDef *hrtc);
mbed_official 340:28d1f895c6fe 706 /**
mbed_official 340:28d1f895c6fe 707 * @}
mbed_official 340:28d1f895c6fe 708 */
mbed_official 340:28d1f895c6fe 709
mbed_official 340:28d1f895c6fe 710 /** @addtogroup RTC_Exported_Functions_Group2
mbed_official 340:28d1f895c6fe 711 * @{
mbed_official 340:28d1f895c6fe 712 */
mbed_official 340:28d1f895c6fe 713
mbed_official 340:28d1f895c6fe 714 /* RTC Time and Date functions ************************************************/
mbed_official 340:28d1f895c6fe 715 HAL_StatusTypeDef HAL_RTC_SetTime(RTC_HandleTypeDef *hrtc, RTC_TimeTypeDef *sTime, uint32_t Format);
mbed_official 340:28d1f895c6fe 716 HAL_StatusTypeDef HAL_RTC_GetTime(RTC_HandleTypeDef *hrtc, RTC_TimeTypeDef *sTime, uint32_t Format);
mbed_official 340:28d1f895c6fe 717 HAL_StatusTypeDef HAL_RTC_SetDate(RTC_HandleTypeDef *hrtc, RTC_DateTypeDef *sDate, uint32_t Format);
mbed_official 340:28d1f895c6fe 718 HAL_StatusTypeDef HAL_RTC_GetDate(RTC_HandleTypeDef *hrtc, RTC_DateTypeDef *sDate, uint32_t Format);
mbed_official 340:28d1f895c6fe 719 /**
mbed_official 340:28d1f895c6fe 720 * @}
mbed_official 340:28d1f895c6fe 721 */
mbed_official 340:28d1f895c6fe 722
mbed_official 340:28d1f895c6fe 723 /** @addtogroup RTC_Exported_Functions_Group3
mbed_official 340:28d1f895c6fe 724 * @{
mbed_official 340:28d1f895c6fe 725 */
mbed_official 340:28d1f895c6fe 726 /* RTC Alarm functions ********************************************************/
mbed_official 340:28d1f895c6fe 727 HAL_StatusTypeDef HAL_RTC_SetAlarm(RTC_HandleTypeDef *hrtc, RTC_AlarmTypeDef *sAlarm, uint32_t Format);
mbed_official 340:28d1f895c6fe 728 HAL_StatusTypeDef HAL_RTC_SetAlarm_IT(RTC_HandleTypeDef *hrtc, RTC_AlarmTypeDef *sAlarm, uint32_t Format);
mbed_official 340:28d1f895c6fe 729 HAL_StatusTypeDef HAL_RTC_DeactivateAlarm(RTC_HandleTypeDef *hrtc, uint32_t Alarm);
mbed_official 340:28d1f895c6fe 730 HAL_StatusTypeDef HAL_RTC_GetAlarm(RTC_HandleTypeDef *hrtc, RTC_AlarmTypeDef *sAlarm, uint32_t Alarm, uint32_t Format);
mbed_official 340:28d1f895c6fe 731 void HAL_RTC_AlarmIRQHandler(RTC_HandleTypeDef *hrtc);
mbed_official 340:28d1f895c6fe 732 HAL_StatusTypeDef HAL_RTC_PollForAlarmAEvent(RTC_HandleTypeDef *hrtc, uint32_t Timeout);
mbed_official 340:28d1f895c6fe 733 void HAL_RTC_AlarmAEventCallback(RTC_HandleTypeDef *hrtc);
mbed_official 340:28d1f895c6fe 734 /**
mbed_official 340:28d1f895c6fe 735 * @}
mbed_official 340:28d1f895c6fe 736 */
mbed_official 340:28d1f895c6fe 737
mbed_official 340:28d1f895c6fe 738 /** @addtogroup RTC_Exported_Functions_Group4
mbed_official 340:28d1f895c6fe 739 * @{
mbed_official 340:28d1f895c6fe 740 */
mbed_official 340:28d1f895c6fe 741 /* Peripheral Control functions ***********************************************/
mbed_official 340:28d1f895c6fe 742 HAL_StatusTypeDef HAL_RTC_WaitForSynchro(RTC_HandleTypeDef* hrtc);
mbed_official 340:28d1f895c6fe 743 /**
mbed_official 340:28d1f895c6fe 744 * @}
mbed_official 340:28d1f895c6fe 745 */
mbed_official 340:28d1f895c6fe 746
mbed_official 340:28d1f895c6fe 747 /** @addtogroup RTC_Exported_Functions_Group5
mbed_official 340:28d1f895c6fe 748 * @{
mbed_official 340:28d1f895c6fe 749 */
mbed_official 340:28d1f895c6fe 750 /* Peripheral State functions *************************************************/
mbed_official 340:28d1f895c6fe 751 HAL_RTCStateTypeDef HAL_RTC_GetState(RTC_HandleTypeDef *hrtc);
mbed_official 340:28d1f895c6fe 752 /**
mbed_official 340:28d1f895c6fe 753 * @}
mbed_official 340:28d1f895c6fe 754 */
mbed_official 340:28d1f895c6fe 755
mbed_official 340:28d1f895c6fe 756 /**
mbed_official 340:28d1f895c6fe 757 * @}
mbed_official 340:28d1f895c6fe 758 */
mbed_official 340:28d1f895c6fe 759
mbed_official 340:28d1f895c6fe 760 /** @addtogroup RTC_Private_Functions
mbed_official 340:28d1f895c6fe 761 * @{
mbed_official 340:28d1f895c6fe 762 */
mbed_official 340:28d1f895c6fe 763 HAL_StatusTypeDef RTC_EnterInitMode(RTC_HandleTypeDef* hrtc);
mbed_official 340:28d1f895c6fe 764 uint8_t RTC_ByteToBcd2(uint8_t Value);
mbed_official 340:28d1f895c6fe 765 uint8_t RTC_Bcd2ToByte(uint8_t Value);
mbed_official 340:28d1f895c6fe 766 /**
mbed_official 340:28d1f895c6fe 767 * @}
mbed_official 340:28d1f895c6fe 768 */
mbed_official 340:28d1f895c6fe 769
mbed_official 340:28d1f895c6fe 770 /**
mbed_official 340:28d1f895c6fe 771 * @}
mbed_official 340:28d1f895c6fe 772 */
mbed_official 340:28d1f895c6fe 773
mbed_official 340:28d1f895c6fe 774 /**
mbed_official 340:28d1f895c6fe 775 * @}
mbed_official 340:28d1f895c6fe 776 */
mbed_official 340:28d1f895c6fe 777
mbed_official 340:28d1f895c6fe 778 #ifdef __cplusplus
mbed_official 340:28d1f895c6fe 779 }
mbed_official 340:28d1f895c6fe 780 #endif
mbed_official 340:28d1f895c6fe 781
mbed_official 340:28d1f895c6fe 782 #endif /* __STM32F0xx_HAL_RTC_H */
mbed_official 340:28d1f895c6fe 783
mbed_official 340:28d1f895c6fe 784 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
mbed_official 340:28d1f895c6fe 785