meh

Fork of mbed by mbed official

Committer:
ricardobtez
Date:
Tue Apr 05 23:51:21 2016 +0000
Revision:
118:16969dd821af
Parent:
92:4fc01daae5a5
Child:
96:487b796308b0
dgdgr

Who changed what in which revision?

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