mbed official / mbed

Dependents:   hello SerialTestv11 SerialTestv12 Sierpinski ... more

Committer:
Kojto
Date:
Tue Feb 16 14:28:01 2016 +0000
Revision:
114:252557024ec3
Parent:
110:165afa46840b
Child:
122:f9eeca106725
Release 114 of the mbed library

Changes:
- Atmel SAM - warnings fixes
- B96B F446VE - hw control flow addition
- Remove of GCC CW which was not active
- Remove GCC CS, not released anymore - deprecated

Who changed what in which revision?

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