stm32f7xx_hal_wwdg.h
Go to the documentation of this file.
1 
20 /* Define to prevent recursive inclusion -------------------------------------*/
21 #ifndef STM32F7xx_HAL_WWDG_H
22 #define STM32F7xx_HAL_WWDG_H
23 
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27 
28 /* Includes ------------------------------------------------------------------*/
29 #include "stm32f7xx_hal_def.h"
30 
39 /* Exported types ------------------------------------------------------------*/
40 
48 typedef struct
49 {
50  uint32_t Prescaler;
53  uint32_t Window;
56  uint32_t Counter;
59  uint32_t EWIMode ;
63 
67 #if (USE_HAL_WWDG_REGISTER_CALLBACKS == 1)
68 typedef struct __WWDG_HandleTypeDef
69 #else
70 typedef struct
71 #endif
72 {
77 #if (USE_HAL_WWDG_REGISTER_CALLBACKS == 1)
78  void (* EwiCallback)(struct __WWDG_HandleTypeDef *hwwdg);
80  void (* MspInitCallback)(struct __WWDG_HandleTypeDef *hwwdg);
81 #endif
83 
84 #if (USE_HAL_WWDG_REGISTER_CALLBACKS == 1)
85 
88 typedef enum
89 {
90  HAL_WWDG_EWI_CB_ID = 0x00u,
91  HAL_WWDG_MSPINIT_CB_ID = 0x01u,
92 } HAL_WWDG_CallbackIDTypeDef;
93 
97 typedef void (*pWWDG_CallbackTypeDef)(WWDG_HandleTypeDef *hppp);
99 #endif
100 
104 /* Exported constants --------------------------------------------------------*/
105 
113 #define WWDG_IT_EWI WWDG_CFR_EWI
122 #define WWDG_FLAG_EWIF WWDG_SR_EWIF
130 #define WWDG_PRESCALER_1 0x00000000u
131 #define WWDG_PRESCALER_2 WWDG_CFR_WDGTB_0
132 #define WWDG_PRESCALER_4 WWDG_CFR_WDGTB_1
133 #define WWDG_PRESCALER_8 (WWDG_CFR_WDGTB_1 | WWDG_CFR_WDGTB_0)
141 #define WWDG_EWI_DISABLE 0x00000000u
142 #define WWDG_EWI_ENABLE WWDG_CFR_EWI
151 /* Private macros ------------------------------------------------------------*/
152 
156 #define IS_WWDG_PRESCALER(__PRESCALER__) (((__PRESCALER__) == WWDG_PRESCALER_1) || \
157  ((__PRESCALER__) == WWDG_PRESCALER_2) || \
158  ((__PRESCALER__) == WWDG_PRESCALER_4) || \
159  ((__PRESCALER__) == WWDG_PRESCALER_8))
160 
161 #define IS_WWDG_WINDOW(__WINDOW__) (((__WINDOW__) >= WWDG_CFR_W_6) && ((__WINDOW__) <= WWDG_CFR_W))
162 
163 #define IS_WWDG_COUNTER(__COUNTER__) (((__COUNTER__) >= WWDG_CR_T_6) && ((__COUNTER__) <= WWDG_CR_T))
164 
165 #define IS_WWDG_EWI_MODE(__MODE__) (((__MODE__) == WWDG_EWI_ENABLE) || \
166  ((__MODE__) == WWDG_EWI_DISABLE))
167 
172 /* Exported macros ------------------------------------------------------------*/
173 
183 #define __HAL_WWDG_ENABLE(__HANDLE__) SET_BIT((__HANDLE__)->Instance->CR, WWDG_CR_WDGA)
184 
194 #define __HAL_WWDG_ENABLE_IT(__HANDLE__, __INTERRUPT__) SET_BIT((__HANDLE__)->Instance->CFR, (__INTERRUPT__))
195 
204 #define __HAL_WWDG_GET_IT(__HANDLE__, __INTERRUPT__) __HAL_WWDG_GET_FLAG((__HANDLE__),(__INTERRUPT__))
205 
213 #define __HAL_WWDG_CLEAR_IT(__HANDLE__, __INTERRUPT__) __HAL_WWDG_CLEAR_FLAG((__HANDLE__), (__INTERRUPT__))
214 
223 #define __HAL_WWDG_GET_FLAG(__HANDLE__, __FLAG__) (((__HANDLE__)->Instance->SR & (__FLAG__)) == (__FLAG__))
224 
233 #define __HAL_WWDG_CLEAR_FLAG(__HANDLE__, __FLAG__) ((__HANDLE__)->Instance->SR = ~(__FLAG__))
234 
242 #define __HAL_WWDG_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__) (((__HANDLE__)->Instance->CFR\
243  & (__INTERRUPT__)) == (__INTERRUPT__))
244 
249 /* Exported functions --------------------------------------------------------*/
250 
258 /* Initialization/de-initialization functions **********************************/
261 /* Callbacks Register/UnRegister functions ***********************************/
262 #if (USE_HAL_WWDG_REGISTER_CALLBACKS == 1)
263 HAL_StatusTypeDef HAL_WWDG_RegisterCallback(WWDG_HandleTypeDef *hwwdg, HAL_WWDG_CallbackIDTypeDef CallbackID, pWWDG_CallbackTypeDef pCallback);
264 HAL_StatusTypeDef HAL_WWDG_UnRegisterCallback(WWDG_HandleTypeDef *hwwdg, HAL_WWDG_CallbackIDTypeDef CallbackID);
265 #endif
266 
274 /* I/O operation functions ******************************************************/
294 #ifdef __cplusplus
295 }
296 #endif
297 
298 #endif /* STM32F7xx_HAL_WWDG_H */
299 
300 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
HAL_StatusTypeDef
HAL_StatusTypeDef
HAL Status structures definition
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_def.h:40
WWDG_HandleTypeDef
WWDG handle Structure definition.
Definition: stm32f7xx_hal_wwdg.h:70
WWDG_HandleTypeDef::Instance
WWDG_TypeDef * Instance
Definition: stm32f7xx_hal_wwdg.h:73
WWDG_InitTypeDef::Counter
uint32_t Counter
Definition: stm32f7xx_hal_wwdg.h:56
WWDG_InitTypeDef::Window
uint32_t Window
Definition: stm32f7xx_hal_wwdg.h:53
HAL_WWDG_Init
HAL_StatusTypeDef HAL_WWDG_Init(WWDG_HandleTypeDef *hwwdg)
WWDG_InitTypeDef::EWIMode
uint32_t EWIMode
Definition: stm32f7xx_hal_wwdg.h:59
WWDG_InitTypeDef::Prescaler
uint32_t Prescaler
Definition: stm32f7xx_hal_wwdg.h:50
HAL_WWDG_EarlyWakeupCallback
void HAL_WWDG_EarlyWakeupCallback(WWDG_HandleTypeDef *hwwdg)
WWDG_TypeDef
Window WATCHDOG.
Definition: stm32f407xx.h:773
stm32f7xx_hal_def.h
This file contains HAL common defines, enumeration, macros and structures definitions.
HAL_WWDG_Refresh
HAL_StatusTypeDef HAL_WWDG_Refresh(WWDG_HandleTypeDef *hwwdg)
WWDG_InitTypeDef
WWDG Init structure definition.
Definition: stm32f7xx_hal_wwdg.h:48
HAL_WWDG_MspInit
void HAL_WWDG_MspInit(WWDG_HandleTypeDef *hwwdg)
WWDG_HandleTypeDef::Init
WWDG_InitTypeDef Init
Definition: stm32f7xx_hal_wwdg.h:75
HAL_WWDG_IRQHandler
void HAL_WWDG_IRQHandler(WWDG_HandleTypeDef *hwwdg)


picovoice_driver
Author(s):
autogenerated on Fri Apr 1 2022 02:14:53