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