The official Mbed 2 C/C++ SDK provides the software platform and libraries to build your applications.

Dependents:   hello SerialTestv11 SerialTestv12 Sierpinski ... more

mbed 2

This is the mbed 2 library. If you'd like to learn about Mbed OS please see the mbed-os docs.

Committer:
<>
Date:
Tue Mar 14 16:20:51 2017 +0000
Revision:
138:093f2bd7b9eb
Parent:
135:176b8275d35d
Child:
139:856d2700e60b
Release 138 of the mbed library

Ports for Upcoming Targets


Fixes and Changes

3716: fix for issue #3715: correction in startup files for ARM and IAR, alignment of system_stm32f429xx.c files https://github.com/ARMmbed/mbed-os/pull/3716
3741: STM32 remove warning in hal_tick_32b.c file https://github.com/ARMmbed/mbed-os/pull/3741
3780: STM32L4 : Fix GPIO G port compatibility https://github.com/ARMmbed/mbed-os/pull/3780
3831: NCS36510: SPISLAVE enabled (Conflict resolved) https://github.com/ARMmbed/mbed-os/pull/3831
3836: Allow to redefine nRF's PSTORAGE_NUM_OF_PAGES outside of the mbed-os https://github.com/ARMmbed/mbed-os/pull/3836
3840: STM32: gpio SPEED - always set High Speed by default https://github.com/ARMmbed/mbed-os/pull/3840
3844: STM32 GPIO: Typo correction. Update comment (GPIO_IP_WITHOUT_BRR) https://github.com/ARMmbed/mbed-os/pull/3844
3850: STM32: change spi error to debug warning https://github.com/ARMmbed/mbed-os/pull/3850
3860: Define GPIO_IP_WITHOUT_BRR for xDot platform https://github.com/ARMmbed/mbed-os/pull/3860
3880: DISCO_F469NI: allow the use of CAN2 instance when CAN1 is not activated https://github.com/ARMmbed/mbed-os/pull/3880
3795: Fix pwm period calc https://github.com/ARMmbed/mbed-os/pull/3795
3828: STM32 CAN API: correct format and type https://github.com/ARMmbed/mbed-os/pull/3828
3842: TARGET_NRF: corrected spi_init() to properly handle re-initialization https://github.com/ARMmbed/mbed-os/pull/3842
3843: STM32L476xG: set APB2 clock to 80MHz (instead of 40MHz) https://github.com/ARMmbed/mbed-os/pull/3843
3879: NUCLEO_F446ZE: Add missing AnalogIn pins on PF_3, PF_5 and PF_10. https://github.com/ARMmbed/mbed-os/pull/3879
3902: Fix heap and stack size for NUCLEO_F746ZG https://github.com/ARMmbed/mbed-os/pull/3902
3829: can_write(): return error code when no tx mailboxes are available https://github.com/ARMmbed/mbed-os/pull/3829

Who changed what in which revision?

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