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