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