meh

Fork of mbed by mbed official

Committer:
Kojto
Date:
Wed Nov 25 13:21:40 2015 +0000
Revision:
110:165afa46840b
Parent:
106:ba1f97679dad
Release 110  of the mbed library

Changes:
- new platforms - STM32F410R, DISCO_F429ZI, DISCO_F469NI
- Nucleo L476 - gcc and uvision template
- k22,k64f targets - ADC channels A addition
- EFM32 - bugfixes in sleep, serial and spi
- Delta DFCM NNN40 - pinnames update

Who changed what in which revision?

UserRevisionLine numberNew contents of line
emilmont 77:869cf507173a 1 /**
emilmont 77:869cf507173a 2 ******************************************************************************
emilmont 77:869cf507173a 3 * @file stm32f4xx_hal_wwdg.h
emilmont 77:869cf507173a 4 * @author MCD Application Team
Kojto 110:165afa46840b 5 * @version V1.4.1
Kojto 110:165afa46840b 6 * @date 09-October-2015
emilmont 77:869cf507173a 7 * @brief Header file of WWDG HAL module.
emilmont 77:869cf507173a 8 ******************************************************************************
emilmont 77:869cf507173a 9 * @attention
emilmont 77:869cf507173a 10 *
Kojto 99:dbbf35b96557 11 * <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2>
emilmont 77:869cf507173a 12 *
emilmont 77:869cf507173a 13 * Redistribution and use in source and binary forms, with or without modification,
emilmont 77:869cf507173a 14 * are permitted provided that the following conditions are met:
emilmont 77:869cf507173a 15 * 1. Redistributions of source code must retain the above copyright notice,
emilmont 77:869cf507173a 16 * this list of conditions and the following disclaimer.
emilmont 77:869cf507173a 17 * 2. Redistributions in binary form must reproduce the above copyright notice,
emilmont 77:869cf507173a 18 * this list of conditions and the following disclaimer in the documentation
emilmont 77:869cf507173a 19 * and/or other materials provided with the distribution.
emilmont 77:869cf507173a 20 * 3. Neither the name of STMicroelectronics nor the names of its contributors
emilmont 77:869cf507173a 21 * may be used to endorse or promote products derived from this software
emilmont 77:869cf507173a 22 * without specific prior written permission.
emilmont 77:869cf507173a 23 *
emilmont 77:869cf507173a 24 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
emilmont 77:869cf507173a 25 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
emilmont 77:869cf507173a 26 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
emilmont 77:869cf507173a 27 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
emilmont 77:869cf507173a 28 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
emilmont 77:869cf507173a 29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
emilmont 77:869cf507173a 30 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
emilmont 77:869cf507173a 31 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
emilmont 77:869cf507173a 32 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
emilmont 77:869cf507173a 33 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
emilmont 77:869cf507173a 34 *
emilmont 77:869cf507173a 35 ******************************************************************************
emilmont 77:869cf507173a 36 */
emilmont 77:869cf507173a 37
emilmont 77:869cf507173a 38 /* Define to prevent recursive inclusion -------------------------------------*/
emilmont 77:869cf507173a 39 #ifndef __STM32F4xx_HAL_WWDG_H
emilmont 77:869cf507173a 40 #define __STM32F4xx_HAL_WWDG_H
emilmont 77:869cf507173a 41
emilmont 77:869cf507173a 42 #ifdef __cplusplus
emilmont 77:869cf507173a 43 extern "C" {
emilmont 77:869cf507173a 44 #endif
emilmont 77:869cf507173a 45
emilmont 77:869cf507173a 46 /* Includes ------------------------------------------------------------------*/
emilmont 77:869cf507173a 47 #include "stm32f4xx_hal_def.h"
emilmont 77:869cf507173a 48
emilmont 77:869cf507173a 49 /** @addtogroup STM32F4xx_HAL_Driver
emilmont 77:869cf507173a 50 * @{
emilmont 77:869cf507173a 51 */
emilmont 77:869cf507173a 52
emilmont 77:869cf507173a 53 /** @addtogroup WWDG
emilmont 77:869cf507173a 54 * @{
emilmont 77:869cf507173a 55 */
emilmont 77:869cf507173a 56
Kojto 90:cb3d968589d8 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
Kojto 90:cb3d968589d8 62 /**
Kojto 90:cb3d968589d8 63 * @brief WWDG HAL State Structure definition
Kojto 90:cb3d968589d8 64 */
emilmont 77:869cf507173a 65 typedef enum
emilmont 77:869cf507173a 66 {
emilmont 77:869cf507173a 67 HAL_WWDG_STATE_RESET = 0x00, /*!< WWDG not yet initialized or disabled */
emilmont 77:869cf507173a 68 HAL_WWDG_STATE_READY = 0x01, /*!< WWDG initialized and ready for use */
Kojto 90:cb3d968589d8 69 HAL_WWDG_STATE_BUSY = 0x02, /*!< WWDG internal process is ongoing */
emilmont 77:869cf507173a 70 HAL_WWDG_STATE_TIMEOUT = 0x03, /*!< WWDG timeout state */
emilmont 77:869cf507173a 71 HAL_WWDG_STATE_ERROR = 0x04 /*!< WWDG error state */
emilmont 77:869cf507173a 72 }HAL_WWDG_StateTypeDef;
emilmont 77:869cf507173a 73
emilmont 77:869cf507173a 74 /**
emilmont 77:869cf507173a 75 * @brief WWDG Init structure definition
emilmont 77:869cf507173a 76 */
emilmont 77:869cf507173a 77 typedef struct
emilmont 77:869cf507173a 78 {
Kojto 90:cb3d968589d8 79 uint32_t Prescaler; /*!< Specifies the prescaler value of the WWDG.
emilmont 77:869cf507173a 80 This parameter can be a value of @ref WWDG_Prescaler */
emilmont 77:869cf507173a 81
emilmont 77:869cf507173a 82 uint32_t Window; /*!< Specifies the WWDG window value to be compared to the downcounter.
emilmont 77:869cf507173a 83 This parameter must be a number lower than Max_Data = 0x80 */
emilmont 77:869cf507173a 84
bogdanm 85:024bf7f99721 85 uint32_t Counter; /*!< Specifies the WWDG free-running downcounter value.
Kojto 90:cb3d968589d8 86 This parameter must be a number between Min_Data = 0x40 and Max_Data = 0x7F */
emilmont 77:869cf507173a 87
emilmont 77:869cf507173a 88 }WWDG_InitTypeDef;
emilmont 77:869cf507173a 89
emilmont 77:869cf507173a 90 /**
emilmont 77:869cf507173a 91 * @brief WWDG handle Structure definition
emilmont 77:869cf507173a 92 */
emilmont 77:869cf507173a 93 typedef struct
emilmont 77:869cf507173a 94 {
Kojto 90:cb3d968589d8 95 WWDG_TypeDef *Instance; /*!< Register base address */
emilmont 77:869cf507173a 96
emilmont 77:869cf507173a 97 WWDG_InitTypeDef Init; /*!< WWDG required parameters */
emilmont 77:869cf507173a 98
emilmont 77:869cf507173a 99 HAL_LockTypeDef Lock; /*!< WWDG locking object */
emilmont 77:869cf507173a 100
emilmont 77:869cf507173a 101 __IO HAL_WWDG_StateTypeDef State; /*!< WWDG communication state */
emilmont 77:869cf507173a 102
emilmont 77:869cf507173a 103 }WWDG_HandleTypeDef;
Kojto 99:dbbf35b96557 104 /**
Kojto 99:dbbf35b96557 105 * @}
Kojto 99:dbbf35b96557 106 */
emilmont 77:869cf507173a 107
emilmont 77:869cf507173a 108 /* Exported constants --------------------------------------------------------*/
Kojto 99:dbbf35b96557 109 /** @defgroup WWDG_Exported_Constants WWDG Exported Constants
emilmont 77:869cf507173a 110 * @{
emilmont 77:869cf507173a 111 */
emilmont 77:869cf507173a 112
Kojto 99:dbbf35b96557 113 /** @defgroup WWDG_Interrupt_definition WWDG Interrupt definition
emilmont 77:869cf507173a 114 * @{
emilmont 77:869cf507173a 115 */
Kojto 99:dbbf35b96557 116 #define WWDG_IT_EWI WWDG_CFR_EWI /*!< Early wakeup interrupt */
emilmont 77:869cf507173a 117 /**
emilmont 77:869cf507173a 118 * @}
emilmont 77:869cf507173a 119 */
emilmont 77:869cf507173a 120
Kojto 99:dbbf35b96557 121 /** @defgroup WWDG_Flag_definition WWDG Flag definition
emilmont 77:869cf507173a 122 * @brief WWDG Flag definition
emilmont 77:869cf507173a 123 * @{
emilmont 77:869cf507173a 124 */
Kojto 99:dbbf35b96557 125 #define WWDG_FLAG_EWIF WWDG_SR_EWIF /*!< Early wakeup interrupt flag */
emilmont 77:869cf507173a 126 /**
emilmont 77:869cf507173a 127 * @}
emilmont 77:869cf507173a 128 */
bogdanm 85:024bf7f99721 129
Kojto 99:dbbf35b96557 130 /** @defgroup WWDG_Prescaler WWDG Prescaler
emilmont 77:869cf507173a 131 * @{
emilmont 77:869cf507173a 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 */
emilmont 77:869cf507173a 137 /**
emilmont 77:869cf507173a 138 * @}
emilmont 77:869cf507173a 139 */
emilmont 77:869cf507173a 140
emilmont 77:869cf507173a 141 /**
emilmont 77:869cf507173a 142 * @}
emilmont 77:869cf507173a 143 */
emilmont 77:869cf507173a 144
bogdanm 85:024bf7f99721 145 /* Exported macro ------------------------------------------------------------*/
Kojto 99:dbbf35b96557 146 /** @defgroup WWDG_Exported_Macros WWDG Exported Macros
Kojto 99:dbbf35b96557 147 * @{
Kojto 99:dbbf35b96557 148 */
bogdanm 85:024bf7f99721 149
bogdanm 85:024bf7f99721 150 /** @brief Reset WWDG handle state
bogdanm 85:024bf7f99721 151 * @param __HANDLE__: WWDG handle
bogdanm 85:024bf7f99721 152 * @retval None
emilmont 77:869cf507173a 153 */
bogdanm 85:024bf7f99721 154 #define __HAL_WWDG_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_WWDG_STATE_RESET)
emilmont 77:869cf507173a 155
emilmont 77:869cf507173a 156 /**
emilmont 77:869cf507173a 157 * @brief Enables the WWDG peripheral.
emilmont 77:869cf507173a 158 * @param __HANDLE__: WWDG handle
emilmont 77:869cf507173a 159 * @retval None
emilmont 77:869cf507173a 160 */
Kojto 90:cb3d968589d8 161 #define __HAL_WWDG_ENABLE(__HANDLE__) SET_BIT((__HANDLE__)->Instance->CR, WWDG_CR_WDGA)
emilmont 77:869cf507173a 162
emilmont 77:869cf507173a 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 /**
emilmont 77:869cf507173a 215 * @brief Gets the selected WWDG's flag status.
emilmont 77:869cf507173a 216 * @param __HANDLE__: WWDG handle
emilmont 77:869cf507173a 217 * @param __FLAG__: specifies the flag to check.
emilmont 77:869cf507173a 218 * This parameter can be one of the following values:
emilmont 77:869cf507173a 219 * @arg WWDG_FLAG_EWIF: Early wakeup interrupt flag
emilmont 77:869cf507173a 220 * @retval The new state of WWDG_FLAG (SET or RESET).
emilmont 77:869cf507173a 221 */
emilmont 77:869cf507173a 222 #define __HAL_WWDG_GET_FLAG(__HANDLE__, __FLAG__) (((__HANDLE__)->Instance->SR & (__FLAG__)) == (__FLAG__))
emilmont 77:869cf507173a 223
emilmont 77:869cf507173a 224 /**
emilmont 77:869cf507173a 225 * @brief Clears the WWDG's pending flags.
emilmont 77:869cf507173a 226 * @param __HANDLE__: WWDG handle
emilmont 77:869cf507173a 227 * @param __FLAG__: specifies the flag to clear.
emilmont 77:869cf507173a 228 * This parameter can be one of the following values:
emilmont 77:869cf507173a 229 * @arg WWDG_FLAG_EWIF: Early wakeup interrupt flag
emilmont 77:869cf507173a 230 * @retval None
emilmont 77:869cf507173a 231 */
Kojto 90:cb3d968589d8 232 #define __HAL_WWDG_CLEAR_FLAG(__HANDLE__, __FLAG__) (((__HANDLE__)->Instance->SR) = ~(__FLAG__))
emilmont 77:869cf507173a 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).
emilmont 77:869cf507173a 240 */
Kojto 99:dbbf35b96557 241 #define __HAL_WWDG_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__) (((__HANDLE__)->Instance->CFR & (__INTERRUPT__)) == (__INTERRUPT__))
emilmont 77:869cf507173a 242
Kojto 99:dbbf35b96557 243 /**
Kojto 99:dbbf35b96557 244 * @}
Kojto 90:cb3d968589d8 245 */
Kojto 99:dbbf35b96557 246
emilmont 77:869cf507173a 247 /* Exported functions --------------------------------------------------------*/
Kojto 99:dbbf35b96557 248 /** @addtogroup WWDG_Exported_Functions
Kojto 99:dbbf35b96557 249 * @{
Kojto 99:dbbf35b96557 250 */
emilmont 77:869cf507173a 251
Kojto 99:dbbf35b96557 252 /** @addtogroup WWDG_Exported_Functions_Group1
Kojto 99:dbbf35b96557 253 * @{
Kojto 99:dbbf35b96557 254 */
emilmont 77:869cf507173a 255 /* Initialization/de-initialization functions **********************************/
emilmont 77:869cf507173a 256 HAL_StatusTypeDef HAL_WWDG_Init(WWDG_HandleTypeDef *hwwdg);
emilmont 77:869cf507173a 257 HAL_StatusTypeDef HAL_WWDG_DeInit(WWDG_HandleTypeDef *hwwdg);
bogdanm 81:7d30d6019079 258 void HAL_WWDG_MspInit(WWDG_HandleTypeDef *hwwdg);
bogdanm 81:7d30d6019079 259 void HAL_WWDG_MspDeInit(WWDG_HandleTypeDef *hwwdg);
bogdanm 81:7d30d6019079 260 void HAL_WWDG_WakeupCallback(WWDG_HandleTypeDef* hwwdg);
Kojto 99:dbbf35b96557 261 /**
Kojto 99:dbbf35b96557 262 * @}
Kojto 99:dbbf35b96557 263 */
emilmont 77:869cf507173a 264
Kojto 99:dbbf35b96557 265 /** @addtogroup WWDG_Exported_Functions_Group2
Kojto 99:dbbf35b96557 266 * @{
Kojto 99:dbbf35b96557 267 */
emilmont 77:869cf507173a 268 /* I/O operation functions ******************************************************/
emilmont 77:869cf507173a 269 HAL_StatusTypeDef HAL_WWDG_Start(WWDG_HandleTypeDef *hwwdg);
emilmont 77:869cf507173a 270 HAL_StatusTypeDef HAL_WWDG_Start_IT(WWDG_HandleTypeDef *hwwdg);
emilmont 77:869cf507173a 271 HAL_StatusTypeDef HAL_WWDG_Refresh(WWDG_HandleTypeDef *hwwdg, uint32_t Counter);
emilmont 77:869cf507173a 272 void HAL_WWDG_IRQHandler(WWDG_HandleTypeDef *hwwdg);
Kojto 99:dbbf35b96557 273 /**
Kojto 99:dbbf35b96557 274 * @}
Kojto 99:dbbf35b96557 275 */
emilmont 77:869cf507173a 276
Kojto 99:dbbf35b96557 277 /** @addtogroup WWDG_Exported_Functions_Group3
Kojto 99:dbbf35b96557 278 * @{
Kojto 99:dbbf35b96557 279 */
emilmont 77:869cf507173a 280 /* Peripheral State functions **************************************************/
emilmont 77:869cf507173a 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 */
emilmont 77:869cf507173a 335
emilmont 77:869cf507173a 336 /**
emilmont 77:869cf507173a 337 * @}
emilmont 77:869cf507173a 338 */
emilmont 77:869cf507173a 339
emilmont 77:869cf507173a 340 /**
emilmont 77:869cf507173a 341 * @}
Kojto 99:dbbf35b96557 342 */
emilmont 77:869cf507173a 343 #ifdef __cplusplus
emilmont 77:869cf507173a 344 }
emilmont 77:869cf507173a 345 #endif
emilmont 77:869cf507173a 346
emilmont 77:869cf507173a 347 #endif /* __STM32F4xx_HAL_WWDG_H */
emilmont 77:869cf507173a 348
emilmont 77:869cf507173a 349 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/