inport from local

Dependents:   Hobbyking_Cheetah_0511

Committer:
NYX
Date:
Mon Mar 16 06:35:48 2020 +0000
Revision:
0:85b3fd62ea1a
reinport to mbed;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
NYX 0:85b3fd62ea1a 1 /**
NYX 0:85b3fd62ea1a 2 ******************************************************************************
NYX 0:85b3fd62ea1a 3 * @file stm32f4xx_hal_rtc_ex.h
NYX 0:85b3fd62ea1a 4 * @author MCD Application Team
NYX 0:85b3fd62ea1a 5 * @version V1.7.1
NYX 0:85b3fd62ea1a 6 * @date 14-April-2017
NYX 0:85b3fd62ea1a 7 * @brief Header file of RTC HAL Extension module.
NYX 0:85b3fd62ea1a 8 ******************************************************************************
NYX 0:85b3fd62ea1a 9 * @attention
NYX 0:85b3fd62ea1a 10 *
NYX 0:85b3fd62ea1a 11 * <h2><center>&copy; COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
NYX 0:85b3fd62ea1a 12 *
NYX 0:85b3fd62ea1a 13 * Redistribution and use in source and binary forms, with or without modification,
NYX 0:85b3fd62ea1a 14 * are permitted provided that the following conditions are met:
NYX 0:85b3fd62ea1a 15 * 1. Redistributions of source code must retain the above copyright notice,
NYX 0:85b3fd62ea1a 16 * this list of conditions and the following disclaimer.
NYX 0:85b3fd62ea1a 17 * 2. Redistributions in binary form must reproduce the above copyright notice,
NYX 0:85b3fd62ea1a 18 * this list of conditions and the following disclaimer in the documentation
NYX 0:85b3fd62ea1a 19 * and/or other materials provided with the distribution.
NYX 0:85b3fd62ea1a 20 * 3. Neither the name of STMicroelectronics nor the names of its contributors
NYX 0:85b3fd62ea1a 21 * may be used to endorse or promote products derived from this software
NYX 0:85b3fd62ea1a 22 * without specific prior written permission.
NYX 0:85b3fd62ea1a 23 *
NYX 0:85b3fd62ea1a 24 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
NYX 0:85b3fd62ea1a 25 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
NYX 0:85b3fd62ea1a 26 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
NYX 0:85b3fd62ea1a 27 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
NYX 0:85b3fd62ea1a 28 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
NYX 0:85b3fd62ea1a 29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
NYX 0:85b3fd62ea1a 30 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
NYX 0:85b3fd62ea1a 31 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
NYX 0:85b3fd62ea1a 32 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
NYX 0:85b3fd62ea1a 33 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
NYX 0:85b3fd62ea1a 34 *
NYX 0:85b3fd62ea1a 35 ******************************************************************************
NYX 0:85b3fd62ea1a 36 */
NYX 0:85b3fd62ea1a 37
NYX 0:85b3fd62ea1a 38 /* Define to prevent recursive inclusion -------------------------------------*/
NYX 0:85b3fd62ea1a 39 #ifndef __STM32F4xx_HAL_RTC_EX_H
NYX 0:85b3fd62ea1a 40 #define __STM32F4xx_HAL_RTC_EX_H
NYX 0:85b3fd62ea1a 41
NYX 0:85b3fd62ea1a 42 #ifdef __cplusplus
NYX 0:85b3fd62ea1a 43 extern "C" {
NYX 0:85b3fd62ea1a 44 #endif
NYX 0:85b3fd62ea1a 45
NYX 0:85b3fd62ea1a 46 /* Includes ------------------------------------------------------------------*/
NYX 0:85b3fd62ea1a 47 #include "stm32f4xx_hal_def.h"
NYX 0:85b3fd62ea1a 48
NYX 0:85b3fd62ea1a 49 /** @addtogroup STM32F4xx_HAL_Driver
NYX 0:85b3fd62ea1a 50 * @{
NYX 0:85b3fd62ea1a 51 */
NYX 0:85b3fd62ea1a 52
NYX 0:85b3fd62ea1a 53 /** @addtogroup RTCEx
NYX 0:85b3fd62ea1a 54 * @{
NYX 0:85b3fd62ea1a 55 */
NYX 0:85b3fd62ea1a 56
NYX 0:85b3fd62ea1a 57 /* Exported types ------------------------------------------------------------*/
NYX 0:85b3fd62ea1a 58 /** @defgroup RTCEx_Exported_Types RTCEx Exported Types
NYX 0:85b3fd62ea1a 59 * @{
NYX 0:85b3fd62ea1a 60 */
NYX 0:85b3fd62ea1a 61
NYX 0:85b3fd62ea1a 62 /**
NYX 0:85b3fd62ea1a 63 * @brief RTC Tamper structure definition
NYX 0:85b3fd62ea1a 64 */
NYX 0:85b3fd62ea1a 65 typedef struct
NYX 0:85b3fd62ea1a 66 {
NYX 0:85b3fd62ea1a 67 uint32_t Tamper; /*!< Specifies the Tamper Pin.
NYX 0:85b3fd62ea1a 68 This parameter can be a value of @ref RTCEx_Tamper_Pins_Definitions */
NYX 0:85b3fd62ea1a 69
NYX 0:85b3fd62ea1a 70 uint32_t PinSelection; /*!< Specifies the Tamper Pin.
NYX 0:85b3fd62ea1a 71 This parameter can be a value of @ref RTCEx_Tamper_Pins_Selection */
NYX 0:85b3fd62ea1a 72
NYX 0:85b3fd62ea1a 73 uint32_t Trigger; /*!< Specifies the Tamper Trigger.
NYX 0:85b3fd62ea1a 74 This parameter can be a value of @ref RTCEx_Tamper_Trigger_Definitions */
NYX 0:85b3fd62ea1a 75
NYX 0:85b3fd62ea1a 76 uint32_t Filter; /*!< Specifies the RTC Filter Tamper.
NYX 0:85b3fd62ea1a 77 This parameter can be a value of @ref RTCEx_Tamper_Filter_Definitions */
NYX 0:85b3fd62ea1a 78
NYX 0:85b3fd62ea1a 79 uint32_t SamplingFrequency; /*!< Specifies the sampling frequency.
NYX 0:85b3fd62ea1a 80 This parameter can be a value of @ref RTCEx_Tamper_Sampling_Frequencies_Definitions */
NYX 0:85b3fd62ea1a 81
NYX 0:85b3fd62ea1a 82 uint32_t PrechargeDuration; /*!< Specifies the Precharge Duration .
NYX 0:85b3fd62ea1a 83 This parameter can be a value of @ref RTCEx_Tamper_Pin_Precharge_Duration_Definitions */
NYX 0:85b3fd62ea1a 84
NYX 0:85b3fd62ea1a 85 uint32_t TamperPullUp; /*!< Specifies the Tamper PullUp .
NYX 0:85b3fd62ea1a 86 This parameter can be a value of @ref RTCEx_Tamper_Pull_UP_Definitions */
NYX 0:85b3fd62ea1a 87
NYX 0:85b3fd62ea1a 88 uint32_t TimeStampOnTamperDetection; /*!< Specifies the TimeStampOnTamperDetection.
NYX 0:85b3fd62ea1a 89 This parameter can be a value of @ref RTCEx_Tamper_TimeStampOnTamperDetection_Definitions */
NYX 0:85b3fd62ea1a 90 }RTC_TamperTypeDef;
NYX 0:85b3fd62ea1a 91 /**
NYX 0:85b3fd62ea1a 92 * @}
NYX 0:85b3fd62ea1a 93 */
NYX 0:85b3fd62ea1a 94
NYX 0:85b3fd62ea1a 95 /* Exported constants --------------------------------------------------------*/
NYX 0:85b3fd62ea1a 96 /** @defgroup RTCEx_Exported_Constants RTCEx Exported Constants
NYX 0:85b3fd62ea1a 97 * @{
NYX 0:85b3fd62ea1a 98 */
NYX 0:85b3fd62ea1a 99
NYX 0:85b3fd62ea1a 100 /** @defgroup RTCEx_Backup_Registers_Definitions RTC Backup Registers Definitions
NYX 0:85b3fd62ea1a 101 * @{
NYX 0:85b3fd62ea1a 102 */
NYX 0:85b3fd62ea1a 103 #define RTC_BKP_DR0 0x00000000U
NYX 0:85b3fd62ea1a 104 #define RTC_BKP_DR1 0x00000001U
NYX 0:85b3fd62ea1a 105 #define RTC_BKP_DR2 0x00000002U
NYX 0:85b3fd62ea1a 106 #define RTC_BKP_DR3 0x00000003U
NYX 0:85b3fd62ea1a 107 #define RTC_BKP_DR4 0x00000004U
NYX 0:85b3fd62ea1a 108 #define RTC_BKP_DR5 0x00000005U
NYX 0:85b3fd62ea1a 109 #define RTC_BKP_DR6 0x00000006U
NYX 0:85b3fd62ea1a 110 #define RTC_BKP_DR7 0x00000007U
NYX 0:85b3fd62ea1a 111 #define RTC_BKP_DR8 0x00000008U
NYX 0:85b3fd62ea1a 112 #define RTC_BKP_DR9 0x00000009U
NYX 0:85b3fd62ea1a 113 #define RTC_BKP_DR10 0x0000000AU
NYX 0:85b3fd62ea1a 114 #define RTC_BKP_DR11 0x0000000BU
NYX 0:85b3fd62ea1a 115 #define RTC_BKP_DR12 0x0000000CU
NYX 0:85b3fd62ea1a 116 #define RTC_BKP_DR13 0x0000000DU
NYX 0:85b3fd62ea1a 117 #define RTC_BKP_DR14 0x0000000EU
NYX 0:85b3fd62ea1a 118 #define RTC_BKP_DR15 0x0000000FU
NYX 0:85b3fd62ea1a 119 #define RTC_BKP_DR16 0x00000010U
NYX 0:85b3fd62ea1a 120 #define RTC_BKP_DR17 0x00000011U
NYX 0:85b3fd62ea1a 121 #define RTC_BKP_DR18 0x00000012U
NYX 0:85b3fd62ea1a 122 #define RTC_BKP_DR19 0x00000013U
NYX 0:85b3fd62ea1a 123 /**
NYX 0:85b3fd62ea1a 124 * @}
NYX 0:85b3fd62ea1a 125 */
NYX 0:85b3fd62ea1a 126
NYX 0:85b3fd62ea1a 127 /** @defgroup RTCEx_Time_Stamp_Edges_definitions RTC TimeStamp Edges Definitions
NYX 0:85b3fd62ea1a 128 * @{
NYX 0:85b3fd62ea1a 129 */
NYX 0:85b3fd62ea1a 130 #define RTC_TIMESTAMPEDGE_RISING 0x00000000U
NYX 0:85b3fd62ea1a 131 #define RTC_TIMESTAMPEDGE_FALLING 0x00000008U
NYX 0:85b3fd62ea1a 132 /**
NYX 0:85b3fd62ea1a 133 * @}
NYX 0:85b3fd62ea1a 134 */
NYX 0:85b3fd62ea1a 135
NYX 0:85b3fd62ea1a 136 /** @defgroup RTCEx_Tamper_Pins_Definitions RTC Tamper Pins Definitions
NYX 0:85b3fd62ea1a 137 * @{
NYX 0:85b3fd62ea1a 138 */
NYX 0:85b3fd62ea1a 139 #define RTC_TAMPER_1 RTC_TAFCR_TAMP1E
NYX 0:85b3fd62ea1a 140
NYX 0:85b3fd62ea1a 141 #if !defined(STM32F412Zx) && !defined(STM32F412Vx) && !defined(STM32F412Rx) && !defined(STM32F412Cx) && !defined(STM32F413xx) && !defined(STM32F423xx)
NYX 0:85b3fd62ea1a 142 #define RTC_TAMPER_2 RTC_TAFCR_TAMP2E
NYX 0:85b3fd62ea1a 143 #endif
NYX 0:85b3fd62ea1a 144 /**
NYX 0:85b3fd62ea1a 145 * @}
NYX 0:85b3fd62ea1a 146 */
NYX 0:85b3fd62ea1a 147
NYX 0:85b3fd62ea1a 148 /** @defgroup RTCEx_Tamper_Pins_Selection RTC tamper Pins Selection
NYX 0:85b3fd62ea1a 149 * @{
NYX 0:85b3fd62ea1a 150 */
NYX 0:85b3fd62ea1a 151
NYX 0:85b3fd62ea1a 152 #define RTC_TAMPERPIN_DEFAULT 0x00000000U
NYX 0:85b3fd62ea1a 153
NYX 0:85b3fd62ea1a 154 #if !defined(STM32F412Zx) && !defined(STM32F412Vx) && !defined(STM32F412Rx) && !defined(STM32F412Cx) && !defined(STM32F413xx) && !defined(STM32F423xx)
NYX 0:85b3fd62ea1a 155 #define RTC_TAMPERPIN_POS1 0x00010000U
NYX 0:85b3fd62ea1a 156 #endif
NYX 0:85b3fd62ea1a 157 /**
NYX 0:85b3fd62ea1a 158 * @}
NYX 0:85b3fd62ea1a 159 */
NYX 0:85b3fd62ea1a 160
NYX 0:85b3fd62ea1a 161 /** @defgroup RTCEx_TimeStamp_Pin_Selection RTC TimeStamp Pins Selection
NYX 0:85b3fd62ea1a 162 * @{
NYX 0:85b3fd62ea1a 163 */
NYX 0:85b3fd62ea1a 164 #define RTC_TIMESTAMPPIN_DEFAULT 0x00000000U
NYX 0:85b3fd62ea1a 165
NYX 0:85b3fd62ea1a 166 #if !defined(STM32F412Zx) && !defined(STM32F412Vx) && !defined(STM32F412Rx) && !defined(STM32F412Cx) && !defined(STM32F413xx) && !defined(STM32F423xx)
NYX 0:85b3fd62ea1a 167 #define RTC_TIMESTAMPPIN_POS1 0x00020000U
NYX 0:85b3fd62ea1a 168 #endif
NYX 0:85b3fd62ea1a 169 /**
NYX 0:85b3fd62ea1a 170 * @}
NYX 0:85b3fd62ea1a 171 */
NYX 0:85b3fd62ea1a 172
NYX 0:85b3fd62ea1a 173 /** @defgroup RTCEx_Tamper_Trigger_Definitions RTC Tamper Triggers Definitions
NYX 0:85b3fd62ea1a 174 * @{
NYX 0:85b3fd62ea1a 175 */
NYX 0:85b3fd62ea1a 176 #define RTC_TAMPERTRIGGER_RISINGEDGE 0x00000000U
NYX 0:85b3fd62ea1a 177 #define RTC_TAMPERTRIGGER_FALLINGEDGE 0x00000002U
NYX 0:85b3fd62ea1a 178 #define RTC_TAMPERTRIGGER_LOWLEVEL RTC_TAMPERTRIGGER_RISINGEDGE
NYX 0:85b3fd62ea1a 179 #define RTC_TAMPERTRIGGER_HIGHLEVEL RTC_TAMPERTRIGGER_FALLINGEDGE
NYX 0:85b3fd62ea1a 180 /**
NYX 0:85b3fd62ea1a 181 * @}
NYX 0:85b3fd62ea1a 182 */
NYX 0:85b3fd62ea1a 183
NYX 0:85b3fd62ea1a 184 /** @defgroup RTCEx_Tamper_Filter_Definitions RTC Tamper Filter Definitions
NYX 0:85b3fd62ea1a 185 * @{
NYX 0:85b3fd62ea1a 186 */
NYX 0:85b3fd62ea1a 187 #define RTC_TAMPERFILTER_DISABLE 0x00000000U /*!< Tamper filter is disabled */
NYX 0:85b3fd62ea1a 188
NYX 0:85b3fd62ea1a 189 #define RTC_TAMPERFILTER_2SAMPLE 0x00000800U /*!< Tamper is activated after 2
NYX 0:85b3fd62ea1a 190 consecutive samples at the active level */
NYX 0:85b3fd62ea1a 191 #define RTC_TAMPERFILTER_4SAMPLE 0x00001000U /*!< Tamper is activated after 4
NYX 0:85b3fd62ea1a 192 consecutive samples at the active level */
NYX 0:85b3fd62ea1a 193 #define RTC_TAMPERFILTER_8SAMPLE 0x00001800U /*!< Tamper is activated after 8
NYX 0:85b3fd62ea1a 194 consecutive samples at the active level. */
NYX 0:85b3fd62ea1a 195 /**
NYX 0:85b3fd62ea1a 196 * @}
NYX 0:85b3fd62ea1a 197 */
NYX 0:85b3fd62ea1a 198
NYX 0:85b3fd62ea1a 199 /** @defgroup RTCEx_Tamper_Sampling_Frequencies_Definitions RTC Tamper Sampling Frequencies Definitions
NYX 0:85b3fd62ea1a 200 * @{
NYX 0:85b3fd62ea1a 201 */
NYX 0:85b3fd62ea1a 202 #define RTC_TAMPERSAMPLINGFREQ_RTCCLK_DIV32768 0x00000000U /*!< Each of the tamper inputs are sampled
NYX 0:85b3fd62ea1a 203 with a frequency = RTCCLK / 32768 */
NYX 0:85b3fd62ea1a 204 #define RTC_TAMPERSAMPLINGFREQ_RTCCLK_DIV16384 0x00000100U /*!< Each of the tamper inputs are sampled
NYX 0:85b3fd62ea1a 205 with a frequency = RTCCLK / 16384 */
NYX 0:85b3fd62ea1a 206 #define RTC_TAMPERSAMPLINGFREQ_RTCCLK_DIV8192 0x00000200U /*!< Each of the tamper inputs are sampled
NYX 0:85b3fd62ea1a 207 with a frequency = RTCCLK / 8192 */
NYX 0:85b3fd62ea1a 208 #define RTC_TAMPERSAMPLINGFREQ_RTCCLK_DIV4096 0x00000300U /*!< Each of the tamper inputs are sampled
NYX 0:85b3fd62ea1a 209 with a frequency = RTCCLK / 4096 */
NYX 0:85b3fd62ea1a 210 #define RTC_TAMPERSAMPLINGFREQ_RTCCLK_DIV2048 0x00000400U /*!< Each of the tamper inputs are sampled
NYX 0:85b3fd62ea1a 211 with a frequency = RTCCLK / 2048 */
NYX 0:85b3fd62ea1a 212 #define RTC_TAMPERSAMPLINGFREQ_RTCCLK_DIV1024 0x00000500U /*!< Each of the tamper inputs are sampled
NYX 0:85b3fd62ea1a 213 with a frequency = RTCCLK / 1024 */
NYX 0:85b3fd62ea1a 214 #define RTC_TAMPERSAMPLINGFREQ_RTCCLK_DIV512 0x00000600U /*!< Each of the tamper inputs are sampled
NYX 0:85b3fd62ea1a 215 with a frequency = RTCCLK / 512 */
NYX 0:85b3fd62ea1a 216 #define RTC_TAMPERSAMPLINGFREQ_RTCCLK_DIV256 0x00000700U /*!< Each of the tamper inputs are sampled
NYX 0:85b3fd62ea1a 217 with a frequency = RTCCLK / 256 */
NYX 0:85b3fd62ea1a 218 /**
NYX 0:85b3fd62ea1a 219 * @}
NYX 0:85b3fd62ea1a 220 */
NYX 0:85b3fd62ea1a 221
NYX 0:85b3fd62ea1a 222 /** @defgroup RTCEx_Tamper_Pin_Precharge_Duration_Definitions RTC Tamper Pin Precharge Duration Definitions
NYX 0:85b3fd62ea1a 223 * @{
NYX 0:85b3fd62ea1a 224 */
NYX 0:85b3fd62ea1a 225 #define RTC_TAMPERPRECHARGEDURATION_1RTCCLK 0x00000000U /*!< Tamper pins are pre-charged before
NYX 0:85b3fd62ea1a 226 sampling during 1 RTCCLK cycle */
NYX 0:85b3fd62ea1a 227 #define RTC_TAMPERPRECHARGEDURATION_2RTCCLK 0x00002000U /*!< Tamper pins are pre-charged before
NYX 0:85b3fd62ea1a 228 sampling during 2 RTCCLK cycles */
NYX 0:85b3fd62ea1a 229 #define RTC_TAMPERPRECHARGEDURATION_4RTCCLK 0x00004000U /*!< Tamper pins are pre-charged before
NYX 0:85b3fd62ea1a 230 sampling during 4 RTCCLK cycles */
NYX 0:85b3fd62ea1a 231 #define RTC_TAMPERPRECHARGEDURATION_8RTCCLK 0x00006000U /*!< Tamper pins are pre-charged before
NYX 0:85b3fd62ea1a 232 sampling during 8 RTCCLK cycles */
NYX 0:85b3fd62ea1a 233 /**
NYX 0:85b3fd62ea1a 234 * @}
NYX 0:85b3fd62ea1a 235 */
NYX 0:85b3fd62ea1a 236
NYX 0:85b3fd62ea1a 237 /** @defgroup RTCEx_Tamper_TimeStampOnTamperDetection_Definitions RTC Tamper TimeStamp On Tamper Detection Definitions
NYX 0:85b3fd62ea1a 238 * @{
NYX 0:85b3fd62ea1a 239 */
NYX 0:85b3fd62ea1a 240 #define RTC_TIMESTAMPONTAMPERDETECTION_ENABLE ((uint32_t)RTC_TAFCR_TAMPTS) /*!< TimeStamp on Tamper Detection event saved */
NYX 0:85b3fd62ea1a 241 #define RTC_TIMESTAMPONTAMPERDETECTION_DISABLE 0x00000000U /*!< TimeStamp on Tamper Detection event is not saved */
NYX 0:85b3fd62ea1a 242 /**
NYX 0:85b3fd62ea1a 243 * @}
NYX 0:85b3fd62ea1a 244 */
NYX 0:85b3fd62ea1a 245
NYX 0:85b3fd62ea1a 246 /** @defgroup RTCEx_Tamper_Pull_UP_Definitions RTC Tamper Pull Up Definitions
NYX 0:85b3fd62ea1a 247 * @{
NYX 0:85b3fd62ea1a 248 */
NYX 0:85b3fd62ea1a 249 #define RTC_TAMPER_PULLUP_ENABLE 0x00000000U /*!< TimeStamp on Tamper Detection event saved */
NYX 0:85b3fd62ea1a 250 #define RTC_TAMPER_PULLUP_DISABLE ((uint32_t)RTC_TAFCR_TAMPPUDIS) /*!< TimeStamp on Tamper Detection event is not saved */
NYX 0:85b3fd62ea1a 251 /**
NYX 0:85b3fd62ea1a 252 * @}
NYX 0:85b3fd62ea1a 253 */
NYX 0:85b3fd62ea1a 254
NYX 0:85b3fd62ea1a 255 /** @defgroup RTCEx_Wakeup_Timer_Definitions RTC Wake-up Timer Definitions
NYX 0:85b3fd62ea1a 256 * @{
NYX 0:85b3fd62ea1a 257 */
NYX 0:85b3fd62ea1a 258 #define RTC_WAKEUPCLOCK_RTCCLK_DIV16 0x00000000U
NYX 0:85b3fd62ea1a 259 #define RTC_WAKEUPCLOCK_RTCCLK_DIV8 0x00000001U
NYX 0:85b3fd62ea1a 260 #define RTC_WAKEUPCLOCK_RTCCLK_DIV4 0x00000002U
NYX 0:85b3fd62ea1a 261 #define RTC_WAKEUPCLOCK_RTCCLK_DIV2 0x00000003U
NYX 0:85b3fd62ea1a 262 #define RTC_WAKEUPCLOCK_CK_SPRE_16BITS 0x00000004U
NYX 0:85b3fd62ea1a 263 #define RTC_WAKEUPCLOCK_CK_SPRE_17BITS 0x00000006U
NYX 0:85b3fd62ea1a 264 /**
NYX 0:85b3fd62ea1a 265 * @}
NYX 0:85b3fd62ea1a 266 */
NYX 0:85b3fd62ea1a 267
NYX 0:85b3fd62ea1a 268 /** @defgroup RTCEx_Digital_Calibration_Definitions RTC Digital Calib Definitions
NYX 0:85b3fd62ea1a 269 * @{
NYX 0:85b3fd62ea1a 270 */
NYX 0:85b3fd62ea1a 271 #define RTC_CALIBSIGN_POSITIVE 0x00000000U
NYX 0:85b3fd62ea1a 272 #define RTC_CALIBSIGN_NEGATIVE 0x00000080U
NYX 0:85b3fd62ea1a 273 /**
NYX 0:85b3fd62ea1a 274 * @}
NYX 0:85b3fd62ea1a 275 */
NYX 0:85b3fd62ea1a 276
NYX 0:85b3fd62ea1a 277 /** @defgroup RTCEx_Smooth_calib_period_Definitions RTC Smooth Calib Period Definitions
NYX 0:85b3fd62ea1a 278 * @{
NYX 0:85b3fd62ea1a 279 */
NYX 0:85b3fd62ea1a 280 #define RTC_SMOOTHCALIB_PERIOD_32SEC 0x00000000U /*!< If RTCCLK = 32768 Hz, Smooth calibration
NYX 0:85b3fd62ea1a 281 period is 32s, else 2exp20 RTCCLK seconds */
NYX 0:85b3fd62ea1a 282 #define RTC_SMOOTHCALIB_PERIOD_16SEC 0x00002000U /*!< If RTCCLK = 32768 Hz, Smooth calibration
NYX 0:85b3fd62ea1a 283 period is 16s, else 2exp19 RTCCLK seconds */
NYX 0:85b3fd62ea1a 284 #define RTC_SMOOTHCALIB_PERIOD_8SEC 0x00004000U /*!< If RTCCLK = 32768 Hz, Smooth calibration
NYX 0:85b3fd62ea1a 285 period is 8s, else 2exp18 RTCCLK seconds */
NYX 0:85b3fd62ea1a 286 /**
NYX 0:85b3fd62ea1a 287 * @}
NYX 0:85b3fd62ea1a 288 */
NYX 0:85b3fd62ea1a 289
NYX 0:85b3fd62ea1a 290 /** @defgroup RTCEx_Smooth_calib_Plus_pulses_Definitions RTC Smooth Calib Plus Pulses Definitions
NYX 0:85b3fd62ea1a 291 * @{
NYX 0:85b3fd62ea1a 292 */
NYX 0:85b3fd62ea1a 293 #define RTC_SMOOTHCALIB_PLUSPULSES_SET 0x00008000U /*!< The number of RTCCLK pulses added
NYX 0:85b3fd62ea1a 294 during a X -second window = Y - CALM[8:0]
NYX 0:85b3fd62ea1a 295 with Y = 512, 256, 128 when X = 32, 16, 8 */
NYX 0:85b3fd62ea1a 296 #define RTC_SMOOTHCALIB_PLUSPULSES_RESET 0x00000000U /*!< The number of RTCCLK pulses subbstited
NYX 0:85b3fd62ea1a 297 during a 32-second window = CALM[8:0] */
NYX 0:85b3fd62ea1a 298 /**
NYX 0:85b3fd62ea1a 299 * @}
NYX 0:85b3fd62ea1a 300 */
NYX 0:85b3fd62ea1a 301
NYX 0:85b3fd62ea1a 302 /** @defgroup RTCEx_Add_1_Second_Parameter_Definitions RTC Add 1 Second Parameter Definitions
NYX 0:85b3fd62ea1a 303 * @{
NYX 0:85b3fd62ea1a 304 */
NYX 0:85b3fd62ea1a 305 #define RTC_SHIFTADD1S_RESET 0x00000000U
NYX 0:85b3fd62ea1a 306 #define RTC_SHIFTADD1S_SET 0x80000000U
NYX 0:85b3fd62ea1a 307 /**
NYX 0:85b3fd62ea1a 308 * @}
NYX 0:85b3fd62ea1a 309 */
NYX 0:85b3fd62ea1a 310
NYX 0:85b3fd62ea1a 311
NYX 0:85b3fd62ea1a 312 /** @defgroup RTCEx_Calib_Output_selection_Definitions RTC Calib Output Selection Definitions
NYX 0:85b3fd62ea1a 313 * @{
NYX 0:85b3fd62ea1a 314 */
NYX 0:85b3fd62ea1a 315 #define RTC_CALIBOUTPUT_512HZ 0x00000000U
NYX 0:85b3fd62ea1a 316 #define RTC_CALIBOUTPUT_1HZ 0x00080000U
NYX 0:85b3fd62ea1a 317 /**
NYX 0:85b3fd62ea1a 318 * @}
NYX 0:85b3fd62ea1a 319 */
NYX 0:85b3fd62ea1a 320
NYX 0:85b3fd62ea1a 321 /**
NYX 0:85b3fd62ea1a 322 * @}
NYX 0:85b3fd62ea1a 323 */
NYX 0:85b3fd62ea1a 324
NYX 0:85b3fd62ea1a 325 /* Exported macro ------------------------------------------------------------*/
NYX 0:85b3fd62ea1a 326 /** @defgroup RTCEx_Exported_Macros RTCEx Exported Macros
NYX 0:85b3fd62ea1a 327 * @{
NYX 0:85b3fd62ea1a 328 */
NYX 0:85b3fd62ea1a 329
NYX 0:85b3fd62ea1a 330 /* ---------------------------------WAKEUPTIMER---------------------------------*/
NYX 0:85b3fd62ea1a 331 /** @defgroup RTCEx_WakeUp_Timer RTC WakeUp Timer
NYX 0:85b3fd62ea1a 332 * @{
NYX 0:85b3fd62ea1a 333 */
NYX 0:85b3fd62ea1a 334
NYX 0:85b3fd62ea1a 335 /**
NYX 0:85b3fd62ea1a 336 * @brief Enable the RTC WakeUp Timer peripheral.
NYX 0:85b3fd62ea1a 337 * @param __HANDLE__: specifies the RTC handle.
NYX 0:85b3fd62ea1a 338 * @retval None
NYX 0:85b3fd62ea1a 339 */
NYX 0:85b3fd62ea1a 340 #define __HAL_RTC_WAKEUPTIMER_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->CR |= (RTC_CR_WUTE))
NYX 0:85b3fd62ea1a 341
NYX 0:85b3fd62ea1a 342 /**
NYX 0:85b3fd62ea1a 343 * @brief Disable the RTC Wake-up Timer peripheral.
NYX 0:85b3fd62ea1a 344 * @param __HANDLE__: specifies the RTC handle.
NYX 0:85b3fd62ea1a 345 * @retval None
NYX 0:85b3fd62ea1a 346 */
NYX 0:85b3fd62ea1a 347 #define __HAL_RTC_WAKEUPTIMER_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->CR &= ~(RTC_CR_WUTE))
NYX 0:85b3fd62ea1a 348
NYX 0:85b3fd62ea1a 349 /**
NYX 0:85b3fd62ea1a 350 * @brief Enable the RTC WakeUpTimer interrupt.
NYX 0:85b3fd62ea1a 351 * @param __HANDLE__: specifies the RTC handle.
NYX 0:85b3fd62ea1a 352 * @param __INTERRUPT__: specifies the RTC WakeUpTimer interrupt sources to be enabled or disabled.
NYX 0:85b3fd62ea1a 353 * This parameter can be:
NYX 0:85b3fd62ea1a 354 * @arg RTC_IT_WUT: WakeUpTimer A interrupt
NYX 0:85b3fd62ea1a 355 * @retval None
NYX 0:85b3fd62ea1a 356 */
NYX 0:85b3fd62ea1a 357 #define __HAL_RTC_WAKEUPTIMER_ENABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->CR |= (__INTERRUPT__))
NYX 0:85b3fd62ea1a 358
NYX 0:85b3fd62ea1a 359 /**
NYX 0:85b3fd62ea1a 360 * @brief Disable the RTC WakeUpTimer interrupt.
NYX 0:85b3fd62ea1a 361 * @param __HANDLE__: specifies the RTC handle.
NYX 0:85b3fd62ea1a 362 * @param __INTERRUPT__: specifies the RTC WakeUpTimer interrupt sources to be enabled or disabled.
NYX 0:85b3fd62ea1a 363 * This parameter can be:
NYX 0:85b3fd62ea1a 364 * @arg RTC_IT_WUT: WakeUpTimer A interrupt
NYX 0:85b3fd62ea1a 365 * @retval None
NYX 0:85b3fd62ea1a 366 */
NYX 0:85b3fd62ea1a 367 #define __HAL_RTC_WAKEUPTIMER_DISABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->CR &= ~(__INTERRUPT__))
NYX 0:85b3fd62ea1a 368
NYX 0:85b3fd62ea1a 369 /**
NYX 0:85b3fd62ea1a 370 * @brief Check whether the specified RTC WakeUpTimer interrupt has occurred or not.
NYX 0:85b3fd62ea1a 371 * @param __HANDLE__: specifies the RTC handle.
NYX 0:85b3fd62ea1a 372 * @param __INTERRUPT__: specifies the RTC WakeUpTimer interrupt to check.
NYX 0:85b3fd62ea1a 373 * This parameter can be:
NYX 0:85b3fd62ea1a 374 * @arg RTC_IT_WUT: WakeUpTimer A interrupt
NYX 0:85b3fd62ea1a 375 * @retval None
NYX 0:85b3fd62ea1a 376 */
NYX 0:85b3fd62ea1a 377 #define __HAL_RTC_WAKEUPTIMER_GET_IT(__HANDLE__, __INTERRUPT__) (((((__HANDLE__)->Instance->ISR) & ((__INTERRUPT__)>> 4U)) != RESET)? SET : RESET)
NYX 0:85b3fd62ea1a 378
NYX 0:85b3fd62ea1a 379 /**
NYX 0:85b3fd62ea1a 380 * @brief Check whether the specified RTC Wake Up timer interrupt has been enabled or not.
NYX 0:85b3fd62ea1a 381 * @param __HANDLE__: specifies the RTC handle.
NYX 0:85b3fd62ea1a 382 * @param __INTERRUPT__: specifies the RTC Wake Up timer interrupt sources to check.
NYX 0:85b3fd62ea1a 383 * This parameter can be:
NYX 0:85b3fd62ea1a 384 * @arg RTC_IT_WUT: WakeUpTimer interrupt
NYX 0:85b3fd62ea1a 385 * @retval None
NYX 0:85b3fd62ea1a 386 */
NYX 0:85b3fd62ea1a 387 #define __HAL_RTC_WAKEUPTIMER_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__) (((((__HANDLE__)->Instance->CR) & (__INTERRUPT__)) != RESET) ? SET : RESET)
NYX 0:85b3fd62ea1a 388
NYX 0:85b3fd62ea1a 389 /**
NYX 0:85b3fd62ea1a 390 * @brief Get the selected RTC WakeUpTimer's flag status.
NYX 0:85b3fd62ea1a 391 * @param __HANDLE__: specifies the RTC handle.
NYX 0:85b3fd62ea1a 392 * @param __FLAG__: specifies the RTC WakeUpTimer Flag to check.
NYX 0:85b3fd62ea1a 393 * This parameter can be:
NYX 0:85b3fd62ea1a 394 * @arg RTC_FLAG_WUTF
NYX 0:85b3fd62ea1a 395 * @arg RTC_FLAG_WUTWF
NYX 0:85b3fd62ea1a 396 * @retval None
NYX 0:85b3fd62ea1a 397 */
NYX 0:85b3fd62ea1a 398 #define __HAL_RTC_WAKEUPTIMER_GET_FLAG(__HANDLE__, __FLAG__) (((((__HANDLE__)->Instance->ISR) & (__FLAG__)) != RESET)? SET : RESET)
NYX 0:85b3fd62ea1a 399
NYX 0:85b3fd62ea1a 400 /**
NYX 0:85b3fd62ea1a 401 * @brief Clear the RTC Wake Up timer's pending flags.
NYX 0:85b3fd62ea1a 402 * @param __HANDLE__: specifies the RTC handle.
NYX 0:85b3fd62ea1a 403 * @param __FLAG__: specifies the RTC Tamper Flag sources to be enabled or disabled.
NYX 0:85b3fd62ea1a 404 * This parameter can be:
NYX 0:85b3fd62ea1a 405 * @arg RTC_FLAG_WUTF
NYX 0:85b3fd62ea1a 406 * @retval None
NYX 0:85b3fd62ea1a 407 */
NYX 0:85b3fd62ea1a 408 #define __HAL_RTC_WAKEUPTIMER_CLEAR_FLAG(__HANDLE__, __FLAG__) ((__HANDLE__)->Instance->ISR) = (~((__FLAG__) | RTC_ISR_INIT)|((__HANDLE__)->Instance->ISR & RTC_ISR_INIT))
NYX 0:85b3fd62ea1a 409
NYX 0:85b3fd62ea1a 410 /**
NYX 0:85b3fd62ea1a 411 * @brief Enable interrupt on the RTC Wake-up Timer associated Exti line.
NYX 0:85b3fd62ea1a 412 * @retval None
NYX 0:85b3fd62ea1a 413 */
NYX 0:85b3fd62ea1a 414 #define __HAL_RTC_WAKEUPTIMER_EXTI_ENABLE_IT() (EXTI->IMR |= RTC_EXTI_LINE_WAKEUPTIMER_EVENT)
NYX 0:85b3fd62ea1a 415
NYX 0:85b3fd62ea1a 416 /**
NYX 0:85b3fd62ea1a 417 * @brief Disable interrupt on the RTC Wake-up Timer associated Exti line.
NYX 0:85b3fd62ea1a 418 * @retval None
NYX 0:85b3fd62ea1a 419 */
NYX 0:85b3fd62ea1a 420 #define __HAL_RTC_WAKEUPTIMER_EXTI_DISABLE_IT() (EXTI->IMR &= ~(RTC_EXTI_LINE_WAKEUPTIMER_EVENT))
NYX 0:85b3fd62ea1a 421
NYX 0:85b3fd62ea1a 422 /**
NYX 0:85b3fd62ea1a 423 * @brief Enable event on the RTC Wake-up Timer associated Exti line.
NYX 0:85b3fd62ea1a 424 * @retval None.
NYX 0:85b3fd62ea1a 425 */
NYX 0:85b3fd62ea1a 426 #define __HAL_RTC_WAKEUPTIMER_EXTI_ENABLE_EVENT() (EXTI->EMR |= RTC_EXTI_LINE_WAKEUPTIMER_EVENT)
NYX 0:85b3fd62ea1a 427
NYX 0:85b3fd62ea1a 428 /**
NYX 0:85b3fd62ea1a 429 * @brief Disable event on the RTC Wake-up Timer associated Exti line.
NYX 0:85b3fd62ea1a 430 * @retval None.
NYX 0:85b3fd62ea1a 431 */
NYX 0:85b3fd62ea1a 432 #define __HAL_RTC_WAKEUPTIMER_EXTI_DISABLE_EVENT() (EXTI->EMR &= ~(RTC_EXTI_LINE_WAKEUPTIMER_EVENT))
NYX 0:85b3fd62ea1a 433
NYX 0:85b3fd62ea1a 434 /**
NYX 0:85b3fd62ea1a 435 * @brief Enable falling edge trigger on the RTC Wake-up Timer associated Exti line.
NYX 0:85b3fd62ea1a 436 * @retval None.
NYX 0:85b3fd62ea1a 437 */
NYX 0:85b3fd62ea1a 438 #define __HAL_RTC_WAKEUPTIMER_EXTI_ENABLE_FALLING_EDGE() (EXTI->FTSR |= RTC_EXTI_LINE_WAKEUPTIMER_EVENT)
NYX 0:85b3fd62ea1a 439
NYX 0:85b3fd62ea1a 440 /**
NYX 0:85b3fd62ea1a 441 * @brief Disable falling edge trigger on the RTC Wake-up Timer associated Exti line.
NYX 0:85b3fd62ea1a 442 * @retval None.
NYX 0:85b3fd62ea1a 443 */
NYX 0:85b3fd62ea1a 444 #define __HAL_RTC_WAKEUPTIMER_EXTI_DISABLE_FALLING_EDGE() (EXTI->FTSR &= ~(RTC_EXTI_LINE_WAKEUPTIMER_EVENT))
NYX 0:85b3fd62ea1a 445
NYX 0:85b3fd62ea1a 446 /**
NYX 0:85b3fd62ea1a 447 * @brief Enable rising edge trigger on the RTC Wake-up Timer associated Exti line.
NYX 0:85b3fd62ea1a 448 * @retval None.
NYX 0:85b3fd62ea1a 449 */
NYX 0:85b3fd62ea1a 450 #define __HAL_RTC_WAKEUPTIMER_EXTI_ENABLE_RISING_EDGE() (EXTI->RTSR |= RTC_EXTI_LINE_WAKEUPTIMER_EVENT)
NYX 0:85b3fd62ea1a 451
NYX 0:85b3fd62ea1a 452 /**
NYX 0:85b3fd62ea1a 453 * @brief Disable rising edge trigger on the RTC Wake-up Timer associated Exti line.
NYX 0:85b3fd62ea1a 454 * @retval None.
NYX 0:85b3fd62ea1a 455 */
NYX 0:85b3fd62ea1a 456 #define __HAL_RTC_WAKEUPTIMER_EXTI_DISABLE_RISING_EDGE() (EXTI->RTSR &= ~(RTC_EXTI_LINE_WAKEUPTIMER_EVENT))
NYX 0:85b3fd62ea1a 457
NYX 0:85b3fd62ea1a 458 /**
NYX 0:85b3fd62ea1a 459 * @brief Enable rising & falling edge trigger on the RTC Wake-up Timer associated Exti line.
NYX 0:85b3fd62ea1a 460 * @retval None.
NYX 0:85b3fd62ea1a 461 */
NYX 0:85b3fd62ea1a 462 #define __HAL_RTC_WAKEUPTIMER_EXTI_ENABLE_RISING_FALLING_EDGE() do { __HAL_RTC_WAKEUPTIMER_EXTI_ENABLE_RISING_EDGE();\
NYX 0:85b3fd62ea1a 463 __HAL_RTC_WAKEUPTIMER_EXTI_ENABLE_FALLING_EDGE();\
NYX 0:85b3fd62ea1a 464 } while(0U)
NYX 0:85b3fd62ea1a 465
NYX 0:85b3fd62ea1a 466 /**
NYX 0:85b3fd62ea1a 467 * @brief Disable rising & falling edge trigger on the RTC Wake-up Timer associated Exti line.
NYX 0:85b3fd62ea1a 468 * This parameter can be:
NYX 0:85b3fd62ea1a 469 * @retval None.
NYX 0:85b3fd62ea1a 470 */
NYX 0:85b3fd62ea1a 471 #define __HAL_RTC_WAKEUPTIMER_EXTI_DISABLE_RISING_FALLING_EDGE() do { __HAL_RTC_WAKEUPTIMER_EXTI_DISABLE_RISING_EDGE();\
NYX 0:85b3fd62ea1a 472 __HAL_RTC_WAKEUPTIMER_EXTI_DISABLE_FALLING_EDGE();\
NYX 0:85b3fd62ea1a 473 } while(0U)
NYX 0:85b3fd62ea1a 474
NYX 0:85b3fd62ea1a 475 /**
NYX 0:85b3fd62ea1a 476 * @brief Check whether the RTC Wake-up Timer associated Exti line interrupt flag is set or not.
NYX 0:85b3fd62ea1a 477 * @retval Line Status.
NYX 0:85b3fd62ea1a 478 */
NYX 0:85b3fd62ea1a 479 #define __HAL_RTC_WAKEUPTIMER_EXTI_GET_FLAG() (EXTI->PR & RTC_EXTI_LINE_WAKEUPTIMER_EVENT)
NYX 0:85b3fd62ea1a 480
NYX 0:85b3fd62ea1a 481 /**
NYX 0:85b3fd62ea1a 482 * @brief Clear the RTC Wake-up Timer associated Exti line flag.
NYX 0:85b3fd62ea1a 483 * @retval None.
NYX 0:85b3fd62ea1a 484 */
NYX 0:85b3fd62ea1a 485 #define __HAL_RTC_WAKEUPTIMER_EXTI_CLEAR_FLAG() (EXTI->PR = RTC_EXTI_LINE_WAKEUPTIMER_EVENT)
NYX 0:85b3fd62ea1a 486
NYX 0:85b3fd62ea1a 487 /**
NYX 0:85b3fd62ea1a 488 * @brief Generate a Software interrupt on the RTC Wake-up Timer associated Exti line.
NYX 0:85b3fd62ea1a 489 * @retval None.
NYX 0:85b3fd62ea1a 490 */
NYX 0:85b3fd62ea1a 491 #define __HAL_RTC_WAKEUPTIMER_EXTI_GENERATE_SWIT() (EXTI->SWIER |= RTC_EXTI_LINE_WAKEUPTIMER_EVENT)
NYX 0:85b3fd62ea1a 492
NYX 0:85b3fd62ea1a 493 /**
NYX 0:85b3fd62ea1a 494 * @}
NYX 0:85b3fd62ea1a 495 */
NYX 0:85b3fd62ea1a 496
NYX 0:85b3fd62ea1a 497 /* ---------------------------------TIMESTAMP---------------------------------*/
NYX 0:85b3fd62ea1a 498 /** @defgroup RTCEx_Timestamp RTC Timestamp
NYX 0:85b3fd62ea1a 499 * @{
NYX 0:85b3fd62ea1a 500 */
NYX 0:85b3fd62ea1a 501
NYX 0:85b3fd62ea1a 502 /**
NYX 0:85b3fd62ea1a 503 * @brief Enable the RTC TimeStamp peripheral.
NYX 0:85b3fd62ea1a 504 * @param __HANDLE__: specifies the RTC handle.
NYX 0:85b3fd62ea1a 505 * @retval None
NYX 0:85b3fd62ea1a 506 */
NYX 0:85b3fd62ea1a 507 #define __HAL_RTC_TIMESTAMP_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->CR |= (RTC_CR_TSE))
NYX 0:85b3fd62ea1a 508
NYX 0:85b3fd62ea1a 509 /**
NYX 0:85b3fd62ea1a 510 * @brief Disable the RTC TimeStamp peripheral.
NYX 0:85b3fd62ea1a 511 * @param __HANDLE__: specifies the RTC handle.
NYX 0:85b3fd62ea1a 512 * @retval None
NYX 0:85b3fd62ea1a 513 */
NYX 0:85b3fd62ea1a 514 #define __HAL_RTC_TIMESTAMP_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->CR &= ~(RTC_CR_TSE))
NYX 0:85b3fd62ea1a 515
NYX 0:85b3fd62ea1a 516 /**
NYX 0:85b3fd62ea1a 517 * @brief Enable the RTC TimeStamp interrupt.
NYX 0:85b3fd62ea1a 518 * @param __HANDLE__: specifies the RTC handle.
NYX 0:85b3fd62ea1a 519 * @param __INTERRUPT__: specifies the RTC TimeStamp interrupt sources to be enabled or disabled.
NYX 0:85b3fd62ea1a 520 * This parameter can be:
NYX 0:85b3fd62ea1a 521 * @arg RTC_IT_TS: TimeStamp interrupt
NYX 0:85b3fd62ea1a 522 * @retval None
NYX 0:85b3fd62ea1a 523 */
NYX 0:85b3fd62ea1a 524 #define __HAL_RTC_TIMESTAMP_ENABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->CR |= (__INTERRUPT__))
NYX 0:85b3fd62ea1a 525
NYX 0:85b3fd62ea1a 526 /**
NYX 0:85b3fd62ea1a 527 * @brief Disable the RTC TimeStamp interrupt.
NYX 0:85b3fd62ea1a 528 * @param __HANDLE__: specifies the RTC handle.
NYX 0:85b3fd62ea1a 529 * @param __INTERRUPT__: specifies the RTC TimeStamp interrupt sources to be enabled or disabled.
NYX 0:85b3fd62ea1a 530 * This parameter can be:
NYX 0:85b3fd62ea1a 531 * @arg RTC_IT_TS: TimeStamp interrupt
NYX 0:85b3fd62ea1a 532 * @retval None
NYX 0:85b3fd62ea1a 533 */
NYX 0:85b3fd62ea1a 534 #define __HAL_RTC_TIMESTAMP_DISABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->CR &= ~(__INTERRUPT__))
NYX 0:85b3fd62ea1a 535
NYX 0:85b3fd62ea1a 536 /**
NYX 0:85b3fd62ea1a 537 * @brief Check whether the specified RTC TimeStamp interrupt has occurred or not.
NYX 0:85b3fd62ea1a 538 * @param __HANDLE__: specifies the RTC handle.
NYX 0:85b3fd62ea1a 539 * @param __INTERRUPT__: specifies the RTC TimeStamp interrupt to check.
NYX 0:85b3fd62ea1a 540 * This parameter can be:
NYX 0:85b3fd62ea1a 541 * @arg RTC_IT_TS: TimeStamp interrupt
NYX 0:85b3fd62ea1a 542 * @retval None
NYX 0:85b3fd62ea1a 543 */
NYX 0:85b3fd62ea1a 544 #define __HAL_RTC_TIMESTAMP_GET_IT(__HANDLE__, __INTERRUPT__) (((((__HANDLE__)->Instance->ISR) & ((__INTERRUPT__)>> 4U)) != RESET)? SET : RESET)
NYX 0:85b3fd62ea1a 545
NYX 0:85b3fd62ea1a 546 /**
NYX 0:85b3fd62ea1a 547 * @brief Check whether the specified RTC Time Stamp interrupt has been enabled or not.
NYX 0:85b3fd62ea1a 548 * @param __HANDLE__: specifies the RTC handle.
NYX 0:85b3fd62ea1a 549 * @param __INTERRUPT__: specifies the RTC Time Stamp interrupt source to check.
NYX 0:85b3fd62ea1a 550 * This parameter can be:
NYX 0:85b3fd62ea1a 551 * @arg RTC_IT_TS: TimeStamp interrupt
NYX 0:85b3fd62ea1a 552 * @retval None
NYX 0:85b3fd62ea1a 553 */
NYX 0:85b3fd62ea1a 554 #define __HAL_RTC_TIMESTAMP_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__) (((((__HANDLE__)->Instance->CR) & (__INTERRUPT__)) != RESET) ? SET : RESET)
NYX 0:85b3fd62ea1a 555
NYX 0:85b3fd62ea1a 556 /**
NYX 0:85b3fd62ea1a 557 * @brief Get the selected RTC TimeStamp's flag status.
NYX 0:85b3fd62ea1a 558 * @param __HANDLE__: specifies the RTC handle.
NYX 0:85b3fd62ea1a 559 * @param __FLAG__: specifies the RTC TimeStamp flag to check.
NYX 0:85b3fd62ea1a 560 * This parameter can be:
NYX 0:85b3fd62ea1a 561 * @arg RTC_FLAG_TSF
NYX 0:85b3fd62ea1a 562 * @arg RTC_FLAG_TSOVF
NYX 0:85b3fd62ea1a 563 * @retval None
NYX 0:85b3fd62ea1a 564 */
NYX 0:85b3fd62ea1a 565 #define __HAL_RTC_TIMESTAMP_GET_FLAG(__HANDLE__, __FLAG__) (((((__HANDLE__)->Instance->ISR) & (__FLAG__)) != RESET)? SET : RESET)
NYX 0:85b3fd62ea1a 566
NYX 0:85b3fd62ea1a 567 /**
NYX 0:85b3fd62ea1a 568 * @brief Clear the RTC Time Stamp's pending flags.
NYX 0:85b3fd62ea1a 569 * @param __HANDLE__: specifies the RTC handle.
NYX 0:85b3fd62ea1a 570 * @param __FLAG__: specifies the RTC Alarm Flag sources to be enabled or disabled.
NYX 0:85b3fd62ea1a 571 * This parameter can be:
NYX 0:85b3fd62ea1a 572 * @arg RTC_FLAG_TSF
NYX 0:85b3fd62ea1a 573 * @retval None
NYX 0:85b3fd62ea1a 574 */
NYX 0:85b3fd62ea1a 575 #define __HAL_RTC_TIMESTAMP_CLEAR_FLAG(__HANDLE__, __FLAG__) ((__HANDLE__)->Instance->ISR) = (~((__FLAG__) | RTC_ISR_INIT)|((__HANDLE__)->Instance->ISR & RTC_ISR_INIT))
NYX 0:85b3fd62ea1a 576
NYX 0:85b3fd62ea1a 577 /**
NYX 0:85b3fd62ea1a 578 * @}
NYX 0:85b3fd62ea1a 579 */
NYX 0:85b3fd62ea1a 580
NYX 0:85b3fd62ea1a 581 /* ---------------------------------TAMPER------------------------------------*/
NYX 0:85b3fd62ea1a 582 /** @defgroup RTCEx_Tamper RTC Tamper
NYX 0:85b3fd62ea1a 583 * @{
NYX 0:85b3fd62ea1a 584 */
NYX 0:85b3fd62ea1a 585
NYX 0:85b3fd62ea1a 586 /**
NYX 0:85b3fd62ea1a 587 * @brief Enable the RTC Tamper1 input detection.
NYX 0:85b3fd62ea1a 588 * @param __HANDLE__: specifies the RTC handle.
NYX 0:85b3fd62ea1a 589 * @retval None
NYX 0:85b3fd62ea1a 590 */
NYX 0:85b3fd62ea1a 591 #define __HAL_RTC_TAMPER1_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->TAFCR |= (RTC_TAFCR_TAMP1E))
NYX 0:85b3fd62ea1a 592
NYX 0:85b3fd62ea1a 593 /**
NYX 0:85b3fd62ea1a 594 * @brief Disable the RTC Tamper1 input detection.
NYX 0:85b3fd62ea1a 595 * @param __HANDLE__: specifies the RTC handle.
NYX 0:85b3fd62ea1a 596 * @retval None
NYX 0:85b3fd62ea1a 597 */
NYX 0:85b3fd62ea1a 598 #define __HAL_RTC_TAMPER1_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->TAFCR &= ~(RTC_TAFCR_TAMP1E))
NYX 0:85b3fd62ea1a 599
NYX 0:85b3fd62ea1a 600 #if !defined(STM32F412Zx) && !defined(STM32F412Vx) && !defined(STM32F412Rx) && !defined(STM32F412Cx) && !defined(STM32F413xx) && !defined(STM32F423xx)
NYX 0:85b3fd62ea1a 601 /**
NYX 0:85b3fd62ea1a 602 * @brief Enable the RTC Tamper2 input detection.
NYX 0:85b3fd62ea1a 603 * @param __HANDLE__: specifies the RTC handle.
NYX 0:85b3fd62ea1a 604 * @retval None
NYX 0:85b3fd62ea1a 605 */
NYX 0:85b3fd62ea1a 606 #define __HAL_RTC_TAMPER2_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->TAFCR |= (RTC_TAFCR_TAMP2E))
NYX 0:85b3fd62ea1a 607
NYX 0:85b3fd62ea1a 608 /**
NYX 0:85b3fd62ea1a 609 * @brief Disable the RTC Tamper2 input detection.
NYX 0:85b3fd62ea1a 610 * @param __HANDLE__: specifies the RTC handle.
NYX 0:85b3fd62ea1a 611 * @retval None
NYX 0:85b3fd62ea1a 612 */
NYX 0:85b3fd62ea1a 613 #define __HAL_RTC_TAMPER2_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->TAFCR &= ~(RTC_TAFCR_TAMP2E))
NYX 0:85b3fd62ea1a 614 #endif
NYX 0:85b3fd62ea1a 615
NYX 0:85b3fd62ea1a 616 /**
NYX 0:85b3fd62ea1a 617 * @brief Check whether the specified RTC Tamper interrupt has occurred or not.
NYX 0:85b3fd62ea1a 618 * @param __HANDLE__: specifies the RTC handle.
NYX 0:85b3fd62ea1a 619 * @param __INTERRUPT__: specifies the RTC Tamper interrupt to check.
NYX 0:85b3fd62ea1a 620 * This parameter can be:
NYX 0:85b3fd62ea1a 621 * @arg RTC_IT_TAMP1
NYX 0:85b3fd62ea1a 622 * @arg RTC_IT_TAMP2
NYX 0:85b3fd62ea1a 623 * @retval None
NYX 0:85b3fd62ea1a 624 */
NYX 0:85b3fd62ea1a 625 #define __HAL_RTC_TAMPER_GET_IT(__HANDLE__, __INTERRUPT__) (((((__HANDLE__)->Instance->ISR) & ((__INTERRUPT__)>> 4U)) != RESET)? SET : RESET)
NYX 0:85b3fd62ea1a 626
NYX 0:85b3fd62ea1a 627 /**
NYX 0:85b3fd62ea1a 628 * @brief Check whether the specified RTC Tamper interrupt has been enabled or not.
NYX 0:85b3fd62ea1a 629 * @param __HANDLE__: specifies the RTC handle.
NYX 0:85b3fd62ea1a 630 * @param __INTERRUPT__: specifies the RTC Tamper interrupt source to check.
NYX 0:85b3fd62ea1a 631 * This parameter can be:
NYX 0:85b3fd62ea1a 632 * @arg RTC_IT_TAMP: Tamper interrupt
NYX 0:85b3fd62ea1a 633 * @retval None
NYX 0:85b3fd62ea1a 634 */
NYX 0:85b3fd62ea1a 635 #define __HAL_RTC_TAMPER_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__) (((((__HANDLE__)->Instance->TAFCR) & (__INTERRUPT__)) != RESET) ? SET : RESET)
NYX 0:85b3fd62ea1a 636
NYX 0:85b3fd62ea1a 637 /**
NYX 0:85b3fd62ea1a 638 * @brief Get the selected RTC Tamper's flag status.
NYX 0:85b3fd62ea1a 639 * @param __HANDLE__: specifies the RTC handle.
NYX 0:85b3fd62ea1a 640 * @param __FLAG__: specifies the RTC Tamper Flag sources to be enabled or disabled.
NYX 0:85b3fd62ea1a 641 * This parameter can be:
NYX 0:85b3fd62ea1a 642 * @arg RTC_FLAG_TAMP1F
NYX 0:85b3fd62ea1a 643 * @arg RTC_FLAG_TAMP2F
NYX 0:85b3fd62ea1a 644 * @retval None
NYX 0:85b3fd62ea1a 645 */
NYX 0:85b3fd62ea1a 646 #define __HAL_RTC_TAMPER_GET_FLAG(__HANDLE__, __FLAG__) (((((__HANDLE__)->Instance->ISR) & (__FLAG__)) != RESET)? SET : RESET)
NYX 0:85b3fd62ea1a 647
NYX 0:85b3fd62ea1a 648 /**
NYX 0:85b3fd62ea1a 649 * @brief Clear the RTC Tamper's pending flags.
NYX 0:85b3fd62ea1a 650 * @param __HANDLE__: specifies the RTC handle.
NYX 0:85b3fd62ea1a 651 * @param __FLAG__: specifies the RTC Tamper Flag to clear.
NYX 0:85b3fd62ea1a 652 * This parameter can be:
NYX 0:85b3fd62ea1a 653 * @arg RTC_FLAG_TAMP1F
NYX 0:85b3fd62ea1a 654 * @arg RTC_FLAG_TAMP2F
NYX 0:85b3fd62ea1a 655 * @retval None
NYX 0:85b3fd62ea1a 656 */
NYX 0:85b3fd62ea1a 657 #define __HAL_RTC_TAMPER_CLEAR_FLAG(__HANDLE__, __FLAG__) ((__HANDLE__)->Instance->ISR) = (~((__FLAG__) | RTC_ISR_INIT)|((__HANDLE__)->Instance->ISR & RTC_ISR_INIT))
NYX 0:85b3fd62ea1a 658 /**
NYX 0:85b3fd62ea1a 659 * @}
NYX 0:85b3fd62ea1a 660 */
NYX 0:85b3fd62ea1a 661
NYX 0:85b3fd62ea1a 662 /* --------------------------TAMPER/TIMESTAMP---------------------------------*/
NYX 0:85b3fd62ea1a 663 /** @defgroup RTCEx_Tamper_Timestamp EXTI RTC Tamper Timestamp EXTI
NYX 0:85b3fd62ea1a 664 * @{
NYX 0:85b3fd62ea1a 665 */
NYX 0:85b3fd62ea1a 666
NYX 0:85b3fd62ea1a 667 /**
NYX 0:85b3fd62ea1a 668 * @brief Enable interrupt on the RTC Tamper and Timestamp associated Exti line.
NYX 0:85b3fd62ea1a 669 * @retval None
NYX 0:85b3fd62ea1a 670 */
NYX 0:85b3fd62ea1a 671 #define __HAL_RTC_TAMPER_TIMESTAMP_EXTI_ENABLE_IT() (EXTI->IMR |= RTC_EXTI_LINE_TAMPER_TIMESTAMP_EVENT)
NYX 0:85b3fd62ea1a 672
NYX 0:85b3fd62ea1a 673 /**
NYX 0:85b3fd62ea1a 674 * @brief Disable interrupt on the RTC Tamper and Timestamp associated Exti line.
NYX 0:85b3fd62ea1a 675 * @retval None
NYX 0:85b3fd62ea1a 676 */
NYX 0:85b3fd62ea1a 677 #define __HAL_RTC_TAMPER_TIMESTAMP_EXTI_DISABLE_IT() (EXTI->IMR &= ~(RTC_EXTI_LINE_TAMPER_TIMESTAMP_EVENT))
NYX 0:85b3fd62ea1a 678
NYX 0:85b3fd62ea1a 679 /**
NYX 0:85b3fd62ea1a 680 * @brief Enable event on the RTC Tamper and Timestamp associated Exti line.
NYX 0:85b3fd62ea1a 681 * @retval None.
NYX 0:85b3fd62ea1a 682 */
NYX 0:85b3fd62ea1a 683 #define __HAL_RTC_TAMPER_TIMESTAMP_EXTI_ENABLE_EVENT() (EXTI->EMR |= RTC_EXTI_LINE_TAMPER_TIMESTAMP_EVENT)
NYX 0:85b3fd62ea1a 684
NYX 0:85b3fd62ea1a 685 /**
NYX 0:85b3fd62ea1a 686 * @brief Disable event on the RTC Tamper and Timestamp associated Exti line.
NYX 0:85b3fd62ea1a 687 * @retval None.
NYX 0:85b3fd62ea1a 688 */
NYX 0:85b3fd62ea1a 689 #define __HAL_RTC_TAMPER_TIMESTAMP_EXTI_DISABLE_EVENT() (EXTI->EMR &= ~(RTC_EXTI_LINE_TAMPER_TIMESTAMP_EVENT))
NYX 0:85b3fd62ea1a 690
NYX 0:85b3fd62ea1a 691 /**
NYX 0:85b3fd62ea1a 692 * @brief Enable falling edge trigger on the RTC Tamper and Timestamp associated Exti line.
NYX 0:85b3fd62ea1a 693 * @retval None.
NYX 0:85b3fd62ea1a 694 */
NYX 0:85b3fd62ea1a 695 #define __HAL_RTC_TAMPER_TIMESTAMP_EXTI_ENABLE_FALLING_EDGE() (EXTI->FTSR |= RTC_EXTI_LINE_TAMPER_TIMESTAMP_EVENT)
NYX 0:85b3fd62ea1a 696
NYX 0:85b3fd62ea1a 697 /**
NYX 0:85b3fd62ea1a 698 * @brief Disable falling edge trigger on the RTC Tamper and Timestamp associated Exti line.
NYX 0:85b3fd62ea1a 699 * @retval None.
NYX 0:85b3fd62ea1a 700 */
NYX 0:85b3fd62ea1a 701 #define __HAL_RTC_TAMPER_TIMESTAMP_EXTI_DISABLE_FALLING_EDGE() (EXTI->FTSR &= ~(RTC_EXTI_LINE_TAMPER_TIMESTAMP_EVENT))
NYX 0:85b3fd62ea1a 702
NYX 0:85b3fd62ea1a 703 /**
NYX 0:85b3fd62ea1a 704 * @brief Enable rising edge trigger on the RTC Tamper and Timestamp associated Exti line.
NYX 0:85b3fd62ea1a 705 * @retval None.
NYX 0:85b3fd62ea1a 706 */
NYX 0:85b3fd62ea1a 707 #define __HAL_RTC_TAMPER_TIMESTAMP_EXTI_ENABLE_RISING_EDGE() (EXTI->RTSR |= RTC_EXTI_LINE_TAMPER_TIMESTAMP_EVENT)
NYX 0:85b3fd62ea1a 708
NYX 0:85b3fd62ea1a 709 /**
NYX 0:85b3fd62ea1a 710 * @brief Disable rising edge trigger on the RTC Tamper and Timestamp associated Exti line.
NYX 0:85b3fd62ea1a 711 * @retval None.
NYX 0:85b3fd62ea1a 712 */
NYX 0:85b3fd62ea1a 713 #define __HAL_RTC_TAMPER_TIMESTAMP_EXTI_DISABLE_RISING_EDGE() (EXTI->RTSR &= ~(RTC_EXTI_LINE_TAMPER_TIMESTAMP_EVENT))
NYX 0:85b3fd62ea1a 714
NYX 0:85b3fd62ea1a 715 /**
NYX 0:85b3fd62ea1a 716 * @brief Enable rising & falling edge trigger on the RTC Tamper and Timestamp associated Exti line.
NYX 0:85b3fd62ea1a 717 * @retval None.
NYX 0:85b3fd62ea1a 718 */
NYX 0:85b3fd62ea1a 719 #define __HAL_RTC_TAMPER_TIMESTAMP_EXTI_ENABLE_RISING_FALLING_EDGE() do { __HAL_RTC_TAMPER_TIMESTAMP_EXTI_ENABLE_RISING_EDGE();\
NYX 0:85b3fd62ea1a 720 __HAL_RTC_TAMPER_TIMESTAMP_EXTI_ENABLE_FALLING_EDGE(); \
NYX 0:85b3fd62ea1a 721 } while(0U)
NYX 0:85b3fd62ea1a 722
NYX 0:85b3fd62ea1a 723 /**
NYX 0:85b3fd62ea1a 724 * @brief Disable rising & falling edge trigger on the RTC Tamper and Timestamp associated Exti line.
NYX 0:85b3fd62ea1a 725 * This parameter can be:
NYX 0:85b3fd62ea1a 726 * @retval None.
NYX 0:85b3fd62ea1a 727 */
NYX 0:85b3fd62ea1a 728 #define __HAL_RTC_TAMPER_TIMESTAMP_EXTI_DISABLE_RISING_FALLING_EDGE() do { __HAL_RTC_TAMPER_TIMESTAMP_EXTI_DISABLE_RISING_EDGE();\
NYX 0:85b3fd62ea1a 729 __HAL_RTC_TAMPER_TIMESTAMP_EXTI_DISABLE_FALLING_EDGE();\
NYX 0:85b3fd62ea1a 730 } while(0U)
NYX 0:85b3fd62ea1a 731
NYX 0:85b3fd62ea1a 732 /**
NYX 0:85b3fd62ea1a 733 * @brief Check whether the RTC Tamper and Timestamp associated Exti line interrupt flag is set or not.
NYX 0:85b3fd62ea1a 734 * @retval Line Status.
NYX 0:85b3fd62ea1a 735 */
NYX 0:85b3fd62ea1a 736 #define __HAL_RTC_TAMPER_TIMESTAMP_EXTI_GET_FLAG() (EXTI->PR & RTC_EXTI_LINE_TAMPER_TIMESTAMP_EVENT)
NYX 0:85b3fd62ea1a 737
NYX 0:85b3fd62ea1a 738 /**
NYX 0:85b3fd62ea1a 739 * @brief Clear the RTC Tamper and Timestamp associated Exti line flag.
NYX 0:85b3fd62ea1a 740 * @retval None.
NYX 0:85b3fd62ea1a 741 */
NYX 0:85b3fd62ea1a 742 #define __HAL_RTC_TAMPER_TIMESTAMP_EXTI_CLEAR_FLAG() (EXTI->PR = RTC_EXTI_LINE_TAMPER_TIMESTAMP_EVENT)
NYX 0:85b3fd62ea1a 743
NYX 0:85b3fd62ea1a 744 /**
NYX 0:85b3fd62ea1a 745 * @brief Generate a Software interrupt on the RTC Tamper and Timestamp associated Exti line
NYX 0:85b3fd62ea1a 746 * @retval None.
NYX 0:85b3fd62ea1a 747 */
NYX 0:85b3fd62ea1a 748 #define __HAL_RTC_TAMPER_TIMESTAMP_EXTI_GENERATE_SWIT() (EXTI->SWIER |= RTC_EXTI_LINE_TAMPER_TIMESTAMP_EVENT)
NYX 0:85b3fd62ea1a 749 /**
NYX 0:85b3fd62ea1a 750 * @}
NYX 0:85b3fd62ea1a 751 */
NYX 0:85b3fd62ea1a 752
NYX 0:85b3fd62ea1a 753 /* ------------------------------Calibration----------------------------------*/
NYX 0:85b3fd62ea1a 754 /** @defgroup RTCEx_Calibration RTC Calibration
NYX 0:85b3fd62ea1a 755 * @{
NYX 0:85b3fd62ea1a 756 */
NYX 0:85b3fd62ea1a 757
NYX 0:85b3fd62ea1a 758 /**
NYX 0:85b3fd62ea1a 759 * @brief Enable the Coarse calibration process.
NYX 0:85b3fd62ea1a 760 * @param __HANDLE__: specifies the RTC handle.
NYX 0:85b3fd62ea1a 761 * @retval None
NYX 0:85b3fd62ea1a 762 */
NYX 0:85b3fd62ea1a 763 #define __HAL_RTC_COARSE_CALIB_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->CR |= (RTC_CR_DCE))
NYX 0:85b3fd62ea1a 764
NYX 0:85b3fd62ea1a 765 /**
NYX 0:85b3fd62ea1a 766 * @brief Disable the Coarse calibration process.
NYX 0:85b3fd62ea1a 767 * @param __HANDLE__: specifies the RTC handle.
NYX 0:85b3fd62ea1a 768 * @retval None
NYX 0:85b3fd62ea1a 769 */
NYX 0:85b3fd62ea1a 770 #define __HAL_RTC_COARSE_CALIB_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->CR &= ~(RTC_CR_DCE))
NYX 0:85b3fd62ea1a 771
NYX 0:85b3fd62ea1a 772 /**
NYX 0:85b3fd62ea1a 773 * @brief Enable the RTC calibration output.
NYX 0:85b3fd62ea1a 774 * @param __HANDLE__: specifies the RTC handle.
NYX 0:85b3fd62ea1a 775 * @retval None
NYX 0:85b3fd62ea1a 776 */
NYX 0:85b3fd62ea1a 777 #define __HAL_RTC_CALIBRATION_OUTPUT_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->CR |= (RTC_CR_COE))
NYX 0:85b3fd62ea1a 778
NYX 0:85b3fd62ea1a 779 /**
NYX 0:85b3fd62ea1a 780 * @brief Disable the calibration output.
NYX 0:85b3fd62ea1a 781 * @param __HANDLE__: specifies the RTC handle.
NYX 0:85b3fd62ea1a 782 * @retval None
NYX 0:85b3fd62ea1a 783 */
NYX 0:85b3fd62ea1a 784 #define __HAL_RTC_CALIBRATION_OUTPUT_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->CR &= ~(RTC_CR_COE))
NYX 0:85b3fd62ea1a 785
NYX 0:85b3fd62ea1a 786 /**
NYX 0:85b3fd62ea1a 787 * @brief Enable the clock reference detection.
NYX 0:85b3fd62ea1a 788 * @param __HANDLE__: specifies the RTC handle.
NYX 0:85b3fd62ea1a 789 * @retval None
NYX 0:85b3fd62ea1a 790 */
NYX 0:85b3fd62ea1a 791 #define __HAL_RTC_CLOCKREF_DETECTION_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->CR |= (RTC_CR_REFCKON))
NYX 0:85b3fd62ea1a 792
NYX 0:85b3fd62ea1a 793 /**
NYX 0:85b3fd62ea1a 794 * @brief Disable the clock reference detection.
NYX 0:85b3fd62ea1a 795 * @param __HANDLE__: specifies the RTC handle.
NYX 0:85b3fd62ea1a 796 * @retval None
NYX 0:85b3fd62ea1a 797 */
NYX 0:85b3fd62ea1a 798 #define __HAL_RTC_CLOCKREF_DETECTION_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->CR &= ~(RTC_CR_REFCKON))
NYX 0:85b3fd62ea1a 799
NYX 0:85b3fd62ea1a 800 /**
NYX 0:85b3fd62ea1a 801 * @brief Get the selected RTC shift operation's flag status.
NYX 0:85b3fd62ea1a 802 * @param __HANDLE__: specifies the RTC handle.
NYX 0:85b3fd62ea1a 803 * @param __FLAG__: specifies the RTC shift operation Flag is pending or not.
NYX 0:85b3fd62ea1a 804 * This parameter can be:
NYX 0:85b3fd62ea1a 805 * @arg RTC_FLAG_SHPF
NYX 0:85b3fd62ea1a 806 * @retval None
NYX 0:85b3fd62ea1a 807 */
NYX 0:85b3fd62ea1a 808 #define __HAL_RTC_SHIFT_GET_FLAG(__HANDLE__, __FLAG__) (((((__HANDLE__)->Instance->ISR) & (__FLAG__)) != RESET)? SET : RESET)
NYX 0:85b3fd62ea1a 809 /**
NYX 0:85b3fd62ea1a 810 * @}
NYX 0:85b3fd62ea1a 811 */
NYX 0:85b3fd62ea1a 812
NYX 0:85b3fd62ea1a 813 /**
NYX 0:85b3fd62ea1a 814 * @}
NYX 0:85b3fd62ea1a 815 */
NYX 0:85b3fd62ea1a 816
NYX 0:85b3fd62ea1a 817 /* Exported functions --------------------------------------------------------*/
NYX 0:85b3fd62ea1a 818 /** @defgroup RTCEx_Exported_Functions RTCEx Exported Functions
NYX 0:85b3fd62ea1a 819 * @{
NYX 0:85b3fd62ea1a 820 */
NYX 0:85b3fd62ea1a 821
NYX 0:85b3fd62ea1a 822 /** @addtogroup RTCEx_Exported_Functions_Group1
NYX 0:85b3fd62ea1a 823 * @{
NYX 0:85b3fd62ea1a 824 */
NYX 0:85b3fd62ea1a 825 /* RTC TimeStamp and Tamper functions *****************************************/
NYX 0:85b3fd62ea1a 826 HAL_StatusTypeDef HAL_RTCEx_SetTimeStamp(RTC_HandleTypeDef *hrtc, uint32_t TimeStampEdge, uint32_t RTC_TimeStampPin);
NYX 0:85b3fd62ea1a 827 HAL_StatusTypeDef HAL_RTCEx_SetTimeStamp_IT(RTC_HandleTypeDef *hrtc, uint32_t TimeStampEdge, uint32_t RTC_TimeStampPin);
NYX 0:85b3fd62ea1a 828 HAL_StatusTypeDef HAL_RTCEx_DeactivateTimeStamp(RTC_HandleTypeDef *hrtc);
NYX 0:85b3fd62ea1a 829 HAL_StatusTypeDef HAL_RTCEx_GetTimeStamp(RTC_HandleTypeDef *hrtc, RTC_TimeTypeDef *sTimeStamp, RTC_DateTypeDef *sTimeStampDate, uint32_t Format);
NYX 0:85b3fd62ea1a 830
NYX 0:85b3fd62ea1a 831 HAL_StatusTypeDef HAL_RTCEx_SetTamper(RTC_HandleTypeDef *hrtc, RTC_TamperTypeDef* sTamper);
NYX 0:85b3fd62ea1a 832 HAL_StatusTypeDef HAL_RTCEx_SetTamper_IT(RTC_HandleTypeDef *hrtc, RTC_TamperTypeDef* sTamper);
NYX 0:85b3fd62ea1a 833 HAL_StatusTypeDef HAL_RTCEx_DeactivateTamper(RTC_HandleTypeDef *hrtc, uint32_t Tamper);
NYX 0:85b3fd62ea1a 834 void HAL_RTCEx_TamperTimeStampIRQHandler(RTC_HandleTypeDef *hrtc);
NYX 0:85b3fd62ea1a 835
NYX 0:85b3fd62ea1a 836 void HAL_RTCEx_Tamper1EventCallback(RTC_HandleTypeDef *hrtc);
NYX 0:85b3fd62ea1a 837 void HAL_RTCEx_Tamper2EventCallback(RTC_HandleTypeDef *hrtc);
NYX 0:85b3fd62ea1a 838 void HAL_RTCEx_TimeStampEventCallback(RTC_HandleTypeDef *hrtc);
NYX 0:85b3fd62ea1a 839 HAL_StatusTypeDef HAL_RTCEx_PollForTimeStampEvent(RTC_HandleTypeDef *hrtc, uint32_t Timeout);
NYX 0:85b3fd62ea1a 840 HAL_StatusTypeDef HAL_RTCEx_PollForTamper1Event(RTC_HandleTypeDef *hrtc, uint32_t Timeout);
NYX 0:85b3fd62ea1a 841 HAL_StatusTypeDef HAL_RTCEx_PollForTamper2Event(RTC_HandleTypeDef *hrtc, uint32_t Timeout);
NYX 0:85b3fd62ea1a 842 /**
NYX 0:85b3fd62ea1a 843 * @}
NYX 0:85b3fd62ea1a 844 */
NYX 0:85b3fd62ea1a 845
NYX 0:85b3fd62ea1a 846 /** @addtogroup RTCEx_Exported_Functions_Group2
NYX 0:85b3fd62ea1a 847 * @{
NYX 0:85b3fd62ea1a 848 */
NYX 0:85b3fd62ea1a 849 /* RTC Wake-up functions ******************************************************/
NYX 0:85b3fd62ea1a 850 HAL_StatusTypeDef HAL_RTCEx_SetWakeUpTimer(RTC_HandleTypeDef *hrtc, uint32_t WakeUpCounter, uint32_t WakeUpClock);
NYX 0:85b3fd62ea1a 851 HAL_StatusTypeDef HAL_RTCEx_SetWakeUpTimer_IT(RTC_HandleTypeDef *hrtc, uint32_t WakeUpCounter, uint32_t WakeUpClock);
NYX 0:85b3fd62ea1a 852 uint32_t HAL_RTCEx_DeactivateWakeUpTimer(RTC_HandleTypeDef *hrtc);
NYX 0:85b3fd62ea1a 853 uint32_t HAL_RTCEx_GetWakeUpTimer(RTC_HandleTypeDef *hrtc);
NYX 0:85b3fd62ea1a 854 void HAL_RTCEx_WakeUpTimerIRQHandler(RTC_HandleTypeDef *hrtc);
NYX 0:85b3fd62ea1a 855 void HAL_RTCEx_WakeUpTimerEventCallback(RTC_HandleTypeDef *hrtc);
NYX 0:85b3fd62ea1a 856 HAL_StatusTypeDef HAL_RTCEx_PollForWakeUpTimerEvent(RTC_HandleTypeDef *hrtc, uint32_t Timeout);
NYX 0:85b3fd62ea1a 857 /**
NYX 0:85b3fd62ea1a 858 * @}
NYX 0:85b3fd62ea1a 859 */
NYX 0:85b3fd62ea1a 860
NYX 0:85b3fd62ea1a 861 /** @addtogroup RTCEx_Exported_Functions_Group3
NYX 0:85b3fd62ea1a 862 * @{
NYX 0:85b3fd62ea1a 863 */
NYX 0:85b3fd62ea1a 864 /* Extension Control functions ************************************************/
NYX 0:85b3fd62ea1a 865 void HAL_RTCEx_BKUPWrite(RTC_HandleTypeDef *hrtc, uint32_t BackupRegister, uint32_t Data);
NYX 0:85b3fd62ea1a 866 uint32_t HAL_RTCEx_BKUPRead(RTC_HandleTypeDef *hrtc, uint32_t BackupRegister);
NYX 0:85b3fd62ea1a 867
NYX 0:85b3fd62ea1a 868 HAL_StatusTypeDef HAL_RTCEx_SetCoarseCalib(RTC_HandleTypeDef *hrtc, uint32_t CalibSign, uint32_t Value);
NYX 0:85b3fd62ea1a 869 HAL_StatusTypeDef HAL_RTCEx_DeactivateCoarseCalib(RTC_HandleTypeDef *hrtc);
NYX 0:85b3fd62ea1a 870 HAL_StatusTypeDef HAL_RTCEx_SetSmoothCalib(RTC_HandleTypeDef *hrtc, uint32_t SmoothCalibPeriod, uint32_t SmoothCalibPlusPulses, uint32_t SmouthCalibMinusPulsesValue);
NYX 0:85b3fd62ea1a 871 HAL_StatusTypeDef HAL_RTCEx_SetSynchroShift(RTC_HandleTypeDef *hrtc, uint32_t ShiftAdd1S, uint32_t ShiftSubFS);
NYX 0:85b3fd62ea1a 872 HAL_StatusTypeDef HAL_RTCEx_SetCalibrationOutPut(RTC_HandleTypeDef *hrtc, uint32_t CalibOutput);
NYX 0:85b3fd62ea1a 873 HAL_StatusTypeDef HAL_RTCEx_DeactivateCalibrationOutPut(RTC_HandleTypeDef *hrtc);
NYX 0:85b3fd62ea1a 874 HAL_StatusTypeDef HAL_RTCEx_SetRefClock(RTC_HandleTypeDef *hrtc);
NYX 0:85b3fd62ea1a 875 HAL_StatusTypeDef HAL_RTCEx_DeactivateRefClock(RTC_HandleTypeDef *hrtc);
NYX 0:85b3fd62ea1a 876 HAL_StatusTypeDef HAL_RTCEx_EnableBypassShadow(RTC_HandleTypeDef *hrtc);
NYX 0:85b3fd62ea1a 877 HAL_StatusTypeDef HAL_RTCEx_DisableBypassShadow(RTC_HandleTypeDef *hrtc);
NYX 0:85b3fd62ea1a 878 /**
NYX 0:85b3fd62ea1a 879 * @}
NYX 0:85b3fd62ea1a 880 */
NYX 0:85b3fd62ea1a 881
NYX 0:85b3fd62ea1a 882 /** @addtogroup RTCEx_Exported_Functions_Group4
NYX 0:85b3fd62ea1a 883 * @{
NYX 0:85b3fd62ea1a 884 */
NYX 0:85b3fd62ea1a 885 /* Extension RTC features functions *******************************************/
NYX 0:85b3fd62ea1a 886 void HAL_RTCEx_AlarmBEventCallback(RTC_HandleTypeDef *hrtc);
NYX 0:85b3fd62ea1a 887 HAL_StatusTypeDef HAL_RTCEx_PollForAlarmBEvent(RTC_HandleTypeDef *hrtc, uint32_t Timeout);
NYX 0:85b3fd62ea1a 888 /**
NYX 0:85b3fd62ea1a 889 * @}
NYX 0:85b3fd62ea1a 890 */
NYX 0:85b3fd62ea1a 891
NYX 0:85b3fd62ea1a 892 /**
NYX 0:85b3fd62ea1a 893 * @}
NYX 0:85b3fd62ea1a 894 */
NYX 0:85b3fd62ea1a 895
NYX 0:85b3fd62ea1a 896 /* Private types -------------------------------------------------------------*/
NYX 0:85b3fd62ea1a 897 /* Private variables ---------------------------------------------------------*/
NYX 0:85b3fd62ea1a 898 /* Private constants ---------------------------------------------------------*/
NYX 0:85b3fd62ea1a 899 /** @defgroup RTCEx_Private_Constants RTCEx Private Constants
NYX 0:85b3fd62ea1a 900 * @{
NYX 0:85b3fd62ea1a 901 */
NYX 0:85b3fd62ea1a 902 #define RTC_EXTI_LINE_TAMPER_TIMESTAMP_EVENT ((uint32_t)EXTI_IMR_MR21) /*!< External interrupt line 21 Connected to the RTC Tamper and Time Stamp events */
NYX 0:85b3fd62ea1a 903 #define RTC_EXTI_LINE_WAKEUPTIMER_EVENT ((uint32_t)EXTI_IMR_MR22) /*!< External interrupt line 22 Connected to the RTC Wake-up event */
NYX 0:85b3fd62ea1a 904 /**
NYX 0:85b3fd62ea1a 905 * @}
NYX 0:85b3fd62ea1a 906 */
NYX 0:85b3fd62ea1a 907
NYX 0:85b3fd62ea1a 908 /* Private macros ------------------------------------------------------------*/
NYX 0:85b3fd62ea1a 909 /** @defgroup RTCEx_Private_Macros RTCEx Private Macros
NYX 0:85b3fd62ea1a 910 * @{
NYX 0:85b3fd62ea1a 911 */
NYX 0:85b3fd62ea1a 912
NYX 0:85b3fd62ea1a 913 /** @defgroup RTCEx_IS_RTC_Definitions Private macros to check input parameters
NYX 0:85b3fd62ea1a 914 * @{
NYX 0:85b3fd62ea1a 915 */
NYX 0:85b3fd62ea1a 916 #define IS_RTC_BKP(BKP) (((BKP) == RTC_BKP_DR0) || \
NYX 0:85b3fd62ea1a 917 ((BKP) == RTC_BKP_DR1) || \
NYX 0:85b3fd62ea1a 918 ((BKP) == RTC_BKP_DR2) || \
NYX 0:85b3fd62ea1a 919 ((BKP) == RTC_BKP_DR3) || \
NYX 0:85b3fd62ea1a 920 ((BKP) == RTC_BKP_DR4) || \
NYX 0:85b3fd62ea1a 921 ((BKP) == RTC_BKP_DR5) || \
NYX 0:85b3fd62ea1a 922 ((BKP) == RTC_BKP_DR6) || \
NYX 0:85b3fd62ea1a 923 ((BKP) == RTC_BKP_DR7) || \
NYX 0:85b3fd62ea1a 924 ((BKP) == RTC_BKP_DR8) || \
NYX 0:85b3fd62ea1a 925 ((BKP) == RTC_BKP_DR9) || \
NYX 0:85b3fd62ea1a 926 ((BKP) == RTC_BKP_DR10) || \
NYX 0:85b3fd62ea1a 927 ((BKP) == RTC_BKP_DR11) || \
NYX 0:85b3fd62ea1a 928 ((BKP) == RTC_BKP_DR12) || \
NYX 0:85b3fd62ea1a 929 ((BKP) == RTC_BKP_DR13) || \
NYX 0:85b3fd62ea1a 930 ((BKP) == RTC_BKP_DR14) || \
NYX 0:85b3fd62ea1a 931 ((BKP) == RTC_BKP_DR15) || \
NYX 0:85b3fd62ea1a 932 ((BKP) == RTC_BKP_DR16) || \
NYX 0:85b3fd62ea1a 933 ((BKP) == RTC_BKP_DR17) || \
NYX 0:85b3fd62ea1a 934 ((BKP) == RTC_BKP_DR18) || \
NYX 0:85b3fd62ea1a 935 ((BKP) == RTC_BKP_DR19))
NYX 0:85b3fd62ea1a 936 #define IS_TIMESTAMP_EDGE(EDGE) (((EDGE) == RTC_TIMESTAMPEDGE_RISING) || \
NYX 0:85b3fd62ea1a 937 ((EDGE) == RTC_TIMESTAMPEDGE_FALLING))
NYX 0:85b3fd62ea1a 938
NYX 0:85b3fd62ea1a 939 #if defined(STM32F412Zx) || defined(STM32F412Vx) || defined(STM32F412Rx) || defined(STM32F412Cx) || defined(STM32F413xx) || defined(STM32F423xx)
NYX 0:85b3fd62ea1a 940 #define IS_RTC_TAMPER(TAMPER) ((((TAMPER) & ((uint32_t)!(RTC_TAFCR_TAMP1E ))) == 0x00U) && ((TAMPER) != (uint32_t)RESET))
NYX 0:85b3fd62ea1a 941 #else
NYX 0:85b3fd62ea1a 942 #define IS_RTC_TAMPER(TAMPER) ((((TAMPER) & ((uint32_t)!(RTC_TAFCR_TAMP1E | RTC_TAFCR_TAMP2E))) == 0x00U) && ((TAMPER) != (uint32_t)RESET))
NYX 0:85b3fd62ea1a 943 #endif
NYX 0:85b3fd62ea1a 944
NYX 0:85b3fd62ea1a 945 #if defined(STM32F412Zx) || defined(STM32F412Vx) || defined(STM32F412Rx) || defined(STM32F412Cx) || defined(STM32F413xx) || defined(STM32F423xx)
NYX 0:85b3fd62ea1a 946 #define IS_RTC_TAMPER_PIN(PIN) ((PIN) == RTC_TAMPERPIN_DEFAULT)
NYX 0:85b3fd62ea1a 947 #else
NYX 0:85b3fd62ea1a 948 #define IS_RTC_TAMPER_PIN(PIN) (((PIN) == RTC_TAMPERPIN_DEFAULT) || \
NYX 0:85b3fd62ea1a 949 ((PIN) == RTC_TAMPERPIN_POS1))
NYX 0:85b3fd62ea1a 950 #endif
NYX 0:85b3fd62ea1a 951
NYX 0:85b3fd62ea1a 952 #if defined(STM32F412Zx) || defined(STM32F412Vx) || defined(STM32F412Rx) || defined(STM32F412Cx) || defined(STM32F413xx) || defined(STM32F423xx)
NYX 0:85b3fd62ea1a 953 #define IS_RTC_TIMESTAMP_PIN(PIN) ((PIN) == RTC_TIMESTAMPPIN_DEFAULT)
NYX 0:85b3fd62ea1a 954 #else
NYX 0:85b3fd62ea1a 955 #define IS_RTC_TIMESTAMP_PIN(PIN) (((PIN) == RTC_TIMESTAMPPIN_DEFAULT) || \
NYX 0:85b3fd62ea1a 956 ((PIN) == RTC_TIMESTAMPPIN_POS1))
NYX 0:85b3fd62ea1a 957 #endif
NYX 0:85b3fd62ea1a 958 #define IS_RTC_TAMPER_TRIGGER(TRIGGER) (((TRIGGER) == RTC_TAMPERTRIGGER_RISINGEDGE) || \
NYX 0:85b3fd62ea1a 959 ((TRIGGER) == RTC_TAMPERTRIGGER_FALLINGEDGE) || \
NYX 0:85b3fd62ea1a 960 ((TRIGGER) == RTC_TAMPERTRIGGER_LOWLEVEL) || \
NYX 0:85b3fd62ea1a 961 ((TRIGGER) == RTC_TAMPERTRIGGER_HIGHLEVEL))
NYX 0:85b3fd62ea1a 962 #define IS_RTC_TAMPER_FILTER(FILTER) (((FILTER) == RTC_TAMPERFILTER_DISABLE) || \
NYX 0:85b3fd62ea1a 963 ((FILTER) == RTC_TAMPERFILTER_2SAMPLE) || \
NYX 0:85b3fd62ea1a 964 ((FILTER) == RTC_TAMPERFILTER_4SAMPLE) || \
NYX 0:85b3fd62ea1a 965 ((FILTER) == RTC_TAMPERFILTER_8SAMPLE))
NYX 0:85b3fd62ea1a 966 #define IS_RTC_TAMPER_SAMPLING_FREQ(FREQ) (((FREQ) == RTC_TAMPERSAMPLINGFREQ_RTCCLK_DIV32768)|| \
NYX 0:85b3fd62ea1a 967 ((FREQ) == RTC_TAMPERSAMPLINGFREQ_RTCCLK_DIV16384)|| \
NYX 0:85b3fd62ea1a 968 ((FREQ) == RTC_TAMPERSAMPLINGFREQ_RTCCLK_DIV8192) || \
NYX 0:85b3fd62ea1a 969 ((FREQ) == RTC_TAMPERSAMPLINGFREQ_RTCCLK_DIV4096) || \
NYX 0:85b3fd62ea1a 970 ((FREQ) == RTC_TAMPERSAMPLINGFREQ_RTCCLK_DIV2048) || \
NYX 0:85b3fd62ea1a 971 ((FREQ) == RTC_TAMPERSAMPLINGFREQ_RTCCLK_DIV1024) || \
NYX 0:85b3fd62ea1a 972 ((FREQ) == RTC_TAMPERSAMPLINGFREQ_RTCCLK_DIV512) || \
NYX 0:85b3fd62ea1a 973 ((FREQ) == RTC_TAMPERSAMPLINGFREQ_RTCCLK_DIV256))
NYX 0:85b3fd62ea1a 974 #define IS_RTC_TAMPER_PRECHARGE_DURATION(DURATION) (((DURATION) == RTC_TAMPERPRECHARGEDURATION_1RTCCLK) || \
NYX 0:85b3fd62ea1a 975 ((DURATION) == RTC_TAMPERPRECHARGEDURATION_2RTCCLK) || \
NYX 0:85b3fd62ea1a 976 ((DURATION) == RTC_TAMPERPRECHARGEDURATION_4RTCCLK) || \
NYX 0:85b3fd62ea1a 977 ((DURATION) == RTC_TAMPERPRECHARGEDURATION_8RTCCLK))
NYX 0:85b3fd62ea1a 978 #define IS_RTC_TAMPER_TIMESTAMPONTAMPER_DETECTION(DETECTION) (((DETECTION) == RTC_TIMESTAMPONTAMPERDETECTION_ENABLE) || \
NYX 0:85b3fd62ea1a 979 ((DETECTION) == RTC_TIMESTAMPONTAMPERDETECTION_DISABLE))
NYX 0:85b3fd62ea1a 980 #define IS_RTC_TAMPER_PULLUP_STATE(STATE) (((STATE) == RTC_TAMPER_PULLUP_ENABLE) || \
NYX 0:85b3fd62ea1a 981 ((STATE) == RTC_TAMPER_PULLUP_DISABLE))
NYX 0:85b3fd62ea1a 982 #define IS_RTC_WAKEUP_CLOCK(CLOCK) (((CLOCK) == RTC_WAKEUPCLOCK_RTCCLK_DIV16) || \
NYX 0:85b3fd62ea1a 983 ((CLOCK) == RTC_WAKEUPCLOCK_RTCCLK_DIV8) || \
NYX 0:85b3fd62ea1a 984 ((CLOCK) == RTC_WAKEUPCLOCK_RTCCLK_DIV4) || \
NYX 0:85b3fd62ea1a 985 ((CLOCK) == RTC_WAKEUPCLOCK_RTCCLK_DIV2) || \
NYX 0:85b3fd62ea1a 986 ((CLOCK) == RTC_WAKEUPCLOCK_CK_SPRE_16BITS) || \
NYX 0:85b3fd62ea1a 987 ((CLOCK) == RTC_WAKEUPCLOCK_CK_SPRE_17BITS))
NYX 0:85b3fd62ea1a 988
NYX 0:85b3fd62ea1a 989 #define IS_RTC_WAKEUP_COUNTER(COUNTER) ((COUNTER) <= 0xFFFFU)
NYX 0:85b3fd62ea1a 990 #define IS_RTC_CALIB_SIGN(SIGN) (((SIGN) == RTC_CALIBSIGN_POSITIVE) || \
NYX 0:85b3fd62ea1a 991 ((SIGN) == RTC_CALIBSIGN_NEGATIVE))
NYX 0:85b3fd62ea1a 992
NYX 0:85b3fd62ea1a 993 #define IS_RTC_CALIB_VALUE(VALUE) ((VALUE) < 0x20U)
NYX 0:85b3fd62ea1a 994
NYX 0:85b3fd62ea1a 995 #define IS_RTC_SMOOTH_CALIB_PERIOD(PERIOD) (((PERIOD) == RTC_SMOOTHCALIB_PERIOD_32SEC) || \
NYX 0:85b3fd62ea1a 996 ((PERIOD) == RTC_SMOOTHCALIB_PERIOD_16SEC) || \
NYX 0:85b3fd62ea1a 997 ((PERIOD) == RTC_SMOOTHCALIB_PERIOD_8SEC))
NYX 0:85b3fd62ea1a 998 #define IS_RTC_SMOOTH_CALIB_PLUS(PLUS) (((PLUS) == RTC_SMOOTHCALIB_PLUSPULSES_SET) || \
NYX 0:85b3fd62ea1a 999 ((PLUS) == RTC_SMOOTHCALIB_PLUSPULSES_RESET))
NYX 0:85b3fd62ea1a 1000
NYX 0:85b3fd62ea1a 1001 #define IS_RTC_SMOOTH_CALIB_MINUS(VALUE) ((VALUE) <= 0x000001FFU)
NYX 0:85b3fd62ea1a 1002 #define IS_RTC_SHIFT_ADD1S(SEL) (((SEL) == RTC_SHIFTADD1S_RESET) || \
NYX 0:85b3fd62ea1a 1003 ((SEL) == RTC_SHIFTADD1S_SET))
NYX 0:85b3fd62ea1a 1004 #define IS_RTC_SHIFT_SUBFS(FS) ((FS) <= 0x00007FFFU)
NYX 0:85b3fd62ea1a 1005 #define IS_RTC_CALIB_OUTPUT(OUTPUT) (((OUTPUT) == RTC_CALIBOUTPUT_512HZ) || \
NYX 0:85b3fd62ea1a 1006 ((OUTPUT) == RTC_CALIBOUTPUT_1HZ))
NYX 0:85b3fd62ea1a 1007 /**
NYX 0:85b3fd62ea1a 1008 * @}
NYX 0:85b3fd62ea1a 1009 */
NYX 0:85b3fd62ea1a 1010
NYX 0:85b3fd62ea1a 1011 /**
NYX 0:85b3fd62ea1a 1012 * @}
NYX 0:85b3fd62ea1a 1013 */
NYX 0:85b3fd62ea1a 1014
NYX 0:85b3fd62ea1a 1015 /**
NYX 0:85b3fd62ea1a 1016 * @}
NYX 0:85b3fd62ea1a 1017 */
NYX 0:85b3fd62ea1a 1018
NYX 0:85b3fd62ea1a 1019 /**
NYX 0:85b3fd62ea1a 1020 * @}
NYX 0:85b3fd62ea1a 1021 */
NYX 0:85b3fd62ea1a 1022
NYX 0:85b3fd62ea1a 1023 #ifdef __cplusplus
NYX 0:85b3fd62ea1a 1024 }
NYX 0:85b3fd62ea1a 1025 #endif
NYX 0:85b3fd62ea1a 1026
NYX 0:85b3fd62ea1a 1027 #endif /* __STM32F4xx_HAL_RTC_EX_H */
NYX 0:85b3fd62ea1a 1028
NYX 0:85b3fd62ea1a 1029 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/