mbed library sources
Dependents: frdm_kl05z_gpio_test
Fork of mbed-src by
targets/cmsis/TARGET_STM/TARGET_NUCLEO_F072RB/stm32f0xx_hal_rtc_ex.h@218:44081b78fdc2, 2014-05-30 (annotated)
- Committer:
- mbed_official
- Date:
- Fri May 30 15:30:09 2014 +0100
- Revision:
- 218:44081b78fdc2
- Parent:
- 205:c41fc65bcfb4
Synchronized with git revision d854859072d318241476ccc5f335965444d4c1d8
Full URL: https://github.com/mbedmicro/mbed/commit/d854859072d318241476ccc5f335965444d4c1d8/
[NUCLEO_F072RB] Update CubeF0 HAL driver
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
mbed_official | 205:c41fc65bcfb4 | 1 | /** |
mbed_official | 205:c41fc65bcfb4 | 2 | ****************************************************************************** |
mbed_official | 205:c41fc65bcfb4 | 3 | * @file stm32f0xx_hal_rtc_ex.h |
mbed_official | 205:c41fc65bcfb4 | 4 | * @author MCD Application Team |
mbed_official | 205:c41fc65bcfb4 | 5 | * @version V1.0.0 |
mbed_official | 218:44081b78fdc2 | 6 | * @date 28-May-2014 |
mbed_official | 205:c41fc65bcfb4 | 7 | * @brief Header file of RTC HAL Extension module. |
mbed_official | 205:c41fc65bcfb4 | 8 | ****************************************************************************** |
mbed_official | 205:c41fc65bcfb4 | 9 | * @attention |
mbed_official | 205:c41fc65bcfb4 | 10 | * |
mbed_official | 205:c41fc65bcfb4 | 11 | * <h2><center>© COPYRIGHT(c) 2014 STMicroelectronics</center></h2> |
mbed_official | 205:c41fc65bcfb4 | 12 | * |
mbed_official | 205:c41fc65bcfb4 | 13 | * Redistribution and use in source and binary forms, with or without modification, |
mbed_official | 205:c41fc65bcfb4 | 14 | * are permitted provided that the following conditions are met: |
mbed_official | 205:c41fc65bcfb4 | 15 | * 1. Redistributions of source code must retain the above copyright notice, |
mbed_official | 205:c41fc65bcfb4 | 16 | * this list of conditions and the following disclaimer. |
mbed_official | 205:c41fc65bcfb4 | 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, |
mbed_official | 205:c41fc65bcfb4 | 18 | * this list of conditions and the following disclaimer in the documentation |
mbed_official | 205:c41fc65bcfb4 | 19 | * and/or other materials provided with the distribution. |
mbed_official | 205:c41fc65bcfb4 | 20 | * 3. Neither the name of STMicroelectronics nor the names of its contributors |
mbed_official | 205:c41fc65bcfb4 | 21 | * may be used to endorse or promote products derived from this software |
mbed_official | 205:c41fc65bcfb4 | 22 | * without specific prior written permission. |
mbed_official | 205:c41fc65bcfb4 | 23 | * |
mbed_official | 205:c41fc65bcfb4 | 24 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
mbed_official | 205:c41fc65bcfb4 | 25 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
mbed_official | 205:c41fc65bcfb4 | 26 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
mbed_official | 205:c41fc65bcfb4 | 27 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE |
mbed_official | 205:c41fc65bcfb4 | 28 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
mbed_official | 205:c41fc65bcfb4 | 29 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
mbed_official | 205:c41fc65bcfb4 | 30 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
mbed_official | 205:c41fc65bcfb4 | 31 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
mbed_official | 205:c41fc65bcfb4 | 32 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
mbed_official | 205:c41fc65bcfb4 | 33 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
mbed_official | 205:c41fc65bcfb4 | 34 | * |
mbed_official | 205:c41fc65bcfb4 | 35 | ****************************************************************************** |
mbed_official | 205:c41fc65bcfb4 | 36 | */ |
mbed_official | 205:c41fc65bcfb4 | 37 | |
mbed_official | 205:c41fc65bcfb4 | 38 | /* Define to prevent recursive inclusion -------------------------------------*/ |
mbed_official | 205:c41fc65bcfb4 | 39 | #ifndef __STM32F0xx_HAL_RTC_EX_H |
mbed_official | 205:c41fc65bcfb4 | 40 | #define __STM32F0xx_HAL_RTC_EX_H |
mbed_official | 205:c41fc65bcfb4 | 41 | |
mbed_official | 205:c41fc65bcfb4 | 42 | #ifdef __cplusplus |
mbed_official | 205:c41fc65bcfb4 | 43 | extern "C" { |
mbed_official | 205:c41fc65bcfb4 | 44 | #endif |
mbed_official | 205:c41fc65bcfb4 | 45 | |
mbed_official | 205:c41fc65bcfb4 | 46 | /* Includes ------------------------------------------------------------------*/ |
mbed_official | 205:c41fc65bcfb4 | 47 | #include "stm32f0xx_hal_def.h" |
mbed_official | 205:c41fc65bcfb4 | 48 | |
mbed_official | 205:c41fc65bcfb4 | 49 | /** @addtogroup STM32F0xx_HAL_Driver |
mbed_official | 205:c41fc65bcfb4 | 50 | * @{ |
mbed_official | 205:c41fc65bcfb4 | 51 | */ |
mbed_official | 205:c41fc65bcfb4 | 52 | |
mbed_official | 205:c41fc65bcfb4 | 53 | /** @addtogroup RTCEx |
mbed_official | 205:c41fc65bcfb4 | 54 | * @{ |
mbed_official | 205:c41fc65bcfb4 | 55 | */ |
mbed_official | 205:c41fc65bcfb4 | 56 | |
mbed_official | 205:c41fc65bcfb4 | 57 | /* Exported types ------------------------------------------------------------*/ |
mbed_official | 205:c41fc65bcfb4 | 58 | |
mbed_official | 205:c41fc65bcfb4 | 59 | /** |
mbed_official | 205:c41fc65bcfb4 | 60 | * @brief RTC Tamper structure definition |
mbed_official | 205:c41fc65bcfb4 | 61 | */ |
mbed_official | 205:c41fc65bcfb4 | 62 | typedef struct |
mbed_official | 205:c41fc65bcfb4 | 63 | { |
mbed_official | 205:c41fc65bcfb4 | 64 | uint32_t Tamper; /*!< Specifies the Tamper Pin. |
mbed_official | 205:c41fc65bcfb4 | 65 | This parameter can be a value of @ref RTCEx_Tamper_Pins_Definitions */ |
mbed_official | 205:c41fc65bcfb4 | 66 | |
mbed_official | 205:c41fc65bcfb4 | 67 | uint32_t Trigger; /*!< Specifies the Tamper Trigger. |
mbed_official | 205:c41fc65bcfb4 | 68 | This parameter can be a value of @ref RTCEx_Tamper_Trigger_Definitions */ |
mbed_official | 205:c41fc65bcfb4 | 69 | |
mbed_official | 205:c41fc65bcfb4 | 70 | uint32_t Filter; /*!< Specifies the RTC Filter Tamper. |
mbed_official | 205:c41fc65bcfb4 | 71 | This parameter can be a value of @ref RTCEx_Tamper_Filter_Definitions */ |
mbed_official | 205:c41fc65bcfb4 | 72 | |
mbed_official | 205:c41fc65bcfb4 | 73 | uint32_t SamplingFrequency; /*!< Specifies the sampling frequency. |
mbed_official | 205:c41fc65bcfb4 | 74 | This parameter can be a value of @ref RTCEx_Tamper_Sampling_Frequencies_Definitions */ |
mbed_official | 205:c41fc65bcfb4 | 75 | |
mbed_official | 205:c41fc65bcfb4 | 76 | uint32_t PrechargeDuration; /*!< Specifies the Precharge Duration . |
mbed_official | 205:c41fc65bcfb4 | 77 | This parameter can be a value of @ref RTCEx_Tamper_Pin_Precharge_Duration_Definitions */ |
mbed_official | 205:c41fc65bcfb4 | 78 | |
mbed_official | 205:c41fc65bcfb4 | 79 | uint32_t TamperPullUp; /*!< Specifies the Tamper PullUp . |
mbed_official | 205:c41fc65bcfb4 | 80 | This parameter can be a value of @ref RTCEx_Tamper_Pull_UP_Definitions */ |
mbed_official | 205:c41fc65bcfb4 | 81 | |
mbed_official | 205:c41fc65bcfb4 | 82 | uint32_t TimeStampOnTamperDetection; /*!< Specifies the TimeStampOnTamperDetection. |
mbed_official | 205:c41fc65bcfb4 | 83 | This parameter can be a value of @ref RTCEx_Tamper_TimeStampOnTamperDetection_Definitions */ |
mbed_official | 205:c41fc65bcfb4 | 84 | }RTC_TamperTypeDef; |
mbed_official | 205:c41fc65bcfb4 | 85 | |
mbed_official | 205:c41fc65bcfb4 | 86 | /* Exported constants --------------------------------------------------------*/ |
mbed_official | 205:c41fc65bcfb4 | 87 | /** @defgroup RTCEx_Exported_Constants |
mbed_official | 205:c41fc65bcfb4 | 88 | * @{ |
mbed_official | 205:c41fc65bcfb4 | 89 | */ |
mbed_official | 205:c41fc65bcfb4 | 90 | |
mbed_official | 205:c41fc65bcfb4 | 91 | /** @defgroup RTCEx_Output_selection_Definitions |
mbed_official | 205:c41fc65bcfb4 | 92 | * @{ |
mbed_official | 205:c41fc65bcfb4 | 93 | */ |
mbed_official | 205:c41fc65bcfb4 | 94 | #define RTC_OUTPUT_DISABLE ((uint32_t)0x00000000) |
mbed_official | 205:c41fc65bcfb4 | 95 | #define RTC_OUTPUT_ALARMA ((uint32_t)0x00200000) |
mbed_official | 205:c41fc65bcfb4 | 96 | #if defined(STM32F071xB) || defined(STM32F072xB) || defined(STM32F078xx) |
mbed_official | 205:c41fc65bcfb4 | 97 | #define RTC_OUTPUT_WAKEUP ((uint32_t)0x00600000) |
mbed_official | 205:c41fc65bcfb4 | 98 | #endif |
mbed_official | 205:c41fc65bcfb4 | 99 | |
mbed_official | 205:c41fc65bcfb4 | 100 | #if defined(STM32F071xB) || defined(STM32F072xB) || defined(STM32F078xx) |
mbed_official | 205:c41fc65bcfb4 | 101 | #define IS_RTC_OUTPUT(OUTPUT) (((OUTPUT) == RTC_OUTPUT_DISABLE) || \ |
mbed_official | 205:c41fc65bcfb4 | 102 | ((OUTPUT) == RTC_OUTPUT_ALARMA) || \ |
mbed_official | 205:c41fc65bcfb4 | 103 | ((OUTPUT) == RTC_OUTPUT_WAKEUP)) |
mbed_official | 205:c41fc65bcfb4 | 104 | #else |
mbed_official | 205:c41fc65bcfb4 | 105 | #define IS_RTC_OUTPUT(OUTPUT) (((OUTPUT) == RTC_OUTPUT_DISABLE) || \ |
mbed_official | 205:c41fc65bcfb4 | 106 | ((OUTPUT) == RTC_OUTPUT_ALARMA)) |
mbed_official | 205:c41fc65bcfb4 | 107 | #endif |
mbed_official | 205:c41fc65bcfb4 | 108 | /** |
mbed_official | 205:c41fc65bcfb4 | 109 | * @} |
mbed_official | 205:c41fc65bcfb4 | 110 | */ |
mbed_official | 205:c41fc65bcfb4 | 111 | |
mbed_official | 205:c41fc65bcfb4 | 112 | #if !defined(STM32F030x6) && !defined(STM32F030x8) |
mbed_official | 205:c41fc65bcfb4 | 113 | /** @defgroup RTCEx_Backup_Registers_Definitions |
mbed_official | 205:c41fc65bcfb4 | 114 | * @{ |
mbed_official | 205:c41fc65bcfb4 | 115 | */ |
mbed_official | 205:c41fc65bcfb4 | 116 | #define RTC_BKP_DR0 ((uint32_t)0x00000000) |
mbed_official | 205:c41fc65bcfb4 | 117 | #define RTC_BKP_DR1 ((uint32_t)0x00000001) |
mbed_official | 205:c41fc65bcfb4 | 118 | #define RTC_BKP_DR2 ((uint32_t)0x00000002) |
mbed_official | 205:c41fc65bcfb4 | 119 | #define RTC_BKP_DR3 ((uint32_t)0x00000003) |
mbed_official | 205:c41fc65bcfb4 | 120 | #define RTC_BKP_DR4 ((uint32_t)0x00000004) |
mbed_official | 205:c41fc65bcfb4 | 121 | |
mbed_official | 205:c41fc65bcfb4 | 122 | #define IS_RTC_BKP(BKP) ((BKP) < (uint32_t) RTC_BKP_NUMBER) |
mbed_official | 205:c41fc65bcfb4 | 123 | /** |
mbed_official | 205:c41fc65bcfb4 | 124 | * @} |
mbed_official | 205:c41fc65bcfb4 | 125 | */ |
mbed_official | 205:c41fc65bcfb4 | 126 | #endif /* !defined(STM32F030x6) && !defined(STM32F030x8) */ |
mbed_official | 205:c41fc65bcfb4 | 127 | |
mbed_official | 205:c41fc65bcfb4 | 128 | /** @defgroup RTCEx_Time_Stamp_Edges_definitions |
mbed_official | 205:c41fc65bcfb4 | 129 | * @{ |
mbed_official | 205:c41fc65bcfb4 | 130 | */ |
mbed_official | 205:c41fc65bcfb4 | 131 | #define RTC_TIMESTAMPEDGE_RISING ((uint32_t)0x00000000) |
mbed_official | 205:c41fc65bcfb4 | 132 | #define RTC_TIMESTAMPEDGE_FALLING ((uint32_t)0x00000008) |
mbed_official | 205:c41fc65bcfb4 | 133 | |
mbed_official | 205:c41fc65bcfb4 | 134 | #define IS_TIMESTAMP_EDGE(EDGE) (((EDGE) == RTC_TIMESTAMPEDGE_RISING) || \ |
mbed_official | 205:c41fc65bcfb4 | 135 | ((EDGE) == RTC_TIMESTAMPEDGE_FALLING)) |
mbed_official | 205:c41fc65bcfb4 | 136 | /** |
mbed_official | 205:c41fc65bcfb4 | 137 | * @} |
mbed_official | 205:c41fc65bcfb4 | 138 | */ |
mbed_official | 205:c41fc65bcfb4 | 139 | |
mbed_official | 205:c41fc65bcfb4 | 140 | /** @defgroup RTCEx_Tamper_Pins_Definitions |
mbed_official | 205:c41fc65bcfb4 | 141 | * @{ |
mbed_official | 205:c41fc65bcfb4 | 142 | */ |
mbed_official | 205:c41fc65bcfb4 | 143 | #define RTC_TAMPER_1 RTC_TAFCR_TAMP1E |
mbed_official | 205:c41fc65bcfb4 | 144 | #define RTC_TAMPER_2 RTC_TAFCR_TAMP2E |
mbed_official | 205:c41fc65bcfb4 | 145 | #if defined(STM32F071xB) || defined(STM32F072xB) || defined(STM32F078xx) |
mbed_official | 205:c41fc65bcfb4 | 146 | #define RTC_TAMPER_3 RTC_TAFCR_TAMP3E |
mbed_official | 205:c41fc65bcfb4 | 147 | #endif |
mbed_official | 205:c41fc65bcfb4 | 148 | |
mbed_official | 205:c41fc65bcfb4 | 149 | #if defined(STM32F071xB) || defined(STM32F072xB) || defined(STM32F078xx) |
mbed_official | 205:c41fc65bcfb4 | 150 | #define IS_TAMPER(TAMPER) (((TAMPER) == RTC_TAMPER_1) || \ |
mbed_official | 205:c41fc65bcfb4 | 151 | ((TAMPER) == RTC_TAMPER_2) || \ |
mbed_official | 205:c41fc65bcfb4 | 152 | ((TAMPER) == RTC_TAMPER_3)) |
mbed_official | 205:c41fc65bcfb4 | 153 | #else |
mbed_official | 205:c41fc65bcfb4 | 154 | #define IS_TAMPER(TAMPER) (((TAMPER) == RTC_TAMPER_1) || \ |
mbed_official | 205:c41fc65bcfb4 | 155 | ((TAMPER) == RTC_TAMPER_2)) |
mbed_official | 205:c41fc65bcfb4 | 156 | #endif |
mbed_official | 205:c41fc65bcfb4 | 157 | /** |
mbed_official | 205:c41fc65bcfb4 | 158 | * @} |
mbed_official | 205:c41fc65bcfb4 | 159 | */ |
mbed_official | 205:c41fc65bcfb4 | 160 | |
mbed_official | 205:c41fc65bcfb4 | 161 | /** @defgroup RTCEx_TimeStamp_Pin_Selection |
mbed_official | 205:c41fc65bcfb4 | 162 | * @{ |
mbed_official | 205:c41fc65bcfb4 | 163 | */ |
mbed_official | 205:c41fc65bcfb4 | 164 | #define RTC_TIMESTAMPPIN_PC13 ((uint32_t)0x00000000) |
mbed_official | 205:c41fc65bcfb4 | 165 | |
mbed_official | 205:c41fc65bcfb4 | 166 | #define IS_RTC_TIMESTAMP_PIN(PIN) (((PIN) == RTC_TIMESTAMPPIN_PC13)) |
mbed_official | 205:c41fc65bcfb4 | 167 | /** |
mbed_official | 205:c41fc65bcfb4 | 168 | * @} |
mbed_official | 205:c41fc65bcfb4 | 169 | */ |
mbed_official | 205:c41fc65bcfb4 | 170 | |
mbed_official | 205:c41fc65bcfb4 | 171 | /** @defgroup RTCEx_Tamper_Trigger_Definitions |
mbed_official | 205:c41fc65bcfb4 | 172 | * @{ |
mbed_official | 205:c41fc65bcfb4 | 173 | */ |
mbed_official | 205:c41fc65bcfb4 | 174 | #define RTC_TAMPERTRIGGER_RISINGEDGE ((uint32_t)0x00000000) |
mbed_official | 205:c41fc65bcfb4 | 175 | #define RTC_TAMPERTRIGGER_FALLINGEDGE ((uint32_t)0x00000002) |
mbed_official | 205:c41fc65bcfb4 | 176 | #define RTC_TAMPERTRIGGER_LOWLEVEL RTC_TAMPERTRIGGER_RISINGEDGE |
mbed_official | 205:c41fc65bcfb4 | 177 | #define RTC_TAMPERTRIGGER_HIGHLEVEL RTC_TAMPERTRIGGER_FALLINGEDGE |
mbed_official | 205:c41fc65bcfb4 | 178 | |
mbed_official | 205:c41fc65bcfb4 | 179 | #define IS_TAMPER_TRIGGER(TRIGGER) (((TRIGGER) == RTC_TAMPERTRIGGER_RISINGEDGE) || \ |
mbed_official | 205:c41fc65bcfb4 | 180 | ((TRIGGER) == RTC_TAMPERTRIGGER_FALLINGEDGE) || \ |
mbed_official | 205:c41fc65bcfb4 | 181 | ((TRIGGER) == RTC_TAMPERTRIGGER_LOWLEVEL) || \ |
mbed_official | 205:c41fc65bcfb4 | 182 | ((TRIGGER) == RTC_TAMPERTRIGGER_HIGHLEVEL)) |
mbed_official | 205:c41fc65bcfb4 | 183 | |
mbed_official | 205:c41fc65bcfb4 | 184 | /** |
mbed_official | 205:c41fc65bcfb4 | 185 | * @} |
mbed_official | 205:c41fc65bcfb4 | 186 | */ |
mbed_official | 205:c41fc65bcfb4 | 187 | |
mbed_official | 205:c41fc65bcfb4 | 188 | /** @defgroup RTCEx_Tamper_Filter_Definitions |
mbed_official | 205:c41fc65bcfb4 | 189 | * @{ |
mbed_official | 205:c41fc65bcfb4 | 190 | */ |
mbed_official | 205:c41fc65bcfb4 | 191 | #define RTC_TAMPERFILTER_DISABLE ((uint32_t)0x00000000) /*!< Tamper filter is disabled */ |
mbed_official | 205:c41fc65bcfb4 | 192 | |
mbed_official | 205:c41fc65bcfb4 | 193 | #define RTC_TAMPERFILTER_2SAMPLE ((uint32_t)0x00000800) /*!< Tamper is activated after 2 |
mbed_official | 205:c41fc65bcfb4 | 194 | consecutive samples at the active level */ |
mbed_official | 205:c41fc65bcfb4 | 195 | #define RTC_TAMPERFILTER_4SAMPLE ((uint32_t)0x00001000) /*!< Tamper is activated after 4 |
mbed_official | 205:c41fc65bcfb4 | 196 | consecutive samples at the active level */ |
mbed_official | 205:c41fc65bcfb4 | 197 | #define RTC_TAMPERFILTER_8SAMPLE ((uint32_t)0x00001800) /*!< Tamper is activated after 8 |
mbed_official | 205:c41fc65bcfb4 | 198 | consecutive samples at the active level. */ |
mbed_official | 205:c41fc65bcfb4 | 199 | |
mbed_official | 205:c41fc65bcfb4 | 200 | #define IS_TAMPER_FILTER(FILTER) (((FILTER) == RTC_TAMPERFILTER_DISABLE) || \ |
mbed_official | 205:c41fc65bcfb4 | 201 | ((FILTER) == RTC_TAMPERFILTER_2SAMPLE) || \ |
mbed_official | 205:c41fc65bcfb4 | 202 | ((FILTER) == RTC_TAMPERFILTER_4SAMPLE) || \ |
mbed_official | 205:c41fc65bcfb4 | 203 | ((FILTER) == RTC_TAMPERFILTER_8SAMPLE)) |
mbed_official | 205:c41fc65bcfb4 | 204 | /** |
mbed_official | 205:c41fc65bcfb4 | 205 | * @} |
mbed_official | 205:c41fc65bcfb4 | 206 | */ |
mbed_official | 205:c41fc65bcfb4 | 207 | |
mbed_official | 205:c41fc65bcfb4 | 208 | /** @defgroup RTCEx_Tamper_Sampling_Frequencies_Definitions |
mbed_official | 205:c41fc65bcfb4 | 209 | * @{ |
mbed_official | 205:c41fc65bcfb4 | 210 | */ |
mbed_official | 205:c41fc65bcfb4 | 211 | #define RTC_TAMPERSAMPLINGFREQ_RTCCLK_DIV32768 ((uint32_t)0x00000000) /*!< Each of the tamper inputs are sampled |
mbed_official | 205:c41fc65bcfb4 | 212 | with a frequency = RTCCLK / 32768 */ |
mbed_official | 205:c41fc65bcfb4 | 213 | #define RTC_TAMPERSAMPLINGFREQ_RTCCLK_DIV16384 ((uint32_t)0x00000100) /*!< Each of the tamper inputs are sampled |
mbed_official | 205:c41fc65bcfb4 | 214 | with a frequency = RTCCLK / 16384 */ |
mbed_official | 205:c41fc65bcfb4 | 215 | #define RTC_TAMPERSAMPLINGFREQ_RTCCLK_DIV8192 ((uint32_t)0x00000200) /*!< Each of the tamper inputs are sampled |
mbed_official | 205:c41fc65bcfb4 | 216 | with a frequency = RTCCLK / 8192 */ |
mbed_official | 205:c41fc65bcfb4 | 217 | #define RTC_TAMPERSAMPLINGFREQ_RTCCLK_DIV4096 ((uint32_t)0x00000300) /*!< Each of the tamper inputs are sampled |
mbed_official | 205:c41fc65bcfb4 | 218 | with a frequency = RTCCLK / 4096 */ |
mbed_official | 205:c41fc65bcfb4 | 219 | #define RTC_TAMPERSAMPLINGFREQ_RTCCLK_DIV2048 ((uint32_t)0x00000400) /*!< Each of the tamper inputs are sampled |
mbed_official | 205:c41fc65bcfb4 | 220 | with a frequency = RTCCLK / 2048 */ |
mbed_official | 205:c41fc65bcfb4 | 221 | #define RTC_TAMPERSAMPLINGFREQ_RTCCLK_DIV1024 ((uint32_t)0x00000500) /*!< Each of the tamper inputs are sampled |
mbed_official | 205:c41fc65bcfb4 | 222 | with a frequency = RTCCLK / 1024 */ |
mbed_official | 205:c41fc65bcfb4 | 223 | #define RTC_TAMPERSAMPLINGFREQ_RTCCLK_DIV512 ((uint32_t)0x00000600) /*!< Each of the tamper inputs are sampled |
mbed_official | 205:c41fc65bcfb4 | 224 | with a frequency = RTCCLK / 512 */ |
mbed_official | 205:c41fc65bcfb4 | 225 | #define RTC_TAMPERSAMPLINGFREQ_RTCCLK_DIV256 ((uint32_t)0x00000700) /*!< Each of the tamper inputs are sampled |
mbed_official | 205:c41fc65bcfb4 | 226 | with a frequency = RTCCLK / 256 */ |
mbed_official | 205:c41fc65bcfb4 | 227 | |
mbed_official | 205:c41fc65bcfb4 | 228 | #define IS_TAMPER_SAMPLING_FREQ(FREQ) (((FREQ) == RTC_TAMPERSAMPLINGFREQ_RTCCLK_DIV32768)|| \ |
mbed_official | 205:c41fc65bcfb4 | 229 | ((FREQ) == RTC_TAMPERSAMPLINGFREQ_RTCCLK_DIV16384)|| \ |
mbed_official | 205:c41fc65bcfb4 | 230 | ((FREQ) == RTC_TAMPERSAMPLINGFREQ_RTCCLK_DIV8192) || \ |
mbed_official | 205:c41fc65bcfb4 | 231 | ((FREQ) == RTC_TAMPERSAMPLINGFREQ_RTCCLK_DIV4096) || \ |
mbed_official | 205:c41fc65bcfb4 | 232 | ((FREQ) == RTC_TAMPERSAMPLINGFREQ_RTCCLK_DIV2048) || \ |
mbed_official | 205:c41fc65bcfb4 | 233 | ((FREQ) == RTC_TAMPERSAMPLINGFREQ_RTCCLK_DIV1024) || \ |
mbed_official | 205:c41fc65bcfb4 | 234 | ((FREQ) == RTC_TAMPERSAMPLINGFREQ_RTCCLK_DIV512) || \ |
mbed_official | 205:c41fc65bcfb4 | 235 | ((FREQ) == RTC_TAMPERSAMPLINGFREQ_RTCCLK_DIV256)) |
mbed_official | 205:c41fc65bcfb4 | 236 | /** |
mbed_official | 205:c41fc65bcfb4 | 237 | * @} |
mbed_official | 205:c41fc65bcfb4 | 238 | */ |
mbed_official | 205:c41fc65bcfb4 | 239 | |
mbed_official | 205:c41fc65bcfb4 | 240 | /** @defgroup RTCEx_Tamper_Pin_Precharge_Duration_Definitions |
mbed_official | 205:c41fc65bcfb4 | 241 | * @{ |
mbed_official | 205:c41fc65bcfb4 | 242 | */ |
mbed_official | 205:c41fc65bcfb4 | 243 | #define RTC_TAMPERPRECHARGEDURATION_1RTCCLK ((uint32_t)0x00000000) /*!< Tamper pins are pre-charged before |
mbed_official | 205:c41fc65bcfb4 | 244 | sampling during 1 RTCCLK cycle */ |
mbed_official | 205:c41fc65bcfb4 | 245 | #define RTC_TAMPERPRECHARGEDURATION_2RTCCLK ((uint32_t)0x00002000) /*!< Tamper pins are pre-charged before |
mbed_official | 205:c41fc65bcfb4 | 246 | sampling during 2 RTCCLK cycles */ |
mbed_official | 205:c41fc65bcfb4 | 247 | #define RTC_TAMPERPRECHARGEDURATION_4RTCCLK ((uint32_t)0x00004000) /*!< Tamper pins are pre-charged before |
mbed_official | 205:c41fc65bcfb4 | 248 | sampling during 4 RTCCLK cycles */ |
mbed_official | 205:c41fc65bcfb4 | 249 | #define RTC_TAMPERPRECHARGEDURATION_8RTCCLK ((uint32_t)0x00006000) /*!< Tamper pins are pre-charged before |
mbed_official | 205:c41fc65bcfb4 | 250 | sampling during 8 RTCCLK cycles */ |
mbed_official | 205:c41fc65bcfb4 | 251 | |
mbed_official | 205:c41fc65bcfb4 | 252 | #define IS_TAMPER_PRECHARGE_DURATION(DURATION) (((DURATION) == RTC_TAMPERPRECHARGEDURATION_1RTCCLK) || \ |
mbed_official | 205:c41fc65bcfb4 | 253 | ((DURATION) == RTC_TAMPERPRECHARGEDURATION_2RTCCLK) || \ |
mbed_official | 205:c41fc65bcfb4 | 254 | ((DURATION) == RTC_TAMPERPRECHARGEDURATION_4RTCCLK) || \ |
mbed_official | 205:c41fc65bcfb4 | 255 | ((DURATION) == RTC_TAMPERPRECHARGEDURATION_8RTCCLK)) |
mbed_official | 205:c41fc65bcfb4 | 256 | /** |
mbed_official | 205:c41fc65bcfb4 | 257 | * @} |
mbed_official | 205:c41fc65bcfb4 | 258 | */ |
mbed_official | 205:c41fc65bcfb4 | 259 | |
mbed_official | 205:c41fc65bcfb4 | 260 | /** @defgroup RTCEx_Tamper_TimeStampOnTamperDetection_Definitions |
mbed_official | 205:c41fc65bcfb4 | 261 | * @{ |
mbed_official | 205:c41fc65bcfb4 | 262 | */ |
mbed_official | 205:c41fc65bcfb4 | 263 | #define RTC_TIMESTAMPONTAMPERDETECTION_ENABLE ((uint32_t)RTC_TAFCR_TAMPTS) /*!< TimeStamp on Tamper Detection event saved */ |
mbed_official | 205:c41fc65bcfb4 | 264 | #define RTC_TIMESTAMPONTAMPERDETECTION_DISABLE ((uint32_t)0x00000000) /*!< TimeStamp on Tamper Detection event is not saved */ |
mbed_official | 205:c41fc65bcfb4 | 265 | |
mbed_official | 205:c41fc65bcfb4 | 266 | #define IS_TAMPER_TIMESTAMPONTAMPER_DETECTION(DETECTION) (((DETECTION) == RTC_TIMESTAMPONTAMPERDETECTION_ENABLE) || \ |
mbed_official | 205:c41fc65bcfb4 | 267 | ((DETECTION) == RTC_TIMESTAMPONTAMPERDETECTION_DISABLE)) |
mbed_official | 205:c41fc65bcfb4 | 268 | /** |
mbed_official | 205:c41fc65bcfb4 | 269 | * @} |
mbed_official | 205:c41fc65bcfb4 | 270 | */ |
mbed_official | 205:c41fc65bcfb4 | 271 | |
mbed_official | 205:c41fc65bcfb4 | 272 | /** @defgroup RTCEx_Tamper_Pull_UP_Definitions |
mbed_official | 205:c41fc65bcfb4 | 273 | * @{ |
mbed_official | 205:c41fc65bcfb4 | 274 | */ |
mbed_official | 205:c41fc65bcfb4 | 275 | #define RTC_TAMPER_PULLUP_ENABLE ((uint32_t)0x00000000) /*!< TimeStamp on Tamper Detection event saved */ |
mbed_official | 205:c41fc65bcfb4 | 276 | #define RTC_TAMPER_PULLUP_DISABLE ((uint32_t)RTC_TAFCR_TAMPPUDIS) /*!< TimeStamp on Tamper Detection event is not saved */ |
mbed_official | 205:c41fc65bcfb4 | 277 | |
mbed_official | 205:c41fc65bcfb4 | 278 | #define IS_TAMPER_PULLUP_STATE(STATE) (((STATE) == RTC_TAMPER_PULLUP_ENABLE) || \ |
mbed_official | 205:c41fc65bcfb4 | 279 | ((STATE) == RTC_TAMPER_PULLUP_DISABLE)) |
mbed_official | 205:c41fc65bcfb4 | 280 | /** |
mbed_official | 205:c41fc65bcfb4 | 281 | * @} |
mbed_official | 205:c41fc65bcfb4 | 282 | */ |
mbed_official | 205:c41fc65bcfb4 | 283 | |
mbed_official | 205:c41fc65bcfb4 | 284 | #if defined(STM32F071xB) || defined(STM32F072xB) || defined(STM32F078xx) |
mbed_official | 205:c41fc65bcfb4 | 285 | /** @defgroup RTCEx_Wakeup_Timer_Definitions |
mbed_official | 205:c41fc65bcfb4 | 286 | * @{ |
mbed_official | 205:c41fc65bcfb4 | 287 | */ |
mbed_official | 205:c41fc65bcfb4 | 288 | #define RTC_WAKEUPCLOCK_RTCCLK_DIV16 ((uint32_t)0x00000000) |
mbed_official | 205:c41fc65bcfb4 | 289 | #define RTC_WAKEUPCLOCK_RTCCLK_DIV8 ((uint32_t)0x00000001) |
mbed_official | 205:c41fc65bcfb4 | 290 | #define RTC_WAKEUPCLOCK_RTCCLK_DIV4 ((uint32_t)0x00000002) |
mbed_official | 205:c41fc65bcfb4 | 291 | #define RTC_WAKEUPCLOCK_RTCCLK_DIV2 ((uint32_t)0x00000003) |
mbed_official | 205:c41fc65bcfb4 | 292 | #define RTC_WAKEUPCLOCK_CK_SPRE_16BITS ((uint32_t)0x00000004) |
mbed_official | 205:c41fc65bcfb4 | 293 | #define RTC_WAKEUPCLOCK_CK_SPRE_17BITS ((uint32_t)0x00000006) |
mbed_official | 205:c41fc65bcfb4 | 294 | |
mbed_official | 205:c41fc65bcfb4 | 295 | #define IS_WAKEUP_CLOCK(CLOCK) (((CLOCK) == RTC_WAKEUPCLOCK_RTCCLK_DIV16) || \ |
mbed_official | 205:c41fc65bcfb4 | 296 | ((CLOCK) == RTC_WAKEUPCLOCK_RTCCLK_DIV8) || \ |
mbed_official | 205:c41fc65bcfb4 | 297 | ((CLOCK) == RTC_WAKEUPCLOCK_RTCCLK_DIV4) || \ |
mbed_official | 205:c41fc65bcfb4 | 298 | ((CLOCK) == RTC_WAKEUPCLOCK_RTCCLK_DIV2) || \ |
mbed_official | 205:c41fc65bcfb4 | 299 | ((CLOCK) == RTC_WAKEUPCLOCK_CK_SPRE_16BITS) || \ |
mbed_official | 205:c41fc65bcfb4 | 300 | ((CLOCK) == RTC_WAKEUPCLOCK_CK_SPRE_17BITS)) |
mbed_official | 205:c41fc65bcfb4 | 301 | |
mbed_official | 205:c41fc65bcfb4 | 302 | #define IS_WAKEUP_COUNTER(COUNTER) ((COUNTER) <= 0xFFFF) |
mbed_official | 205:c41fc65bcfb4 | 303 | /** |
mbed_official | 205:c41fc65bcfb4 | 304 | * @} |
mbed_official | 205:c41fc65bcfb4 | 305 | */ |
mbed_official | 205:c41fc65bcfb4 | 306 | #endif /* defined(STM32F071xB) || defined(STM32F072xB) || defined(STM32F078xx) */ |
mbed_official | 205:c41fc65bcfb4 | 307 | |
mbed_official | 205:c41fc65bcfb4 | 308 | /** @defgroup RTCEx_Smooth_calib_period_Definitions |
mbed_official | 205:c41fc65bcfb4 | 309 | * @{ |
mbed_official | 205:c41fc65bcfb4 | 310 | */ |
mbed_official | 205:c41fc65bcfb4 | 311 | #define RTC_SMOOTHCALIB_PERIOD_32SEC ((uint32_t)0x00000000) /*!< If RTCCLK = 32768 Hz, Smooth calibation |
mbed_official | 205:c41fc65bcfb4 | 312 | period is 32s, else 2exp20 RTCCLK seconds */ |
mbed_official | 205:c41fc65bcfb4 | 313 | #define RTC_SMOOTHCALIB_PERIOD_16SEC ((uint32_t)0x00002000) /*!< If RTCCLK = 32768 Hz, Smooth calibation |
mbed_official | 205:c41fc65bcfb4 | 314 | period is 16s, else 2exp19 RTCCLK seconds */ |
mbed_official | 205:c41fc65bcfb4 | 315 | #define RTC_SMOOTHCALIB_PERIOD_8SEC ((uint32_t)0x00004000) /*!< If RTCCLK = 32768 Hz, Smooth calibation |
mbed_official | 205:c41fc65bcfb4 | 316 | period is 8s, else 2exp18 RTCCLK seconds */ |
mbed_official | 205:c41fc65bcfb4 | 317 | |
mbed_official | 205:c41fc65bcfb4 | 318 | #define IS_RTC_SMOOTH_CALIB_PERIOD(PERIOD) (((PERIOD) == RTC_SMOOTHCALIB_PERIOD_32SEC) || \ |
mbed_official | 205:c41fc65bcfb4 | 319 | ((PERIOD) == RTC_SMOOTHCALIB_PERIOD_16SEC) || \ |
mbed_official | 205:c41fc65bcfb4 | 320 | ((PERIOD) == RTC_SMOOTHCALIB_PERIOD_8SEC)) |
mbed_official | 205:c41fc65bcfb4 | 321 | /** |
mbed_official | 205:c41fc65bcfb4 | 322 | * @} |
mbed_official | 205:c41fc65bcfb4 | 323 | */ |
mbed_official | 205:c41fc65bcfb4 | 324 | |
mbed_official | 205:c41fc65bcfb4 | 325 | /** @defgroup RTCEx_Smooth_calib_Plus_pulses_Definitions |
mbed_official | 205:c41fc65bcfb4 | 326 | * @{ |
mbed_official | 205:c41fc65bcfb4 | 327 | */ |
mbed_official | 205:c41fc65bcfb4 | 328 | #define RTC_SMOOTHCALIB_PLUSPULSES_SET ((uint32_t)0x00008000) /*!< The number of RTCCLK pulses added |
mbed_official | 205:c41fc65bcfb4 | 329 | during a X -second window = Y - CALM[8:0] |
mbed_official | 205:c41fc65bcfb4 | 330 | with Y = 512, 256, 128 when X = 32, 16, 8 */ |
mbed_official | 205:c41fc65bcfb4 | 331 | #define RTC_SMOOTHCALIB_PLUSPULSES_RESET ((uint32_t)0x00000000) /*!< The number of RTCCLK pulses subbstited |
mbed_official | 205:c41fc65bcfb4 | 332 | during a 32-second window = CALM[8:0] */ |
mbed_official | 205:c41fc65bcfb4 | 333 | |
mbed_official | 205:c41fc65bcfb4 | 334 | #define IS_RTC_SMOOTH_CALIB_PLUS(PLUS) (((PLUS) == RTC_SMOOTHCALIB_PLUSPULSES_SET) || \ |
mbed_official | 205:c41fc65bcfb4 | 335 | ((PLUS) == RTC_SMOOTHCALIB_PLUSPULSES_RESET)) |
mbed_official | 205:c41fc65bcfb4 | 336 | /** |
mbed_official | 205:c41fc65bcfb4 | 337 | * @} |
mbed_official | 205:c41fc65bcfb4 | 338 | */ |
mbed_official | 205:c41fc65bcfb4 | 339 | |
mbed_official | 205:c41fc65bcfb4 | 340 | /** @defgroup RTCEx_Smooth_calib_Minus_pulses_Definitions |
mbed_official | 205:c41fc65bcfb4 | 341 | * @{ |
mbed_official | 205:c41fc65bcfb4 | 342 | */ |
mbed_official | 205:c41fc65bcfb4 | 343 | #define IS_RTC_SMOOTH_CALIB_MINUS(VALUE) ((VALUE) <= 0x000001FF) |
mbed_official | 205:c41fc65bcfb4 | 344 | /** |
mbed_official | 205:c41fc65bcfb4 | 345 | * @} |
mbed_official | 205:c41fc65bcfb4 | 346 | */ |
mbed_official | 205:c41fc65bcfb4 | 347 | |
mbed_official | 205:c41fc65bcfb4 | 348 | /** @defgroup RTCEx_Add_1_Second_Parameter_Definitions |
mbed_official | 205:c41fc65bcfb4 | 349 | * @{ |
mbed_official | 205:c41fc65bcfb4 | 350 | */ |
mbed_official | 205:c41fc65bcfb4 | 351 | #define RTC_SHIFTADD1S_RESET ((uint32_t)0x00000000) |
mbed_official | 205:c41fc65bcfb4 | 352 | #define RTC_SHIFTADD1S_SET ((uint32_t)0x80000000) |
mbed_official | 205:c41fc65bcfb4 | 353 | |
mbed_official | 205:c41fc65bcfb4 | 354 | #define IS_RTC_SHIFT_ADD1S(SEL) (((SEL) == RTC_SHIFTADD1S_RESET) || \ |
mbed_official | 205:c41fc65bcfb4 | 355 | ((SEL) == RTC_SHIFTADD1S_SET)) |
mbed_official | 205:c41fc65bcfb4 | 356 | /** |
mbed_official | 205:c41fc65bcfb4 | 357 | * @} |
mbed_official | 205:c41fc65bcfb4 | 358 | */ |
mbed_official | 205:c41fc65bcfb4 | 359 | |
mbed_official | 205:c41fc65bcfb4 | 360 | /** @defgroup RTCEx_Substract_Fraction_Of_Second_Value |
mbed_official | 205:c41fc65bcfb4 | 361 | * @{ |
mbed_official | 205:c41fc65bcfb4 | 362 | */ |
mbed_official | 205:c41fc65bcfb4 | 363 | #define IS_RTC_SHIFT_SUBFS(FS) ((FS) <= 0x00007FFF) |
mbed_official | 205:c41fc65bcfb4 | 364 | /** |
mbed_official | 205:c41fc65bcfb4 | 365 | * @} |
mbed_official | 205:c41fc65bcfb4 | 366 | */ |
mbed_official | 205:c41fc65bcfb4 | 367 | |
mbed_official | 205:c41fc65bcfb4 | 368 | /** @defgroup RTCEx_Calib_Output_selection_Definitions |
mbed_official | 205:c41fc65bcfb4 | 369 | * @{ |
mbed_official | 205:c41fc65bcfb4 | 370 | */ |
mbed_official | 205:c41fc65bcfb4 | 371 | #define RTC_CALIBOUTPUT_512HZ ((uint32_t)0x00000000) |
mbed_official | 205:c41fc65bcfb4 | 372 | #define RTC_CALIBOUTPUT_1HZ ((uint32_t)0x00080000) |
mbed_official | 205:c41fc65bcfb4 | 373 | |
mbed_official | 205:c41fc65bcfb4 | 374 | #define IS_RTC_CALIB_OUTPUT(OUTPUT) (((OUTPUT) == RTC_CALIBOUTPUT_512HZ) || \ |
mbed_official | 205:c41fc65bcfb4 | 375 | ((OUTPUT) == RTC_CALIBOUTPUT_1HZ)) |
mbed_official | 205:c41fc65bcfb4 | 376 | /** |
mbed_official | 205:c41fc65bcfb4 | 377 | * @} |
mbed_official | 205:c41fc65bcfb4 | 378 | */ |
mbed_official | 205:c41fc65bcfb4 | 379 | |
mbed_official | 205:c41fc65bcfb4 | 380 | /** |
mbed_official | 205:c41fc65bcfb4 | 381 | * @} |
mbed_official | 205:c41fc65bcfb4 | 382 | */ |
mbed_official | 205:c41fc65bcfb4 | 383 | |
mbed_official | 205:c41fc65bcfb4 | 384 | /* Exported macro ------------------------------------------------------------*/ |
mbed_official | 205:c41fc65bcfb4 | 385 | |
mbed_official | 205:c41fc65bcfb4 | 386 | #if defined(STM32F071xB) || defined(STM32F072xB) || defined(STM32F078xx) |
mbed_official | 205:c41fc65bcfb4 | 387 | /** |
mbed_official | 205:c41fc65bcfb4 | 388 | * @brief Enable the RTC WakeUp Timer peripheral. |
mbed_official | 205:c41fc65bcfb4 | 389 | * @param __HANDLE__: specifies the RTC handle. |
mbed_official | 205:c41fc65bcfb4 | 390 | * @retval None |
mbed_official | 205:c41fc65bcfb4 | 391 | */ |
mbed_official | 205:c41fc65bcfb4 | 392 | #define __HAL_RTC_WAKEUPTIMER_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->CR |= (RTC_CR_WUTE)) |
mbed_official | 205:c41fc65bcfb4 | 393 | #endif /* defined(STM32F071xB) || defined(STM32F072xB) || defined(STM32F078xx) */ |
mbed_official | 205:c41fc65bcfb4 | 394 | |
mbed_official | 205:c41fc65bcfb4 | 395 | /** |
mbed_official | 205:c41fc65bcfb4 | 396 | * @brief Enable the RTC TimeStamp peripheral. |
mbed_official | 205:c41fc65bcfb4 | 397 | * @param __HANDLE__: specifies the RTC handle. |
mbed_official | 205:c41fc65bcfb4 | 398 | * @retval None |
mbed_official | 205:c41fc65bcfb4 | 399 | */ |
mbed_official | 205:c41fc65bcfb4 | 400 | #define __HAL_RTC_TIMESTAMP_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->CR |= (RTC_CR_TSE)) |
mbed_official | 205:c41fc65bcfb4 | 401 | |
mbed_official | 205:c41fc65bcfb4 | 402 | #if defined(STM32F071xB) || defined(STM32F072xB) || defined(STM32F078xx) |
mbed_official | 205:c41fc65bcfb4 | 403 | /** |
mbed_official | 205:c41fc65bcfb4 | 404 | * @brief Disable the RTC WakeUp Timer peripheral. |
mbed_official | 205:c41fc65bcfb4 | 405 | * @param __HANDLE__: specifies the RTC handle. |
mbed_official | 205:c41fc65bcfb4 | 406 | * @retval None |
mbed_official | 205:c41fc65bcfb4 | 407 | */ |
mbed_official | 205:c41fc65bcfb4 | 408 | #define __HAL_RTC_WAKEUPTIMER_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->CR &= ~(RTC_CR_WUTE)) |
mbed_official | 205:c41fc65bcfb4 | 409 | #endif /* defined(STM32F071xB) || defined(STM32F072xB) || defined(STM32F078xx) */ |
mbed_official | 205:c41fc65bcfb4 | 410 | |
mbed_official | 205:c41fc65bcfb4 | 411 | /** |
mbed_official | 205:c41fc65bcfb4 | 412 | * @brief Disable the RTC TimeStamp peripheral. |
mbed_official | 205:c41fc65bcfb4 | 413 | * @param __HANDLE__: specifies the RTC handle. |
mbed_official | 205:c41fc65bcfb4 | 414 | * @retval None |
mbed_official | 205:c41fc65bcfb4 | 415 | */ |
mbed_official | 205:c41fc65bcfb4 | 416 | #define __HAL_RTC_TIMESTAMP_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->CR &= ~(RTC_CR_TSE)) |
mbed_official | 205:c41fc65bcfb4 | 417 | |
mbed_official | 205:c41fc65bcfb4 | 418 | /** |
mbed_official | 205:c41fc65bcfb4 | 419 | * @brief Enable the RTC calibration output. |
mbed_official | 205:c41fc65bcfb4 | 420 | * @param __HANDLE__: specifies the RTC handle. |
mbed_official | 205:c41fc65bcfb4 | 421 | * @retval None |
mbed_official | 205:c41fc65bcfb4 | 422 | */ |
mbed_official | 205:c41fc65bcfb4 | 423 | #define __HAL_RTC_CALIBRATION_OUTPUT_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->CR |= (RTC_CR_COE)) |
mbed_official | 205:c41fc65bcfb4 | 424 | |
mbed_official | 205:c41fc65bcfb4 | 425 | /** |
mbed_official | 205:c41fc65bcfb4 | 426 | * @brief Disable the calibration output. |
mbed_official | 205:c41fc65bcfb4 | 427 | * @param __HANDLE__: specifies the RTC handle. |
mbed_official | 205:c41fc65bcfb4 | 428 | * @retval None |
mbed_official | 205:c41fc65bcfb4 | 429 | */ |
mbed_official | 205:c41fc65bcfb4 | 430 | #define __HAL_RTC_CALIBRATION_OUTPUT_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->CR &= ~(RTC_CR_COE)) |
mbed_official | 205:c41fc65bcfb4 | 431 | |
mbed_official | 205:c41fc65bcfb4 | 432 | /** |
mbed_official | 205:c41fc65bcfb4 | 433 | * @brief Enable the clock reference detection. |
mbed_official | 205:c41fc65bcfb4 | 434 | * @param __HANDLE__: specifies the RTC handle. |
mbed_official | 205:c41fc65bcfb4 | 435 | * @retval None |
mbed_official | 205:c41fc65bcfb4 | 436 | */ |
mbed_official | 205:c41fc65bcfb4 | 437 | #define __HAL_RTC_CLOCKREF_DETECTION_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->CR |= (RTC_CR_REFCKON)) |
mbed_official | 205:c41fc65bcfb4 | 438 | |
mbed_official | 205:c41fc65bcfb4 | 439 | /** |
mbed_official | 205:c41fc65bcfb4 | 440 | * @brief Disable the clock reference detection. |
mbed_official | 205:c41fc65bcfb4 | 441 | * @param __HANDLE__: specifies the RTC handle. |
mbed_official | 205:c41fc65bcfb4 | 442 | * @retval None |
mbed_official | 205:c41fc65bcfb4 | 443 | */ |
mbed_official | 205:c41fc65bcfb4 | 444 | #define __HAL_RTC_CLOCKREF_DETECTION_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->CR &= ~(RTC_CR_REFCKON)) |
mbed_official | 205:c41fc65bcfb4 | 445 | |
mbed_official | 205:c41fc65bcfb4 | 446 | /** |
mbed_official | 205:c41fc65bcfb4 | 447 | * @brief Enable the RTC TimeStamp interrupt. |
mbed_official | 205:c41fc65bcfb4 | 448 | * @param __HANDLE__: specifies the RTC handle. |
mbed_official | 205:c41fc65bcfb4 | 449 | * @param __INTERRUPT__: specifies the RTC TimeStamp interrupt sources to be enabled or disabled. |
mbed_official | 205:c41fc65bcfb4 | 450 | * This parameter can be: |
mbed_official | 205:c41fc65bcfb4 | 451 | * @arg RTC_IT_TS: TimeStamp interrupt |
mbed_official | 205:c41fc65bcfb4 | 452 | * @retval None |
mbed_official | 205:c41fc65bcfb4 | 453 | */ |
mbed_official | 205:c41fc65bcfb4 | 454 | #define __HAL_RTC_TIMESTAMP_ENABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->CR |= (__INTERRUPT__)) |
mbed_official | 205:c41fc65bcfb4 | 455 | |
mbed_official | 205:c41fc65bcfb4 | 456 | #if defined(STM32F071xB) || defined(STM32F072xB) || defined(STM32F078xx) |
mbed_official | 205:c41fc65bcfb4 | 457 | /** |
mbed_official | 205:c41fc65bcfb4 | 458 | * @brief Enable the RTC WakeUpTimer interrupt. |
mbed_official | 205:c41fc65bcfb4 | 459 | * @param __HANDLE__: specifies the RTC handle. |
mbed_official | 205:c41fc65bcfb4 | 460 | * @param __INTERRUPT__: specifies the RTC WakeUpTimer interrupt sources to be enabled or disabled. |
mbed_official | 205:c41fc65bcfb4 | 461 | * This parameter can be: |
mbed_official | 205:c41fc65bcfb4 | 462 | * @arg RTC_IT_WUT: WakeUpTimer A interrupt |
mbed_official | 205:c41fc65bcfb4 | 463 | * @retval None |
mbed_official | 205:c41fc65bcfb4 | 464 | */ |
mbed_official | 205:c41fc65bcfb4 | 465 | #define __HAL_RTC_WAKEUPTIMER_ENABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->CR |= (__INTERRUPT__)) |
mbed_official | 205:c41fc65bcfb4 | 466 | #endif /* defined(STM32F071xB) || defined(STM32F072xB) || defined(STM32F078xx) */ |
mbed_official | 205:c41fc65bcfb4 | 467 | |
mbed_official | 205:c41fc65bcfb4 | 468 | /** |
mbed_official | 205:c41fc65bcfb4 | 469 | * @brief Disable the RTC TimeStamp interrupt. |
mbed_official | 205:c41fc65bcfb4 | 470 | * @param __HANDLE__: specifies the RTC handle. |
mbed_official | 205:c41fc65bcfb4 | 471 | * @param __INTERRUPT__: specifies the RTC TimeStamp interrupt sources to be enabled or disabled. |
mbed_official | 205:c41fc65bcfb4 | 472 | * This parameter can be: |
mbed_official | 205:c41fc65bcfb4 | 473 | * @arg RTC_IT_TS: TimeStamp interrupt |
mbed_official | 205:c41fc65bcfb4 | 474 | * @retval None |
mbed_official | 205:c41fc65bcfb4 | 475 | */ |
mbed_official | 205:c41fc65bcfb4 | 476 | #define __HAL_RTC_TIMESTAMP_DISABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->CR &= ~(__INTERRUPT__)) |
mbed_official | 205:c41fc65bcfb4 | 477 | |
mbed_official | 205:c41fc65bcfb4 | 478 | #if defined(STM32F071xB) || defined(STM32F072xB) || defined(STM32F078xx) |
mbed_official | 205:c41fc65bcfb4 | 479 | /** |
mbed_official | 205:c41fc65bcfb4 | 480 | * @brief Disable the RTC WakeUpTimer interrupt. |
mbed_official | 205:c41fc65bcfb4 | 481 | * @param __HANDLE__: specifies the RTC handle. |
mbed_official | 205:c41fc65bcfb4 | 482 | * @param __INTERRUPT__: specifies the RTC WakeUpTimer interrupt sources to be enabled or disabled. |
mbed_official | 205:c41fc65bcfb4 | 483 | * This parameter can be: |
mbed_official | 205:c41fc65bcfb4 | 484 | * @arg RTC_IT_WUT: WakeUpTimer A interrupt |
mbed_official | 205:c41fc65bcfb4 | 485 | * @retval None |
mbed_official | 205:c41fc65bcfb4 | 486 | */ |
mbed_official | 205:c41fc65bcfb4 | 487 | #define __HAL_RTC_WAKEUPTIMER_DISABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->CR &= ~(__INTERRUPT__)) |
mbed_official | 205:c41fc65bcfb4 | 488 | #endif /* defined(STM32F071xB) || defined(STM32F072xB) || defined(STM32F078xx) */ |
mbed_official | 205:c41fc65bcfb4 | 489 | |
mbed_official | 205:c41fc65bcfb4 | 490 | /** |
mbed_official | 205:c41fc65bcfb4 | 491 | * @brief Check whether the specified RTC Tamper interrupt has occurred or not. |
mbed_official | 205:c41fc65bcfb4 | 492 | * @param __HANDLE__: specifies the RTC handle. |
mbed_official | 205:c41fc65bcfb4 | 493 | * @param __FLAG__: specifies the RTC Tamper interrupt sources to be enabled or disabled. |
mbed_official | 205:c41fc65bcfb4 | 494 | * This parameter can be: |
mbed_official | 205:c41fc65bcfb4 | 495 | * @arg RTC_IT_TAMP1 |
mbed_official | 205:c41fc65bcfb4 | 496 | * @retval None |
mbed_official | 205:c41fc65bcfb4 | 497 | */ |
mbed_official | 205:c41fc65bcfb4 | 498 | #define __HAL_RTC_TAMPER_GET_IT(__HANDLE__, __FLAG__) (((((__HANDLE__)->Instance->ISR) & ((__FLAG__)>> 4)) != RESET)? SET : RESET) |
mbed_official | 205:c41fc65bcfb4 | 499 | |
mbed_official | 205:c41fc65bcfb4 | 500 | #if defined(STM32F071xB) || defined(STM32F072xB) || defined(STM32F078xx) |
mbed_official | 205:c41fc65bcfb4 | 501 | /** |
mbed_official | 205:c41fc65bcfb4 | 502 | * @brief Check whether the specified RTC WakeUpTimer interrupt has occurred or not. |
mbed_official | 205:c41fc65bcfb4 | 503 | * @param __HANDLE__: specifies the RTC handle. |
mbed_official | 205:c41fc65bcfb4 | 504 | * @param __FLAG__: specifies the RTC WakeUpTimer interrupt sources to be enabled or disabled. |
mbed_official | 205:c41fc65bcfb4 | 505 | * This parameter can be: |
mbed_official | 205:c41fc65bcfb4 | 506 | * @arg RTC_IT_WUT: WakeUpTimer A interrupt |
mbed_official | 205:c41fc65bcfb4 | 507 | * @retval None |
mbed_official | 205:c41fc65bcfb4 | 508 | */ |
mbed_official | 205:c41fc65bcfb4 | 509 | #define __HAL_RTC_WAKEUPTIMER_GET_IT(__HANDLE__, __FLAG__) (((((__HANDLE__)->Instance->ISR) & ((__FLAG__)>> 4)) != RESET)? SET : RESET) |
mbed_official | 205:c41fc65bcfb4 | 510 | #endif /* defined(STM32F071xB) || defined(STM32F072xB) || defined(STM32F078xx) */ |
mbed_official | 205:c41fc65bcfb4 | 511 | |
mbed_official | 205:c41fc65bcfb4 | 512 | /** |
mbed_official | 205:c41fc65bcfb4 | 513 | * @brief Check whether the specified RTC TimeStamp interrupt has occurred or not. |
mbed_official | 205:c41fc65bcfb4 | 514 | * @param __HANDLE__: specifies the RTC handle. |
mbed_official | 205:c41fc65bcfb4 | 515 | * @param __FLAG__: specifies the RTC TimeStamp interrupt sources to be enabled or disabled. |
mbed_official | 205:c41fc65bcfb4 | 516 | * This parameter can be: |
mbed_official | 205:c41fc65bcfb4 | 517 | * @arg RTC_IT_TS: TimeStamp interrupt |
mbed_official | 205:c41fc65bcfb4 | 518 | * @retval None |
mbed_official | 205:c41fc65bcfb4 | 519 | */ |
mbed_official | 205:c41fc65bcfb4 | 520 | #define __HAL_RTC_TIMESTAMP_GET_IT(__HANDLE__, __FLAG__) (((((__HANDLE__)->Instance->ISR) & ((__FLAG__)>> 4)) != RESET)? SET : RESET) |
mbed_official | 205:c41fc65bcfb4 | 521 | |
mbed_official | 205:c41fc65bcfb4 | 522 | /** |
mbed_official | 205:c41fc65bcfb4 | 523 | * @brief Get the selected RTC TimeStamp's flag status. |
mbed_official | 205:c41fc65bcfb4 | 524 | * @param __HANDLE__: specifies the RTC handle. |
mbed_official | 205:c41fc65bcfb4 | 525 | * @param __FLAG__: specifies the RTC TimeStamp Flag sources to be enabled or disabled. |
mbed_official | 205:c41fc65bcfb4 | 526 | * This parameter can be: |
mbed_official | 205:c41fc65bcfb4 | 527 | * @arg RTC_FLAG_TSF |
mbed_official | 205:c41fc65bcfb4 | 528 | * @arg RTC_FLAG_TSOVF |
mbed_official | 205:c41fc65bcfb4 | 529 | * @retval None |
mbed_official | 205:c41fc65bcfb4 | 530 | */ |
mbed_official | 205:c41fc65bcfb4 | 531 | #define __HAL_RTC_TIMESTAMP_GET_FLAG(__HANDLE__, __FLAG__) (((((__HANDLE__)->Instance->ISR) & (__FLAG__)) != RESET)? SET : RESET) |
mbed_official | 205:c41fc65bcfb4 | 532 | |
mbed_official | 205:c41fc65bcfb4 | 533 | #if defined(STM32F071xB) || defined(STM32F072xB) || defined(STM32F078xx) |
mbed_official | 205:c41fc65bcfb4 | 534 | /** |
mbed_official | 205:c41fc65bcfb4 | 535 | * @brief Get the selected RTC WakeUpTimer's flag status. |
mbed_official | 205:c41fc65bcfb4 | 536 | * @param __HANDLE__: specifies the RTC handle. |
mbed_official | 205:c41fc65bcfb4 | 537 | * @param __FLAG__: specifies the RTC WakeUpTimer Flag sources to be enabled or disabled. |
mbed_official | 205:c41fc65bcfb4 | 538 | * This parameter can be: |
mbed_official | 205:c41fc65bcfb4 | 539 | * @arg RTC_FLAG_WUTF |
mbed_official | 205:c41fc65bcfb4 | 540 | * @arg RTC_FLAG_WUTWF |
mbed_official | 205:c41fc65bcfb4 | 541 | * @retval None |
mbed_official | 205:c41fc65bcfb4 | 542 | */ |
mbed_official | 205:c41fc65bcfb4 | 543 | #define __HAL_RTC_WAKEUPTIMER_GET_FLAG(__HANDLE__, __FLAG__) (((((__HANDLE__)->Instance->ISR) & (__FLAG__)) != RESET)? SET : RESET) |
mbed_official | 205:c41fc65bcfb4 | 544 | #endif /* defined(STM32F071xB) || defined(STM32F072xB) || defined(STM32F078xx) */ |
mbed_official | 205:c41fc65bcfb4 | 545 | |
mbed_official | 205:c41fc65bcfb4 | 546 | /** |
mbed_official | 205:c41fc65bcfb4 | 547 | * @brief Get the selected RTC Tamper's flag status. |
mbed_official | 205:c41fc65bcfb4 | 548 | * @param __HANDLE__: specifies the RTC handle. |
mbed_official | 205:c41fc65bcfb4 | 549 | * @param __FLAG__: specifies the RTC Tamper Flag sources to be enabled or disabled. |
mbed_official | 205:c41fc65bcfb4 | 550 | * This parameter can be: |
mbed_official | 205:c41fc65bcfb4 | 551 | * @arg RTC_FLAG_TAMP1F |
mbed_official | 205:c41fc65bcfb4 | 552 | * @retval None |
mbed_official | 205:c41fc65bcfb4 | 553 | */ |
mbed_official | 205:c41fc65bcfb4 | 554 | #define __HAL_RTC_TAMPER_GET_FLAG(__HANDLE__, __FLAG__) (((((__HANDLE__)->Instance->ISR) & (__FLAG__)) != RESET)? SET : RESET) |
mbed_official | 205:c41fc65bcfb4 | 555 | |
mbed_official | 205:c41fc65bcfb4 | 556 | /** |
mbed_official | 205:c41fc65bcfb4 | 557 | * @brief Get the selected RTC shift operation's flag status. |
mbed_official | 205:c41fc65bcfb4 | 558 | * @param __HANDLE__: specifies the RTC handle. |
mbed_official | 205:c41fc65bcfb4 | 559 | * @param __FLAG__: specifies the RTC shift operation Flag is pending or not. |
mbed_official | 205:c41fc65bcfb4 | 560 | * This parameter can be: |
mbed_official | 205:c41fc65bcfb4 | 561 | * @arg RTC_FLAG_SHPF |
mbed_official | 205:c41fc65bcfb4 | 562 | * @retval None |
mbed_official | 205:c41fc65bcfb4 | 563 | */ |
mbed_official | 205:c41fc65bcfb4 | 564 | #define __HAL_RTC_SHIFT_GET_FLAG(__HANDLE__, __FLAG__) (((((__HANDLE__)->Instance->ISR) & (__FLAG__)) != RESET)? SET : RESET) |
mbed_official | 205:c41fc65bcfb4 | 565 | |
mbed_official | 205:c41fc65bcfb4 | 566 | /** |
mbed_official | 205:c41fc65bcfb4 | 567 | * @brief Clear the RTC Time Stamp's pending flags. |
mbed_official | 205:c41fc65bcfb4 | 568 | * @param __HANDLE__: specifies the RTC handle. |
mbed_official | 205:c41fc65bcfb4 | 569 | * @param __FLAG__: specifies the RTC Alarm Flag sources to be enabled or disabled. |
mbed_official | 205:c41fc65bcfb4 | 570 | * This parameter can be: |
mbed_official | 205:c41fc65bcfb4 | 571 | * @arg RTC_FLAG_TSF |
mbed_official | 205:c41fc65bcfb4 | 572 | * @retval None |
mbed_official | 205:c41fc65bcfb4 | 573 | */ |
mbed_official | 205:c41fc65bcfb4 | 574 | #define __HAL_RTC_TIMESTAMP_CLEAR_FLAG(__HANDLE__, __FLAG__) ((__HANDLE__)->Instance->ISR) = (~(((__FLAG__) | RTC_ISR_INIT)& 0x0000FFFF)|((__HANDLE__)->Instance->ISR & RTC_ISR_INIT)) |
mbed_official | 205:c41fc65bcfb4 | 575 | |
mbed_official | 205:c41fc65bcfb4 | 576 | /** |
mbed_official | 205:c41fc65bcfb4 | 577 | * @brief Clear the RTC Tamper's pending flags. |
mbed_official | 205:c41fc65bcfb4 | 578 | * @param __HANDLE__: specifies the RTC handle. |
mbed_official | 205:c41fc65bcfb4 | 579 | * @param __FLAG__: specifies the RTC Tamper Flag sources to be enabled or disabled. |
mbed_official | 205:c41fc65bcfb4 | 580 | * This parameter can be: |
mbed_official | 205:c41fc65bcfb4 | 581 | * @arg RTC_FLAG_TAMP1F |
mbed_official | 205:c41fc65bcfb4 | 582 | * @retval None |
mbed_official | 205:c41fc65bcfb4 | 583 | */ |
mbed_official | 205:c41fc65bcfb4 | 584 | #define __HAL_RTC_TAMPER_CLEAR_FLAG(__HANDLE__, __FLAG__) ((__HANDLE__)->Instance->ISR) = (~(((__FLAG__) | RTC_ISR_INIT)& 0x0000FFFF)|((__HANDLE__)->Instance->ISR & RTC_ISR_INIT)) |
mbed_official | 205:c41fc65bcfb4 | 585 | |
mbed_official | 205:c41fc65bcfb4 | 586 | #if defined(STM32F071xB) || defined(STM32F072xB) || defined(STM32F078xx) |
mbed_official | 205:c41fc65bcfb4 | 587 | /** |
mbed_official | 205:c41fc65bcfb4 | 588 | * @brief Clear the RTC Wake Up timer's pending flags. |
mbed_official | 205:c41fc65bcfb4 | 589 | * @param __HANDLE__: specifies the RTC handle. |
mbed_official | 205:c41fc65bcfb4 | 590 | * @param __FLAG__: specifies the RTC Tamper Flag sources to be enabled or disabled. |
mbed_official | 205:c41fc65bcfb4 | 591 | * This parameter can be: |
mbed_official | 205:c41fc65bcfb4 | 592 | * @arg RTC_FLAG_WUTF |
mbed_official | 205:c41fc65bcfb4 | 593 | * @retval None |
mbed_official | 205:c41fc65bcfb4 | 594 | */ |
mbed_official | 205:c41fc65bcfb4 | 595 | #define __HAL_RTC_WAKEUPTIMER_CLEAR_FLAG(__HANDLE__, __FLAG__) ((__HANDLE__)->Instance->ISR) = (~(((__FLAG__) | RTC_ISR_INIT)& 0x0000FFFF)|((__HANDLE__)->Instance->ISR & RTC_ISR_INIT)) |
mbed_official | 205:c41fc65bcfb4 | 596 | #endif /* defined(STM32F071xB) || defined(STM32F072xB) || defined(STM32F078xx) */ |
mbed_official | 205:c41fc65bcfb4 | 597 | |
mbed_official | 205:c41fc65bcfb4 | 598 | /* Exported functions --------------------------------------------------------*/ |
mbed_official | 205:c41fc65bcfb4 | 599 | |
mbed_official | 205:c41fc65bcfb4 | 600 | /* RTC TimeStamp and Tamper functions *****************************************/ |
mbed_official | 205:c41fc65bcfb4 | 601 | HAL_StatusTypeDef HAL_RTCEx_SetTimeStamp(RTC_HandleTypeDef *hrtc, uint32_t TimeStampEdge, uint32_t RTC_TimeStampPin); |
mbed_official | 205:c41fc65bcfb4 | 602 | HAL_StatusTypeDef HAL_RTCEx_SetTimeStamp_IT(RTC_HandleTypeDef *hrtc, uint32_t TimeStampEdge, uint32_t RTC_TimeStampPin); |
mbed_official | 205:c41fc65bcfb4 | 603 | HAL_StatusTypeDef HAL_RTCEx_DeactivateTimeStamp(RTC_HandleTypeDef *hrtc); |
mbed_official | 205:c41fc65bcfb4 | 604 | HAL_StatusTypeDef HAL_RTCEx_GetTimeStamp(RTC_HandleTypeDef *hrtc, RTC_TimeTypeDef *sTimeStamp, RTC_DateTypeDef *sTimeStampDate, uint32_t Format); |
mbed_official | 205:c41fc65bcfb4 | 605 | |
mbed_official | 205:c41fc65bcfb4 | 606 | HAL_StatusTypeDef HAL_RTCEx_SetTamper(RTC_HandleTypeDef *hrtc, RTC_TamperTypeDef* sTamper); |
mbed_official | 205:c41fc65bcfb4 | 607 | HAL_StatusTypeDef HAL_RTCEx_SetTamper_IT(RTC_HandleTypeDef *hrtc, RTC_TamperTypeDef* sTamper); |
mbed_official | 205:c41fc65bcfb4 | 608 | HAL_StatusTypeDef HAL_RTCEx_DeactivateTamper(RTC_HandleTypeDef *hrtc, uint32_t Tamper); |
mbed_official | 205:c41fc65bcfb4 | 609 | void HAL_RTCEx_TamperTimeStampIRQHandler(RTC_HandleTypeDef *hrtc); |
mbed_official | 205:c41fc65bcfb4 | 610 | |
mbed_official | 205:c41fc65bcfb4 | 611 | void HAL_RTCEx_Tamper1EventCallback(RTC_HandleTypeDef *hrtc); |
mbed_official | 205:c41fc65bcfb4 | 612 | void HAL_RTCEx_Tamper2EventCallback(RTC_HandleTypeDef *hrtc); |
mbed_official | 205:c41fc65bcfb4 | 613 | #if defined(STM32F071xB) || defined(STM32F072xB) || defined(STM32F078xx) |
mbed_official | 205:c41fc65bcfb4 | 614 | void HAL_RTCEx_Tamper3EventCallback(RTC_HandleTypeDef *hrtc); |
mbed_official | 205:c41fc65bcfb4 | 615 | #endif |
mbed_official | 205:c41fc65bcfb4 | 616 | void HAL_RTCEx_TimeStampEventCallback(RTC_HandleTypeDef *hrtc); |
mbed_official | 205:c41fc65bcfb4 | 617 | HAL_StatusTypeDef HAL_RTCEx_PollForTimeStampEvent(RTC_HandleTypeDef *hrtc, uint32_t Timeout); |
mbed_official | 205:c41fc65bcfb4 | 618 | HAL_StatusTypeDef HAL_RTCEx_PollForTamper1Event(RTC_HandleTypeDef *hrtc, uint32_t Timeout); |
mbed_official | 205:c41fc65bcfb4 | 619 | HAL_StatusTypeDef HAL_RTCEx_PollForTamper2Event(RTC_HandleTypeDef *hrtc, uint32_t Timeout); |
mbed_official | 205:c41fc65bcfb4 | 620 | #if defined(STM32F071xB) || defined(STM32F072xB) || defined(STM32F078xx) |
mbed_official | 205:c41fc65bcfb4 | 621 | HAL_StatusTypeDef HAL_RTCEx_PollForTamper3Event(RTC_HandleTypeDef *hrtc, uint32_t Timeout); |
mbed_official | 205:c41fc65bcfb4 | 622 | #endif |
mbed_official | 205:c41fc65bcfb4 | 623 | |
mbed_official | 205:c41fc65bcfb4 | 624 | #if defined(STM32F071xB) || defined(STM32F072xB) || defined(STM32F078xx) |
mbed_official | 205:c41fc65bcfb4 | 625 | /* RTC Wake-up functions ******************************************************/ |
mbed_official | 205:c41fc65bcfb4 | 626 | HAL_StatusTypeDef HAL_RTCEx_SetWakeUpTimer(RTC_HandleTypeDef *hrtc, uint32_t WakeUpCounter, uint32_t WakeUpClock); |
mbed_official | 205:c41fc65bcfb4 | 627 | HAL_StatusTypeDef HAL_RTCEx_SetWakeUpTimer_IT(RTC_HandleTypeDef *hrtc, uint32_t WakeUpCounter, uint32_t WakeUpClock); |
mbed_official | 205:c41fc65bcfb4 | 628 | uint32_t HAL_RTCEx_DeactivateWakeUpTimer(RTC_HandleTypeDef *hrtc); |
mbed_official | 205:c41fc65bcfb4 | 629 | uint32_t HAL_RTCEx_GetWakeUpTimer(RTC_HandleTypeDef *hrtc); |
mbed_official | 205:c41fc65bcfb4 | 630 | void HAL_RTCEx_WakeUpTimerIRQHandler(RTC_HandleTypeDef *hrtc); |
mbed_official | 205:c41fc65bcfb4 | 631 | void HAL_RTCEx_WakeUpTimerEventCallback(RTC_HandleTypeDef *hrtc); |
mbed_official | 205:c41fc65bcfb4 | 632 | HAL_StatusTypeDef HAL_RTCEx_PollForWakeUpTimerEvent(RTC_HandleTypeDef *hrtc, uint32_t Timeout); |
mbed_official | 205:c41fc65bcfb4 | 633 | #endif |
mbed_official | 205:c41fc65bcfb4 | 634 | |
mbed_official | 205:c41fc65bcfb4 | 635 | /* Extension Control functions ************************************************/ |
mbed_official | 205:c41fc65bcfb4 | 636 | #if !defined(STM32F030x6) && !defined(STM32F030x8) |
mbed_official | 205:c41fc65bcfb4 | 637 | void HAL_RTCEx_BKUPWrite(RTC_HandleTypeDef *hrtc, uint32_t BackupRegister, uint32_t Data); |
mbed_official | 205:c41fc65bcfb4 | 638 | uint32_t HAL_RTCEx_BKUPRead(RTC_HandleTypeDef *hrtc, uint32_t BackupRegister); |
mbed_official | 205:c41fc65bcfb4 | 639 | #endif |
mbed_official | 205:c41fc65bcfb4 | 640 | |
mbed_official | 205:c41fc65bcfb4 | 641 | HAL_StatusTypeDef HAL_RTCEx_SetSmoothCalib(RTC_HandleTypeDef *hrtc, uint32_t SmoothCalibPeriod, uint32_t SmoothCalibPlusPulses, uint32_t SmouthCalibMinusPulsesValue); |
mbed_official | 205:c41fc65bcfb4 | 642 | HAL_StatusTypeDef HAL_RTCEx_SetSynchroShift(RTC_HandleTypeDef *hrtc, uint32_t ShiftAdd1S, uint32_t ShiftSubFS); |
mbed_official | 205:c41fc65bcfb4 | 643 | HAL_StatusTypeDef HAL_RTCEx_SetCalibrationOutPut(RTC_HandleTypeDef *hrtc, uint32_t CalibOutput); |
mbed_official | 205:c41fc65bcfb4 | 644 | HAL_StatusTypeDef HAL_RTCEx_DeactivateCalibrationOutPut(RTC_HandleTypeDef *hrtc); |
mbed_official | 205:c41fc65bcfb4 | 645 | HAL_StatusTypeDef HAL_RTCEx_SetRefClock(RTC_HandleTypeDef *hrtc); |
mbed_official | 205:c41fc65bcfb4 | 646 | HAL_StatusTypeDef HAL_RTCEx_DeactivateRefClock(RTC_HandleTypeDef *hrtc); |
mbed_official | 205:c41fc65bcfb4 | 647 | HAL_StatusTypeDef HAL_RTCEx_EnableBypassShadow(RTC_HandleTypeDef *hrtc); |
mbed_official | 205:c41fc65bcfb4 | 648 | HAL_StatusTypeDef HAL_RTCEx_DisableBypassShadow(RTC_HandleTypeDef *hrtc); |
mbed_official | 205:c41fc65bcfb4 | 649 | |
mbed_official | 205:c41fc65bcfb4 | 650 | /* Extension RTC features functions *******************************************/ |
mbed_official | 205:c41fc65bcfb4 | 651 | |
mbed_official | 205:c41fc65bcfb4 | 652 | |
mbed_official | 205:c41fc65bcfb4 | 653 | /** |
mbed_official | 205:c41fc65bcfb4 | 654 | * @} |
mbed_official | 205:c41fc65bcfb4 | 655 | */ |
mbed_official | 205:c41fc65bcfb4 | 656 | |
mbed_official | 205:c41fc65bcfb4 | 657 | /** |
mbed_official | 205:c41fc65bcfb4 | 658 | * @} |
mbed_official | 205:c41fc65bcfb4 | 659 | */ |
mbed_official | 205:c41fc65bcfb4 | 660 | |
mbed_official | 205:c41fc65bcfb4 | 661 | #ifdef __cplusplus |
mbed_official | 205:c41fc65bcfb4 | 662 | } |
mbed_official | 205:c41fc65bcfb4 | 663 | #endif |
mbed_official | 205:c41fc65bcfb4 | 664 | |
mbed_official | 205:c41fc65bcfb4 | 665 | #endif /* __STM32F0xx_HAL_RTC_EX_H */ |
mbed_official | 205:c41fc65bcfb4 | 666 | |
mbed_official | 205:c41fc65bcfb4 | 667 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ |