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