Dataloger
TARGET_NUCLEO_F072RB/stm32f0xx_hal_wwdg.h@0:666850d06c9f, 2015-08-20 (annotated)
- Committer:
- jhon309
- Date:
- Thu Aug 20 00:37:14 2015 +0000
- Revision:
- 0:666850d06c9f
ok
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
jhon309 | 0:666850d06c9f | 1 | /** |
jhon309 | 0:666850d06c9f | 2 | ****************************************************************************** |
jhon309 | 0:666850d06c9f | 3 | * @file stm32f0xx_hal_wwdg.h |
jhon309 | 0:666850d06c9f | 4 | * @author MCD Application Team |
jhon309 | 0:666850d06c9f | 5 | * @version V1.2.0 |
jhon309 | 0:666850d06c9f | 6 | * @date 11-December-2014 |
jhon309 | 0:666850d06c9f | 7 | * @brief Header file of WWDG HAL module. |
jhon309 | 0:666850d06c9f | 8 | ****************************************************************************** |
jhon309 | 0:666850d06c9f | 9 | * @attention |
jhon309 | 0:666850d06c9f | 10 | * |
jhon309 | 0:666850d06c9f | 11 | * <h2><center>© COPYRIGHT(c) 2014 STMicroelectronics</center></h2> |
jhon309 | 0:666850d06c9f | 12 | * |
jhon309 | 0:666850d06c9f | 13 | * Redistribution and use in source and binary forms, with or without modification, |
jhon309 | 0:666850d06c9f | 14 | * are permitted provided that the following conditions are met: |
jhon309 | 0:666850d06c9f | 15 | * 1. Redistributions of source code must retain the above copyright notice, |
jhon309 | 0:666850d06c9f | 16 | * this list of conditions and the following disclaimer. |
jhon309 | 0:666850d06c9f | 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, |
jhon309 | 0:666850d06c9f | 18 | * this list of conditions and the following disclaimer in the documentation |
jhon309 | 0:666850d06c9f | 19 | * and/or other materials provided with the distribution. |
jhon309 | 0:666850d06c9f | 20 | * 3. Neither the name of STMicroelectronics nor the names of its contributors |
jhon309 | 0:666850d06c9f | 21 | * may be used to endorse or promote products derived from this software |
jhon309 | 0:666850d06c9f | 22 | * without specific prior written permission. |
jhon309 | 0:666850d06c9f | 23 | * |
jhon309 | 0:666850d06c9f | 24 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
jhon309 | 0:666850d06c9f | 25 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
jhon309 | 0:666850d06c9f | 26 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
jhon309 | 0:666850d06c9f | 27 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE |
jhon309 | 0:666850d06c9f | 28 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
jhon309 | 0:666850d06c9f | 29 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
jhon309 | 0:666850d06c9f | 30 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
jhon309 | 0:666850d06c9f | 31 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
jhon309 | 0:666850d06c9f | 32 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
jhon309 | 0:666850d06c9f | 33 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
jhon309 | 0:666850d06c9f | 34 | * |
jhon309 | 0:666850d06c9f | 35 | ****************************************************************************** |
jhon309 | 0:666850d06c9f | 36 | */ |
jhon309 | 0:666850d06c9f | 37 | |
jhon309 | 0:666850d06c9f | 38 | /* Define to prevent recursive inclusion -------------------------------------*/ |
jhon309 | 0:666850d06c9f | 39 | #ifndef __STM32F0xx_HAL_WWDG_H |
jhon309 | 0:666850d06c9f | 40 | #define __STM32F0xx_HAL_WWDG_H |
jhon309 | 0:666850d06c9f | 41 | |
jhon309 | 0:666850d06c9f | 42 | #ifdef __cplusplus |
jhon309 | 0:666850d06c9f | 43 | extern "C" { |
jhon309 | 0:666850d06c9f | 44 | #endif |
jhon309 | 0:666850d06c9f | 45 | |
jhon309 | 0:666850d06c9f | 46 | /* Includes ------------------------------------------------------------------*/ |
jhon309 | 0:666850d06c9f | 47 | #include "stm32f0xx_hal_def.h" |
jhon309 | 0:666850d06c9f | 48 | |
jhon309 | 0:666850d06c9f | 49 | /** @addtogroup STM32F0xx_HAL_Driver |
jhon309 | 0:666850d06c9f | 50 | * @{ |
jhon309 | 0:666850d06c9f | 51 | */ |
jhon309 | 0:666850d06c9f | 52 | |
jhon309 | 0:666850d06c9f | 53 | /** @addtogroup WWDG |
jhon309 | 0:666850d06c9f | 54 | * @{ |
jhon309 | 0:666850d06c9f | 55 | */ |
jhon309 | 0:666850d06c9f | 56 | |
jhon309 | 0:666850d06c9f | 57 | /* Exported types ------------------------------------------------------------*/ |
jhon309 | 0:666850d06c9f | 58 | |
jhon309 | 0:666850d06c9f | 59 | /** @defgroup WWDG_Exported_Types WWDG Exported Types |
jhon309 | 0:666850d06c9f | 60 | * @{ |
jhon309 | 0:666850d06c9f | 61 | */ |
jhon309 | 0:666850d06c9f | 62 | |
jhon309 | 0:666850d06c9f | 63 | /** |
jhon309 | 0:666850d06c9f | 64 | * @brief WWDG HAL State Structure definition |
jhon309 | 0:666850d06c9f | 65 | */ |
jhon309 | 0:666850d06c9f | 66 | typedef enum |
jhon309 | 0:666850d06c9f | 67 | { |
jhon309 | 0:666850d06c9f | 68 | HAL_WWDG_STATE_RESET = 0x00, /*!< WWDG not yet initialized or disabled */ |
jhon309 | 0:666850d06c9f | 69 | HAL_WWDG_STATE_READY = 0x01, /*!< WWDG initialized and ready for use */ |
jhon309 | 0:666850d06c9f | 70 | HAL_WWDG_STATE_BUSY = 0x02, /*!< WWDG internal process is ongoing */ |
jhon309 | 0:666850d06c9f | 71 | HAL_WWDG_STATE_TIMEOUT = 0x03, /*!< WWDG timeout state */ |
jhon309 | 0:666850d06c9f | 72 | HAL_WWDG_STATE_ERROR = 0x04 /*!< WWDG error state */ |
jhon309 | 0:666850d06c9f | 73 | }HAL_WWDG_StateTypeDef; |
jhon309 | 0:666850d06c9f | 74 | |
jhon309 | 0:666850d06c9f | 75 | /** |
jhon309 | 0:666850d06c9f | 76 | * @brief WWDG Init structure definition |
jhon309 | 0:666850d06c9f | 77 | */ |
jhon309 | 0:666850d06c9f | 78 | typedef struct |
jhon309 | 0:666850d06c9f | 79 | { |
jhon309 | 0:666850d06c9f | 80 | uint32_t Prescaler; /*!< Specifies the prescaler value of the WWDG. |
jhon309 | 0:666850d06c9f | 81 | This parameter can be a value of @ref WWDG_Prescaler */ |
jhon309 | 0:666850d06c9f | 82 | |
jhon309 | 0:666850d06c9f | 83 | uint32_t Window; /*!< Specifies the WWDG window value to be compared to the downcounter. |
jhon309 | 0:666850d06c9f | 84 | This parameter must be a number lower than Max_Data = 0x80 */ |
jhon309 | 0:666850d06c9f | 85 | |
jhon309 | 0:666850d06c9f | 86 | uint32_t Counter; /*!< Specifies the WWDG free-running downcounter value. |
jhon309 | 0:666850d06c9f | 87 | This parameter must be a number between Min_Data = 0x40 and Max_Data = 0x7F */ |
jhon309 | 0:666850d06c9f | 88 | |
jhon309 | 0:666850d06c9f | 89 | } WWDG_InitTypeDef; |
jhon309 | 0:666850d06c9f | 90 | |
jhon309 | 0:666850d06c9f | 91 | /** |
jhon309 | 0:666850d06c9f | 92 | * @brief WWDG handle Structure definition |
jhon309 | 0:666850d06c9f | 93 | */ |
jhon309 | 0:666850d06c9f | 94 | typedef struct |
jhon309 | 0:666850d06c9f | 95 | { |
jhon309 | 0:666850d06c9f | 96 | WWDG_TypeDef *Instance; /*!< Register base address */ |
jhon309 | 0:666850d06c9f | 97 | |
jhon309 | 0:666850d06c9f | 98 | WWDG_InitTypeDef Init; /*!< WWDG required parameters */ |
jhon309 | 0:666850d06c9f | 99 | |
jhon309 | 0:666850d06c9f | 100 | HAL_LockTypeDef Lock; /*!< WWDG locking object */ |
jhon309 | 0:666850d06c9f | 101 | |
jhon309 | 0:666850d06c9f | 102 | __IO HAL_WWDG_StateTypeDef State; /*!< WWDG communication state */ |
jhon309 | 0:666850d06c9f | 103 | |
jhon309 | 0:666850d06c9f | 104 | } WWDG_HandleTypeDef; |
jhon309 | 0:666850d06c9f | 105 | |
jhon309 | 0:666850d06c9f | 106 | /** |
jhon309 | 0:666850d06c9f | 107 | * @} |
jhon309 | 0:666850d06c9f | 108 | */ |
jhon309 | 0:666850d06c9f | 109 | |
jhon309 | 0:666850d06c9f | 110 | /* Exported constants --------------------------------------------------------*/ |
jhon309 | 0:666850d06c9f | 111 | |
jhon309 | 0:666850d06c9f | 112 | /** @defgroup WWDG_Exported_Constants WWDG Exported Constants |
jhon309 | 0:666850d06c9f | 113 | * @{ |
jhon309 | 0:666850d06c9f | 114 | */ |
jhon309 | 0:666850d06c9f | 115 | |
jhon309 | 0:666850d06c9f | 116 | /** @defgroup WWDG_Interrupt_definition WWDG Interrupt definition |
jhon309 | 0:666850d06c9f | 117 | * @{ |
jhon309 | 0:666850d06c9f | 118 | */ |
jhon309 | 0:666850d06c9f | 119 | #define WWDG_IT_EWI WWDG_CFR_EWI /*!< Early wakeup interrupt */ |
jhon309 | 0:666850d06c9f | 120 | /** |
jhon309 | 0:666850d06c9f | 121 | * @} |
jhon309 | 0:666850d06c9f | 122 | */ |
jhon309 | 0:666850d06c9f | 123 | |
jhon309 | 0:666850d06c9f | 124 | /** @defgroup WWDG_Flag_definition WWDG Flag definition |
jhon309 | 0:666850d06c9f | 125 | * @brief WWDG Flag definition |
jhon309 | 0:666850d06c9f | 126 | * @{ |
jhon309 | 0:666850d06c9f | 127 | */ |
jhon309 | 0:666850d06c9f | 128 | #define WWDG_FLAG_EWIF WWDG_SR_EWIF /*!< Early wakeup interrupt flag */ |
jhon309 | 0:666850d06c9f | 129 | /** |
jhon309 | 0:666850d06c9f | 130 | * @} |
jhon309 | 0:666850d06c9f | 131 | */ |
jhon309 | 0:666850d06c9f | 132 | |
jhon309 | 0:666850d06c9f | 133 | /** @defgroup WWDG_Prescaler WWDG Prescaler |
jhon309 | 0:666850d06c9f | 134 | * @{ |
jhon309 | 0:666850d06c9f | 135 | */ |
jhon309 | 0:666850d06c9f | 136 | #define WWDG_PRESCALER_1 ((uint32_t)0x00000000) /*!< WWDG counter clock = (PCLK1/4096)/1 */ |
jhon309 | 0:666850d06c9f | 137 | #define WWDG_PRESCALER_2 WWDG_CFR_WDGTB0 /*!< WWDG counter clock = (PCLK1/4096)/2 */ |
jhon309 | 0:666850d06c9f | 138 | #define WWDG_PRESCALER_4 WWDG_CFR_WDGTB1 /*!< WWDG counter clock = (PCLK1/4096)/4 */ |
jhon309 | 0:666850d06c9f | 139 | #define WWDG_PRESCALER_8 WWDG_CFR_WDGTB /*!< WWDG counter clock = (PCLK1/4096)/8 */ |
jhon309 | 0:666850d06c9f | 140 | |
jhon309 | 0:666850d06c9f | 141 | #define IS_WWDG_PRESCALER(__PRESCALER__) (((__PRESCALER__) == WWDG_PRESCALER_1) || \ |
jhon309 | 0:666850d06c9f | 142 | ((__PRESCALER__) == WWDG_PRESCALER_2) || \ |
jhon309 | 0:666850d06c9f | 143 | ((__PRESCALER__) == WWDG_PRESCALER_4) || \ |
jhon309 | 0:666850d06c9f | 144 | ((__PRESCALER__) == WWDG_PRESCALER_8)) |
jhon309 | 0:666850d06c9f | 145 | /** |
jhon309 | 0:666850d06c9f | 146 | * @} |
jhon309 | 0:666850d06c9f | 147 | */ |
jhon309 | 0:666850d06c9f | 148 | |
jhon309 | 0:666850d06c9f | 149 | /** @defgroup WWDG_Window WWDG Window |
jhon309 | 0:666850d06c9f | 150 | * @{ |
jhon309 | 0:666850d06c9f | 151 | */ |
jhon309 | 0:666850d06c9f | 152 | #define IS_WWDG_WINDOW(__WINDOW__) ((__WINDOW__) <= 0x7F) |
jhon309 | 0:666850d06c9f | 153 | /** |
jhon309 | 0:666850d06c9f | 154 | * @} |
jhon309 | 0:666850d06c9f | 155 | */ |
jhon309 | 0:666850d06c9f | 156 | |
jhon309 | 0:666850d06c9f | 157 | /** @defgroup WWDG_Counter WWDG Counter |
jhon309 | 0:666850d06c9f | 158 | * @{ |
jhon309 | 0:666850d06c9f | 159 | */ |
jhon309 | 0:666850d06c9f | 160 | #define IS_WWDG_COUNTER(__COUNTER__) (((__COUNTER__) >= 0x40) && ((__COUNTER__) <= 0x7F)) |
jhon309 | 0:666850d06c9f | 161 | /** |
jhon309 | 0:666850d06c9f | 162 | * @} |
jhon309 | 0:666850d06c9f | 163 | */ |
jhon309 | 0:666850d06c9f | 164 | |
jhon309 | 0:666850d06c9f | 165 | /** |
jhon309 | 0:666850d06c9f | 166 | * @} |
jhon309 | 0:666850d06c9f | 167 | */ |
jhon309 | 0:666850d06c9f | 168 | |
jhon309 | 0:666850d06c9f | 169 | /* Exported macro ------------------------------------------------------------*/ |
jhon309 | 0:666850d06c9f | 170 | |
jhon309 | 0:666850d06c9f | 171 | /** @defgroup WWDG_Exported_Macros WWDG Exported Macros |
jhon309 | 0:666850d06c9f | 172 | * @{ |
jhon309 | 0:666850d06c9f | 173 | */ |
jhon309 | 0:666850d06c9f | 174 | |
jhon309 | 0:666850d06c9f | 175 | /** @brief Reset WWDG handle state |
jhon309 | 0:666850d06c9f | 176 | * @param __HANDLE__: WWDG handle |
jhon309 | 0:666850d06c9f | 177 | * @retval None |
jhon309 | 0:666850d06c9f | 178 | */ |
jhon309 | 0:666850d06c9f | 179 | #define __HAL_WWDG_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_WWDG_STATE_RESET) |
jhon309 | 0:666850d06c9f | 180 | |
jhon309 | 0:666850d06c9f | 181 | /** |
jhon309 | 0:666850d06c9f | 182 | * @brief Enables the WWDG peripheral. |
jhon309 | 0:666850d06c9f | 183 | * @param __HANDLE__: WWDG handle |
jhon309 | 0:666850d06c9f | 184 | * @retval None |
jhon309 | 0:666850d06c9f | 185 | */ |
jhon309 | 0:666850d06c9f | 186 | #define __HAL_WWDG_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->CR |= WWDG_CR_WDGA) |
jhon309 | 0:666850d06c9f | 187 | |
jhon309 | 0:666850d06c9f | 188 | /** |
jhon309 | 0:666850d06c9f | 189 | * @brief Disables the WWDG peripheral. |
jhon309 | 0:666850d06c9f | 190 | * @param __HANDLE__: WWDG handle |
jhon309 | 0:666850d06c9f | 191 | * @note WARNING: This is a dummy macro for HAL code alignment. |
jhon309 | 0:666850d06c9f | 192 | * Once enable, WWDG Peripheral cannot be disabled except by a system reset. |
jhon309 | 0:666850d06c9f | 193 | * @retval None |
jhon309 | 0:666850d06c9f | 194 | */ |
jhon309 | 0:666850d06c9f | 195 | #define __HAL_WWDG_DISABLE(__HANDLE__) /* dummy macro */ |
jhon309 | 0:666850d06c9f | 196 | |
jhon309 | 0:666850d06c9f | 197 | /** |
jhon309 | 0:666850d06c9f | 198 | * @brief Enables the WWDG early wakeup interrupt. |
jhon309 | 0:666850d06c9f | 199 | * @param __HANDLE__: WWDG handle |
jhon309 | 0:666850d06c9f | 200 | * @param __INTERRUPT__: specifies the interrupt to enable. |
jhon309 | 0:666850d06c9f | 201 | * This parameter can be one of the following values: |
jhon309 | 0:666850d06c9f | 202 | * @arg WWDG_IT_EWI: Early wakeup interrupt |
jhon309 | 0:666850d06c9f | 203 | * @note Once enabled this interrupt cannot be disabled except by a system reset. |
jhon309 | 0:666850d06c9f | 204 | * @retval None |
jhon309 | 0:666850d06c9f | 205 | */ |
jhon309 | 0:666850d06c9f | 206 | #define __HAL_WWDG_ENABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->CFR |= (__INTERRUPT__)) |
jhon309 | 0:666850d06c9f | 207 | |
jhon309 | 0:666850d06c9f | 208 | /** |
jhon309 | 0:666850d06c9f | 209 | * @brief Disables the WWDG early wakeup interrupt. |
jhon309 | 0:666850d06c9f | 210 | * @param __HANDLE__: WWDG handle |
jhon309 | 0:666850d06c9f | 211 | * @param __INTERRUPT__: specifies the interrupt to disable. |
jhon309 | 0:666850d06c9f | 212 | * This parameter can be one of the following values: |
jhon309 | 0:666850d06c9f | 213 | * @arg WWDG_IT_EWI: Early wakeup interrupt |
jhon309 | 0:666850d06c9f | 214 | * @note WARNING: This is a dummy macro for HAL code alignment. |
jhon309 | 0:666850d06c9f | 215 | * Once enabled this interrupt cannot be disabled except by a system reset. |
jhon309 | 0:666850d06c9f | 216 | * @retval None |
jhon309 | 0:666850d06c9f | 217 | */ |
jhon309 | 0:666850d06c9f | 218 | #define __HAL_WWDG_DISABLE_IT(__HANDLE__, __INTERRUPT__) /* dummy macro */ |
jhon309 | 0:666850d06c9f | 219 | |
jhon309 | 0:666850d06c9f | 220 | /** |
jhon309 | 0:666850d06c9f | 221 | * @brief Gets the selected WWDG's it status. |
jhon309 | 0:666850d06c9f | 222 | * @param __HANDLE__: WWDG handle |
jhon309 | 0:666850d06c9f | 223 | * @param __INTERRUPT__: specifies the it to check. |
jhon309 | 0:666850d06c9f | 224 | * This parameter can be one of the following values: |
jhon309 | 0:666850d06c9f | 225 | * @arg WWDG_FLAG_EWIF: Early wakeup interrupt IT |
jhon309 | 0:666850d06c9f | 226 | * @retval The new state of WWDG_FLAG (SET or RESET). |
jhon309 | 0:666850d06c9f | 227 | */ |
jhon309 | 0:666850d06c9f | 228 | #define __HAL_WWDG_GET_IT(__HANDLE__, __INTERRUPT__) (((__HANDLE__)->Instance->SR & (__INTERRUPT__)) == (__INTERRUPT__)) |
jhon309 | 0:666850d06c9f | 229 | |
jhon309 | 0:666850d06c9f | 230 | /** @brief Clear the WWDG's interrupt pending bits |
jhon309 | 0:666850d06c9f | 231 | * bits to clear the selected interrupt pending bits. |
jhon309 | 0:666850d06c9f | 232 | * @param __HANDLE__: WWDG handle |
jhon309 | 0:666850d06c9f | 233 | * @param __INTERRUPT__: specifies the interrupt pending bit to clear. |
jhon309 | 0:666850d06c9f | 234 | * This parameter can be one of the following values: |
jhon309 | 0:666850d06c9f | 235 | * @arg WWDG_FLAG_EWIF: Early wakeup interrupt flag |
jhon309 | 0:666850d06c9f | 236 | */ |
jhon309 | 0:666850d06c9f | 237 | #define __HAL_WWDG_CLEAR_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->SR = ~(__INTERRUPT__)) |
jhon309 | 0:666850d06c9f | 238 | |
jhon309 | 0:666850d06c9f | 239 | /** |
jhon309 | 0:666850d06c9f | 240 | * @brief Gets the selected WWDG's flag status. |
jhon309 | 0:666850d06c9f | 241 | * @param __HANDLE__: WWDG handle |
jhon309 | 0:666850d06c9f | 242 | * @param __FLAG__: specifies the flag to check. |
jhon309 | 0:666850d06c9f | 243 | * This parameter can be one of the following values: |
jhon309 | 0:666850d06c9f | 244 | * @arg WWDG_FLAG_EWIF: Early wakeup interrupt flag |
jhon309 | 0:666850d06c9f | 245 | * @retval The new state of WWDG_FLAG (SET or RESET). |
jhon309 | 0:666850d06c9f | 246 | */ |
jhon309 | 0:666850d06c9f | 247 | #define __HAL_WWDG_GET_FLAG(__HANDLE__, __FLAG__) (((__HANDLE__)->Instance->SR & (__FLAG__)) == (__FLAG__)) |
jhon309 | 0:666850d06c9f | 248 | |
jhon309 | 0:666850d06c9f | 249 | /** |
jhon309 | 0:666850d06c9f | 250 | * @brief Clears the WWDG's pending flags. |
jhon309 | 0:666850d06c9f | 251 | * @param __HANDLE__: WWDG handle |
jhon309 | 0:666850d06c9f | 252 | * @param __FLAG__: specifies the flag to clear. |
jhon309 | 0:666850d06c9f | 253 | * This parameter can be one of the following values: |
jhon309 | 0:666850d06c9f | 254 | * @arg WWDG_FLAG_EWIF: Early wakeup interrupt flag |
jhon309 | 0:666850d06c9f | 255 | * @retval None |
jhon309 | 0:666850d06c9f | 256 | */ |
jhon309 | 0:666850d06c9f | 257 | #define __HAL_WWDG_CLEAR_FLAG(__HANDLE__, __FLAG__) ((__HANDLE__)->Instance->SR = ~(__FLAG__)) |
jhon309 | 0:666850d06c9f | 258 | |
jhon309 | 0:666850d06c9f | 259 | /** @brief Checks if the specified WWDG interrupt source is enabled or disabled. |
jhon309 | 0:666850d06c9f | 260 | * @param __HANDLE__: WWDG Handle. |
jhon309 | 0:666850d06c9f | 261 | * @param __INTERRUPT__: specifies the WWDG interrupt source to check. |
jhon309 | 0:666850d06c9f | 262 | * This parameter can be one of the following values: |
jhon309 | 0:666850d06c9f | 263 | * @arg WWDG_IT_EWI: Early Wakeup Interrupt |
jhon309 | 0:666850d06c9f | 264 | * @retval state of __INTERRUPT__ (TRUE or FALSE). |
jhon309 | 0:666850d06c9f | 265 | */ |
jhon309 | 0:666850d06c9f | 266 | #define __HAL_WWDG_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__) (((__HANDLE__)->Instance->CFR & (__INTERRUPT__)) == (__INTERRUPT__)) |
jhon309 | 0:666850d06c9f | 267 | |
jhon309 | 0:666850d06c9f | 268 | /** |
jhon309 | 0:666850d06c9f | 269 | * @} |
jhon309 | 0:666850d06c9f | 270 | */ |
jhon309 | 0:666850d06c9f | 271 | |
jhon309 | 0:666850d06c9f | 272 | /* Exported functions --------------------------------------------------------*/ |
jhon309 | 0:666850d06c9f | 273 | |
jhon309 | 0:666850d06c9f | 274 | /** @addtogroup WWDG_Exported_Functions |
jhon309 | 0:666850d06c9f | 275 | * @{ |
jhon309 | 0:666850d06c9f | 276 | */ |
jhon309 | 0:666850d06c9f | 277 | |
jhon309 | 0:666850d06c9f | 278 | /** @addtogroup WWDG_Exported_Functions_Group1 |
jhon309 | 0:666850d06c9f | 279 | * @{ |
jhon309 | 0:666850d06c9f | 280 | */ |
jhon309 | 0:666850d06c9f | 281 | /* Initialization/de-initialization functions **********************************/ |
jhon309 | 0:666850d06c9f | 282 | HAL_StatusTypeDef HAL_WWDG_Init(WWDG_HandleTypeDef *hwwdg); |
jhon309 | 0:666850d06c9f | 283 | HAL_StatusTypeDef HAL_WWDG_DeInit(WWDG_HandleTypeDef *hwwdg); |
jhon309 | 0:666850d06c9f | 284 | void HAL_WWDG_MspInit(WWDG_HandleTypeDef *hwwdg); |
jhon309 | 0:666850d06c9f | 285 | void HAL_WWDG_MspDeInit(WWDG_HandleTypeDef *hwwdg); |
jhon309 | 0:666850d06c9f | 286 | void HAL_WWDG_WakeupCallback(WWDG_HandleTypeDef* hwwdg); |
jhon309 | 0:666850d06c9f | 287 | |
jhon309 | 0:666850d06c9f | 288 | /** |
jhon309 | 0:666850d06c9f | 289 | * @} |
jhon309 | 0:666850d06c9f | 290 | */ |
jhon309 | 0:666850d06c9f | 291 | |
jhon309 | 0:666850d06c9f | 292 | /** @addtogroup WWDG_Exported_Functions_Group2 |
jhon309 | 0:666850d06c9f | 293 | * @{ |
jhon309 | 0:666850d06c9f | 294 | */ |
jhon309 | 0:666850d06c9f | 295 | /* I/O operation functions ******************************************************/ |
jhon309 | 0:666850d06c9f | 296 | HAL_StatusTypeDef HAL_WWDG_Start(WWDG_HandleTypeDef *hwwdg); |
jhon309 | 0:666850d06c9f | 297 | HAL_StatusTypeDef HAL_WWDG_Start_IT(WWDG_HandleTypeDef *hwwdg); |
jhon309 | 0:666850d06c9f | 298 | HAL_StatusTypeDef HAL_WWDG_Refresh(WWDG_HandleTypeDef *hwwdg, uint32_t Counter); |
jhon309 | 0:666850d06c9f | 299 | void HAL_WWDG_IRQHandler(WWDG_HandleTypeDef *hwwdg); |
jhon309 | 0:666850d06c9f | 300 | |
jhon309 | 0:666850d06c9f | 301 | /** |
jhon309 | 0:666850d06c9f | 302 | * @} |
jhon309 | 0:666850d06c9f | 303 | */ |
jhon309 | 0:666850d06c9f | 304 | |
jhon309 | 0:666850d06c9f | 305 | /** @addtogroup WWDG_Exported_Functions_Group3 |
jhon309 | 0:666850d06c9f | 306 | * @{ |
jhon309 | 0:666850d06c9f | 307 | */ |
jhon309 | 0:666850d06c9f | 308 | /* Peripheral State functions **************************************************/ |
jhon309 | 0:666850d06c9f | 309 | HAL_WWDG_StateTypeDef HAL_WWDG_GetState(WWDG_HandleTypeDef *hwwdg); |
jhon309 | 0:666850d06c9f | 310 | |
jhon309 | 0:666850d06c9f | 311 | /** |
jhon309 | 0:666850d06c9f | 312 | * @} |
jhon309 | 0:666850d06c9f | 313 | */ |
jhon309 | 0:666850d06c9f | 314 | |
jhon309 | 0:666850d06c9f | 315 | /** |
jhon309 | 0:666850d06c9f | 316 | * @} |
jhon309 | 0:666850d06c9f | 317 | */ |
jhon309 | 0:666850d06c9f | 318 | |
jhon309 | 0:666850d06c9f | 319 | /** |
jhon309 | 0:666850d06c9f | 320 | * @} |
jhon309 | 0:666850d06c9f | 321 | */ |
jhon309 | 0:666850d06c9f | 322 | |
jhon309 | 0:666850d06c9f | 323 | /** |
jhon309 | 0:666850d06c9f | 324 | * @} |
jhon309 | 0:666850d06c9f | 325 | */ |
jhon309 | 0:666850d06c9f | 326 | |
jhon309 | 0:666850d06c9f | 327 | #ifdef __cplusplus |
jhon309 | 0:666850d06c9f | 328 | } |
jhon309 | 0:666850d06c9f | 329 | #endif |
jhon309 | 0:666850d06c9f | 330 | |
jhon309 | 0:666850d06c9f | 331 | #endif /* __STM32F0xx_HAL_WWDG_H */ |
jhon309 | 0:666850d06c9f | 332 | |
jhon309 | 0:666850d06c9f | 333 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ |
jhon309 | 0:666850d06c9f | 334 |