Elijah Orr / mbed-renbed

Dependents:   1-RenBuggyTimed RenBED_RGB RenBED_RGB_PWM RenBED_RGB

Fork of mbed by mbed official

Committer:
Kojto
Date:
Thu Oct 29 08:40:18 2015 +0000
Revision:
109:9296ab0bfc11
Release 109  of the mbed library

Changes:
- new platforms - NUCLEO_F042K6, WIZNWIKI_W7500ECO
- MTS targets - bootloaders update to 0.1.1
- STM F7 - RTC enable fixes
- STM F4 - i2c pending stop before start fix
- STM all targets - analogout normalization fix

Who changed what in which revision?

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