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