21 #ifndef STM32F7xx_HAL_WWDG_H
22 #define STM32F7xx_HAL_WWDG_H
67 #if (USE_HAL_WWDG_REGISTER_CALLBACKS == 1)
68 typedef struct __WWDG_HandleTypeDef
77 #if (USE_HAL_WWDG_REGISTER_CALLBACKS == 1)
78 void (* EwiCallback)(
struct __WWDG_HandleTypeDef *hwwdg);
80 void (* MspInitCallback)(
struct __WWDG_HandleTypeDef *hwwdg);
84 #if (USE_HAL_WWDG_REGISTER_CALLBACKS == 1)
90 HAL_WWDG_EWI_CB_ID = 0x00u,
91 HAL_WWDG_MSPINIT_CB_ID = 0x01u,
92 } HAL_WWDG_CallbackIDTypeDef;
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
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))
161 #define IS_WWDG_WINDOW(__WINDOW__) (((__WINDOW__) >= WWDG_CFR_W_6) && ((__WINDOW__) <= WWDG_CFR_W))
163 #define IS_WWDG_COUNTER(__COUNTER__) (((__COUNTER__) >= WWDG_CR_T_6) && ((__COUNTER__) <= WWDG_CR_T))
165 #define IS_WWDG_EWI_MODE(__MODE__) (((__MODE__) == WWDG_EWI_ENABLE) || \
166 ((__MODE__) == WWDG_EWI_DISABLE))
183 #define __HAL_WWDG_ENABLE(__HANDLE__) SET_BIT((__HANDLE__)->Instance->CR, WWDG_CR_WDGA)
194 #define __HAL_WWDG_ENABLE_IT(__HANDLE__, __INTERRUPT__) SET_BIT((__HANDLE__)->Instance->CFR, (__INTERRUPT__))
204 #define __HAL_WWDG_GET_IT(__HANDLE__, __INTERRUPT__) __HAL_WWDG_GET_FLAG((__HANDLE__),(__INTERRUPT__))
213 #define __HAL_WWDG_CLEAR_IT(__HANDLE__, __INTERRUPT__) __HAL_WWDG_CLEAR_FLAG((__HANDLE__), (__INTERRUPT__))
223 #define __HAL_WWDG_GET_FLAG(__HANDLE__, __FLAG__) (((__HANDLE__)->Instance->SR & (__FLAG__)) == (__FLAG__))
233 #define __HAL_WWDG_CLEAR_FLAG(__HANDLE__, __FLAG__) ((__HANDLE__)->Instance->SR = ~(__FLAG__))
242 #define __HAL_WWDG_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__) (((__HANDLE__)->Instance->CFR\
243 & (__INTERRUPT__)) == (__INTERRUPT__))
262 #if (USE_HAL_WWDG_REGISTER_CALLBACKS == 1)