mbed library sources
Fork of mbed-src by
targets/cmsis/TARGET_STM/TARGET_STM32F0/stm32f0xx_hal_wwdg.h@636:a11c0372f0ba, 2015-09-30 (annotated)
- Committer:
- mbed_official
- Date:
- Wed Sep 30 17:00:09 2015 +0100
- Revision:
- 636:a11c0372f0ba
- Parent:
- 631:825f75ca301e
Synchronized with git revision d29c98dae61be0946ddf3a3c641c7726056f9452
Full URL: https://github.com/mbedmicro/mbed/commit/d29c98dae61be0946ddf3a3c641c7726056f9452/
Added support for SAMW25
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_wwdg.h |
mbed_official | 340:28d1f895c6fe | 4 | * @author MCD Application Team |
mbed_official | 631:825f75ca301e | 5 | * @version V1.3.0 |
mbed_official | 631:825f75ca301e | 6 | * @date 26-June-2015 |
mbed_official | 340:28d1f895c6fe | 7 | * @brief Header file of WWDG HAL module. |
mbed_official | 340:28d1f895c6fe | 8 | ****************************************************************************** |
mbed_official | 340:28d1f895c6fe | 9 | * @attention |
mbed_official | 340:28d1f895c6fe | 10 | * |
mbed_official | 631:825f75ca301e | 11 | * <h2><center>© COPYRIGHT(c) 2015 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_WWDG_H |
mbed_official | 340:28d1f895c6fe | 40 | #define __STM32F0xx_HAL_WWDG_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 WWDG |
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 WWDG_Exported_Types WWDG 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 WWDG HAL State Structure definition |
mbed_official | 340:28d1f895c6fe | 65 | */ |
mbed_official | 340:28d1f895c6fe | 66 | typedef enum |
mbed_official | 340:28d1f895c6fe | 67 | { |
mbed_official | 340:28d1f895c6fe | 68 | HAL_WWDG_STATE_RESET = 0x00, /*!< WWDG not yet initialized or disabled */ |
mbed_official | 340:28d1f895c6fe | 69 | HAL_WWDG_STATE_READY = 0x01, /*!< WWDG initialized and ready for use */ |
mbed_official | 340:28d1f895c6fe | 70 | HAL_WWDG_STATE_BUSY = 0x02, /*!< WWDG internal process is ongoing */ |
mbed_official | 340:28d1f895c6fe | 71 | HAL_WWDG_STATE_TIMEOUT = 0x03, /*!< WWDG timeout state */ |
mbed_official | 340:28d1f895c6fe | 72 | HAL_WWDG_STATE_ERROR = 0x04 /*!< WWDG error state */ |
mbed_official | 340:28d1f895c6fe | 73 | }HAL_WWDG_StateTypeDef; |
mbed_official | 340:28d1f895c6fe | 74 | |
mbed_official | 340:28d1f895c6fe | 75 | /** |
mbed_official | 340:28d1f895c6fe | 76 | * @brief WWDG Init structure definition |
mbed_official | 340:28d1f895c6fe | 77 | */ |
mbed_official | 340:28d1f895c6fe | 78 | typedef struct |
mbed_official | 340:28d1f895c6fe | 79 | { |
mbed_official | 340:28d1f895c6fe | 80 | uint32_t Prescaler; /*!< Specifies the prescaler value of the WWDG. |
mbed_official | 340:28d1f895c6fe | 81 | This parameter can be a value of @ref WWDG_Prescaler */ |
mbed_official | 340:28d1f895c6fe | 82 | |
mbed_official | 340:28d1f895c6fe | 83 | uint32_t Window; /*!< Specifies the WWDG window value to be compared to the downcounter. |
mbed_official | 442:d2c15dda23c1 | 84 | This parameter must be a number lower than Max_Data = 0x80 */ |
mbed_official | 340:28d1f895c6fe | 85 | |
mbed_official | 340:28d1f895c6fe | 86 | uint32_t Counter; /*!< Specifies the WWDG free-running downcounter value. |
mbed_official | 442:d2c15dda23c1 | 87 | This parameter must be a number between Min_Data = 0x40 and Max_Data = 0x7F */ |
mbed_official | 340:28d1f895c6fe | 88 | |
mbed_official | 340:28d1f895c6fe | 89 | } WWDG_InitTypeDef; |
mbed_official | 340:28d1f895c6fe | 90 | |
mbed_official | 340:28d1f895c6fe | 91 | /** |
mbed_official | 340:28d1f895c6fe | 92 | * @brief WWDG handle Structure definition |
mbed_official | 340:28d1f895c6fe | 93 | */ |
mbed_official | 340:28d1f895c6fe | 94 | typedef struct |
mbed_official | 340:28d1f895c6fe | 95 | { |
mbed_official | 340:28d1f895c6fe | 96 | WWDG_TypeDef *Instance; /*!< Register base address */ |
mbed_official | 340:28d1f895c6fe | 97 | |
mbed_official | 340:28d1f895c6fe | 98 | WWDG_InitTypeDef Init; /*!< WWDG required parameters */ |
mbed_official | 340:28d1f895c6fe | 99 | |
mbed_official | 340:28d1f895c6fe | 100 | HAL_LockTypeDef Lock; /*!< WWDG locking object */ |
mbed_official | 340:28d1f895c6fe | 101 | |
mbed_official | 340:28d1f895c6fe | 102 | __IO HAL_WWDG_StateTypeDef State; /*!< WWDG communication state */ |
mbed_official | 340:28d1f895c6fe | 103 | |
mbed_official | 340:28d1f895c6fe | 104 | } WWDG_HandleTypeDef; |
mbed_official | 340:28d1f895c6fe | 105 | /** |
mbed_official | 340:28d1f895c6fe | 106 | * @} |
mbed_official | 340:28d1f895c6fe | 107 | */ |
mbed_official | 340:28d1f895c6fe | 108 | |
mbed_official | 340:28d1f895c6fe | 109 | /* Exported constants --------------------------------------------------------*/ |
mbed_official | 340:28d1f895c6fe | 110 | |
mbed_official | 340:28d1f895c6fe | 111 | /** @defgroup WWDG_Exported_Constants WWDG Exported Constants |
mbed_official | 340:28d1f895c6fe | 112 | * @{ |
mbed_official | 340:28d1f895c6fe | 113 | */ |
mbed_official | 340:28d1f895c6fe | 114 | |
mbed_official | 340:28d1f895c6fe | 115 | /** @defgroup WWDG_Interrupt_definition WWDG Interrupt definition |
mbed_official | 340:28d1f895c6fe | 116 | * @{ |
mbed_official | 340:28d1f895c6fe | 117 | */ |
mbed_official | 442:d2c15dda23c1 | 118 | #define WWDG_IT_EWI WWDG_CFR_EWI /*!< Early wakeup interrupt */ |
mbed_official | 340:28d1f895c6fe | 119 | /** |
mbed_official | 340:28d1f895c6fe | 120 | * @} |
mbed_official | 340:28d1f895c6fe | 121 | */ |
mbed_official | 340:28d1f895c6fe | 122 | |
mbed_official | 340:28d1f895c6fe | 123 | /** @defgroup WWDG_Flag_definition WWDG Flag definition |
mbed_official | 340:28d1f895c6fe | 124 | * @brief WWDG Flag definition |
mbed_official | 340:28d1f895c6fe | 125 | * @{ |
mbed_official | 340:28d1f895c6fe | 126 | */ |
mbed_official | 442:d2c15dda23c1 | 127 | #define WWDG_FLAG_EWIF WWDG_SR_EWIF /*!< Early wakeup interrupt flag */ |
mbed_official | 340:28d1f895c6fe | 128 | /** |
mbed_official | 340:28d1f895c6fe | 129 | * @} |
mbed_official | 340:28d1f895c6fe | 130 | */ |
mbed_official | 340:28d1f895c6fe | 131 | |
mbed_official | 340:28d1f895c6fe | 132 | /** @defgroup WWDG_Prescaler WWDG Prescaler |
mbed_official | 340:28d1f895c6fe | 133 | * @{ |
mbed_official | 340:28d1f895c6fe | 134 | */ |
mbed_official | 442:d2c15dda23c1 | 135 | #define WWDG_PRESCALER_1 ((uint32_t)0x00000000) /*!< WWDG counter clock = (PCLK1/4096)/1 */ |
mbed_official | 442:d2c15dda23c1 | 136 | #define WWDG_PRESCALER_2 WWDG_CFR_WDGTB0 /*!< WWDG counter clock = (PCLK1/4096)/2 */ |
mbed_official | 442:d2c15dda23c1 | 137 | #define WWDG_PRESCALER_4 WWDG_CFR_WDGTB1 /*!< WWDG counter clock = (PCLK1/4096)/4 */ |
mbed_official | 442:d2c15dda23c1 | 138 | #define WWDG_PRESCALER_8 WWDG_CFR_WDGTB /*!< WWDG counter clock = (PCLK1/4096)/8 */ |
mbed_official | 631:825f75ca301e | 139 | /** |
mbed_official | 631:825f75ca301e | 140 | * @} |
mbed_official | 631:825f75ca301e | 141 | */ |
mbed_official | 340:28d1f895c6fe | 142 | |
mbed_official | 340:28d1f895c6fe | 143 | /** |
mbed_official | 340:28d1f895c6fe | 144 | * @} |
mbed_official | 340:28d1f895c6fe | 145 | */ |
mbed_official | 340:28d1f895c6fe | 146 | |
mbed_official | 631:825f75ca301e | 147 | /* Private macros ------------------------------------------------------------*/ |
mbed_official | 631:825f75ca301e | 148 | /** @defgroup WWDG_Private_Macros WWDG Private Macros |
mbed_official | 340:28d1f895c6fe | 149 | * @{ |
mbed_official | 340:28d1f895c6fe | 150 | */ |
mbed_official | 631:825f75ca301e | 151 | #define IS_WWDG_PRESCALER(__PRESCALER__) (((__PRESCALER__) == WWDG_PRESCALER_1) || \ |
mbed_official | 631:825f75ca301e | 152 | ((__PRESCALER__) == WWDG_PRESCALER_2) || \ |
mbed_official | 631:825f75ca301e | 153 | ((__PRESCALER__) == WWDG_PRESCALER_4) || \ |
mbed_official | 631:825f75ca301e | 154 | ((__PRESCALER__) == WWDG_PRESCALER_8)) |
mbed_official | 631:825f75ca301e | 155 | |
mbed_official | 442:d2c15dda23c1 | 156 | #define IS_WWDG_WINDOW(__WINDOW__) ((__WINDOW__) <= 0x7F) |
mbed_official | 340:28d1f895c6fe | 157 | |
mbed_official | 442:d2c15dda23c1 | 158 | #define IS_WWDG_COUNTER(__COUNTER__) (((__COUNTER__) >= 0x40) && ((__COUNTER__) <= 0x7F)) |
mbed_official | 340:28d1f895c6fe | 159 | /** |
mbed_official | 340:28d1f895c6fe | 160 | * @} |
mbed_official | 340:28d1f895c6fe | 161 | */ |
mbed_official | 340:28d1f895c6fe | 162 | |
mbed_official | 340:28d1f895c6fe | 163 | |
mbed_official | 631:825f75ca301e | 164 | /* Exported macros ------------------------------------------------------------*/ |
mbed_official | 340:28d1f895c6fe | 165 | |
mbed_official | 340:28d1f895c6fe | 166 | /** @defgroup WWDG_Exported_Macros WWDG Exported Macros |
mbed_official | 340:28d1f895c6fe | 167 | * @{ |
mbed_official | 340:28d1f895c6fe | 168 | */ |
mbed_official | 340:28d1f895c6fe | 169 | |
mbed_official | 631:825f75ca301e | 170 | /** @brief Reset WWDG handle state. |
mbed_official | 340:28d1f895c6fe | 171 | * @param __HANDLE__: WWDG handle |
mbed_official | 340:28d1f895c6fe | 172 | * @retval None |
mbed_official | 340:28d1f895c6fe | 173 | */ |
mbed_official | 442:d2c15dda23c1 | 174 | #define __HAL_WWDG_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_WWDG_STATE_RESET) |
mbed_official | 340:28d1f895c6fe | 175 | |
mbed_official | 340:28d1f895c6fe | 176 | /** |
mbed_official | 631:825f75ca301e | 177 | * @brief Enable the WWDG peripheral. |
mbed_official | 340:28d1f895c6fe | 178 | * @param __HANDLE__: WWDG handle |
mbed_official | 340:28d1f895c6fe | 179 | * @retval None |
mbed_official | 340:28d1f895c6fe | 180 | */ |
mbed_official | 442:d2c15dda23c1 | 181 | #define __HAL_WWDG_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->CR |= WWDG_CR_WDGA) |
mbed_official | 442:d2c15dda23c1 | 182 | |
mbed_official | 442:d2c15dda23c1 | 183 | /** |
mbed_official | 631:825f75ca301e | 184 | * @brief Disable the WWDG peripheral. |
mbed_official | 442:d2c15dda23c1 | 185 | * @param __HANDLE__: WWDG handle |
mbed_official | 442:d2c15dda23c1 | 186 | * @note WARNING: This is a dummy macro for HAL code alignment. |
mbed_official | 442:d2c15dda23c1 | 187 | * Once enable, WWDG Peripheral cannot be disabled except by a system reset. |
mbed_official | 442:d2c15dda23c1 | 188 | * @retval None |
mbed_official | 442:d2c15dda23c1 | 189 | */ |
mbed_official | 442:d2c15dda23c1 | 190 | #define __HAL_WWDG_DISABLE(__HANDLE__) /* dummy macro */ |
mbed_official | 442:d2c15dda23c1 | 191 | |
mbed_official | 442:d2c15dda23c1 | 192 | /** |
mbed_official | 631:825f75ca301e | 193 | * @brief Enable the WWDG early wakeup interrupt. |
mbed_official | 442:d2c15dda23c1 | 194 | * @param __HANDLE__: WWDG handle |
mbed_official | 442:d2c15dda23c1 | 195 | * @param __INTERRUPT__: specifies the interrupt to enable. |
mbed_official | 442:d2c15dda23c1 | 196 | * This parameter can be one of the following values: |
mbed_official | 442:d2c15dda23c1 | 197 | * @arg WWDG_IT_EWI: Early wakeup interrupt |
mbed_official | 442:d2c15dda23c1 | 198 | * @note Once enabled this interrupt cannot be disabled except by a system reset. |
mbed_official | 442:d2c15dda23c1 | 199 | * @retval None |
mbed_official | 442:d2c15dda23c1 | 200 | */ |
mbed_official | 442:d2c15dda23c1 | 201 | #define __HAL_WWDG_ENABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->CFR |= (__INTERRUPT__)) |
mbed_official | 442:d2c15dda23c1 | 202 | |
mbed_official | 442:d2c15dda23c1 | 203 | /** |
mbed_official | 631:825f75ca301e | 204 | * @brief Disable the WWDG early wakeup interrupt. |
mbed_official | 442:d2c15dda23c1 | 205 | * @param __HANDLE__: WWDG handle |
mbed_official | 442:d2c15dda23c1 | 206 | * @param __INTERRUPT__: specifies the interrupt to disable. |
mbed_official | 442:d2c15dda23c1 | 207 | * This parameter can be one of the following values: |
mbed_official | 442:d2c15dda23c1 | 208 | * @arg WWDG_IT_EWI: Early wakeup interrupt |
mbed_official | 442:d2c15dda23c1 | 209 | * @note WARNING: This is a dummy macro for HAL code alignment. |
mbed_official | 442:d2c15dda23c1 | 210 | * Once enabled this interrupt cannot be disabled except by a system reset. |
mbed_official | 442:d2c15dda23c1 | 211 | * @retval None |
mbed_official | 442:d2c15dda23c1 | 212 | */ |
mbed_official | 442:d2c15dda23c1 | 213 | #define __HAL_WWDG_DISABLE_IT(__HANDLE__, __INTERRUPT__) /* dummy macro */ |
mbed_official | 442:d2c15dda23c1 | 214 | |
mbed_official | 442:d2c15dda23c1 | 215 | /** |
mbed_official | 631:825f75ca301e | 216 | * @brief Check whether the selected WWDG interrupt has occurred or not. |
mbed_official | 442:d2c15dda23c1 | 217 | * @param __HANDLE__: WWDG handle |
mbed_official | 442:d2c15dda23c1 | 218 | * @param __INTERRUPT__: specifies the it to check. |
mbed_official | 442:d2c15dda23c1 | 219 | * This parameter can be one of the following values: |
mbed_official | 442:d2c15dda23c1 | 220 | * @arg WWDG_FLAG_EWIF: Early wakeup interrupt IT |
mbed_official | 442:d2c15dda23c1 | 221 | * @retval The new state of WWDG_FLAG (SET or RESET). |
mbed_official | 442:d2c15dda23c1 | 222 | */ |
mbed_official | 442:d2c15dda23c1 | 223 | #define __HAL_WWDG_GET_IT(__HANDLE__, __INTERRUPT__) (((__HANDLE__)->Instance->SR & (__INTERRUPT__)) == (__INTERRUPT__)) |
mbed_official | 442:d2c15dda23c1 | 224 | |
mbed_official | 631:825f75ca301e | 225 | /** @brief Clear the WWDG interrupt pending bits. |
mbed_official | 442:d2c15dda23c1 | 226 | * bits to clear the selected interrupt pending bits. |
mbed_official | 442:d2c15dda23c1 | 227 | * @param __HANDLE__: WWDG handle |
mbed_official | 442:d2c15dda23c1 | 228 | * @param __INTERRUPT__: specifies the interrupt pending bit to clear. |
mbed_official | 442:d2c15dda23c1 | 229 | * This parameter can be one of the following values: |
mbed_official | 442:d2c15dda23c1 | 230 | * @arg WWDG_FLAG_EWIF: Early wakeup interrupt flag |
mbed_official | 442:d2c15dda23c1 | 231 | */ |
mbed_official | 442:d2c15dda23c1 | 232 | #define __HAL_WWDG_CLEAR_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->SR = ~(__INTERRUPT__)) |
mbed_official | 340:28d1f895c6fe | 233 | |
mbed_official | 340:28d1f895c6fe | 234 | /** |
mbed_official | 631:825f75ca301e | 235 | * @brief Check whether the specified WWDG flag is set or not. |
mbed_official | 340:28d1f895c6fe | 236 | * @param __HANDLE__: WWDG handle |
mbed_official | 340:28d1f895c6fe | 237 | * @param __FLAG__: specifies the flag to check. |
mbed_official | 340:28d1f895c6fe | 238 | * This parameter can be one of the following values: |
mbed_official | 340:28d1f895c6fe | 239 | * @arg WWDG_FLAG_EWIF: Early wakeup interrupt flag |
mbed_official | 340:28d1f895c6fe | 240 | * @retval The new state of WWDG_FLAG (SET or RESET). |
mbed_official | 340:28d1f895c6fe | 241 | */ |
mbed_official | 442:d2c15dda23c1 | 242 | #define __HAL_WWDG_GET_FLAG(__HANDLE__, __FLAG__) (((__HANDLE__)->Instance->SR & (__FLAG__)) == (__FLAG__)) |
mbed_official | 340:28d1f895c6fe | 243 | |
mbed_official | 340:28d1f895c6fe | 244 | /** |
mbed_official | 631:825f75ca301e | 245 | * @brief Clear the WWDG's pending flags. |
mbed_official | 340:28d1f895c6fe | 246 | * @param __HANDLE__: WWDG handle |
mbed_official | 340:28d1f895c6fe | 247 | * @param __FLAG__: specifies the flag to clear. |
mbed_official | 340:28d1f895c6fe | 248 | * This parameter can be one of the following values: |
mbed_official | 340:28d1f895c6fe | 249 | * @arg WWDG_FLAG_EWIF: Early wakeup interrupt flag |
mbed_official | 340:28d1f895c6fe | 250 | * @retval None |
mbed_official | 340:28d1f895c6fe | 251 | */ |
mbed_official | 442:d2c15dda23c1 | 252 | #define __HAL_WWDG_CLEAR_FLAG(__HANDLE__, __FLAG__) ((__HANDLE__)->Instance->SR = ~(__FLAG__)) |
mbed_official | 340:28d1f895c6fe | 253 | |
mbed_official | 631:825f75ca301e | 254 | /** @brief Check whether the specified WWDG interrupt source is enabled or not. |
mbed_official | 442:d2c15dda23c1 | 255 | * @param __HANDLE__: WWDG Handle. |
mbed_official | 442:d2c15dda23c1 | 256 | * @param __INTERRUPT__: specifies the WWDG interrupt source to check. |
mbed_official | 442:d2c15dda23c1 | 257 | * This parameter can be one of the following values: |
mbed_official | 442:d2c15dda23c1 | 258 | * @arg WWDG_IT_EWI: Early Wakeup Interrupt |
mbed_official | 442:d2c15dda23c1 | 259 | * @retval state of __INTERRUPT__ (TRUE or FALSE). |
mbed_official | 340:28d1f895c6fe | 260 | */ |
mbed_official | 442:d2c15dda23c1 | 261 | #define __HAL_WWDG_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__) (((__HANDLE__)->Instance->CFR & (__INTERRUPT__)) == (__INTERRUPT__)) |
mbed_official | 340:28d1f895c6fe | 262 | |
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 | /* Exported functions --------------------------------------------------------*/ |
mbed_official | 340:28d1f895c6fe | 268 | |
mbed_official | 340:28d1f895c6fe | 269 | /** @addtogroup WWDG_Exported_Functions |
mbed_official | 340:28d1f895c6fe | 270 | * @{ |
mbed_official | 340:28d1f895c6fe | 271 | */ |
mbed_official | 340:28d1f895c6fe | 272 | |
mbed_official | 340:28d1f895c6fe | 273 | /** @addtogroup WWDG_Exported_Functions_Group1 |
mbed_official | 340:28d1f895c6fe | 274 | * @{ |
mbed_official | 340:28d1f895c6fe | 275 | */ |
mbed_official | 340:28d1f895c6fe | 276 | /* Initialization/de-initialization functions **********************************/ |
mbed_official | 340:28d1f895c6fe | 277 | HAL_StatusTypeDef HAL_WWDG_Init(WWDG_HandleTypeDef *hwwdg); |
mbed_official | 340:28d1f895c6fe | 278 | HAL_StatusTypeDef HAL_WWDG_DeInit(WWDG_HandleTypeDef *hwwdg); |
mbed_official | 340:28d1f895c6fe | 279 | void HAL_WWDG_MspInit(WWDG_HandleTypeDef *hwwdg); |
mbed_official | 340:28d1f895c6fe | 280 | void HAL_WWDG_MspDeInit(WWDG_HandleTypeDef *hwwdg); |
mbed_official | 340:28d1f895c6fe | 281 | /** |
mbed_official | 340:28d1f895c6fe | 282 | * @} |
mbed_official | 340:28d1f895c6fe | 283 | */ |
mbed_official | 340:28d1f895c6fe | 284 | |
mbed_official | 340:28d1f895c6fe | 285 | /** @addtogroup WWDG_Exported_Functions_Group2 |
mbed_official | 340:28d1f895c6fe | 286 | * @{ |
mbed_official | 340:28d1f895c6fe | 287 | */ |
mbed_official | 340:28d1f895c6fe | 288 | /* I/O operation functions ******************************************************/ |
mbed_official | 340:28d1f895c6fe | 289 | HAL_StatusTypeDef HAL_WWDG_Start(WWDG_HandleTypeDef *hwwdg); |
mbed_official | 340:28d1f895c6fe | 290 | HAL_StatusTypeDef HAL_WWDG_Start_IT(WWDG_HandleTypeDef *hwwdg); |
mbed_official | 340:28d1f895c6fe | 291 | HAL_StatusTypeDef HAL_WWDG_Refresh(WWDG_HandleTypeDef *hwwdg, uint32_t Counter); |
mbed_official | 340:28d1f895c6fe | 292 | void HAL_WWDG_IRQHandler(WWDG_HandleTypeDef *hwwdg); |
mbed_official | 631:825f75ca301e | 293 | void HAL_WWDG_WakeupCallback(WWDG_HandleTypeDef* hwwdg); |
mbed_official | 340:28d1f895c6fe | 294 | /** |
mbed_official | 340:28d1f895c6fe | 295 | * @} |
mbed_official | 340:28d1f895c6fe | 296 | */ |
mbed_official | 340:28d1f895c6fe | 297 | |
mbed_official | 340:28d1f895c6fe | 298 | /** @addtogroup WWDG_Exported_Functions_Group3 |
mbed_official | 340:28d1f895c6fe | 299 | * @{ |
mbed_official | 340:28d1f895c6fe | 300 | */ |
mbed_official | 340:28d1f895c6fe | 301 | /* Peripheral State functions **************************************************/ |
mbed_official | 340:28d1f895c6fe | 302 | HAL_WWDG_StateTypeDef HAL_WWDG_GetState(WWDG_HandleTypeDef *hwwdg); |
mbed_official | 340:28d1f895c6fe | 303 | /** |
mbed_official | 340:28d1f895c6fe | 304 | * @} |
mbed_official | 340:28d1f895c6fe | 305 | */ |
mbed_official | 340:28d1f895c6fe | 306 | |
mbed_official | 340:28d1f895c6fe | 307 | /** |
mbed_official | 340:28d1f895c6fe | 308 | * @} |
mbed_official | 340:28d1f895c6fe | 309 | */ |
mbed_official | 340:28d1f895c6fe | 310 | |
mbed_official | 340:28d1f895c6fe | 311 | /** |
mbed_official | 340:28d1f895c6fe | 312 | * @} |
mbed_official | 340:28d1f895c6fe | 313 | */ |
mbed_official | 340:28d1f895c6fe | 314 | |
mbed_official | 340:28d1f895c6fe | 315 | /** |
mbed_official | 340:28d1f895c6fe | 316 | * @} |
mbed_official | 340:28d1f895c6fe | 317 | */ |
mbed_official | 340:28d1f895c6fe | 318 | |
mbed_official | 340:28d1f895c6fe | 319 | #ifdef __cplusplus |
mbed_official | 340:28d1f895c6fe | 320 | } |
mbed_official | 340:28d1f895c6fe | 321 | #endif |
mbed_official | 340:28d1f895c6fe | 322 | |
mbed_official | 340:28d1f895c6fe | 323 | #endif /* __STM32F0xx_HAL_WWDG_H */ |
mbed_official | 340:28d1f895c6fe | 324 | |
mbed_official | 340:28d1f895c6fe | 325 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ |