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