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