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