20#ifndef STM32H7xx_HAL_WWDG_H
21#define STM32H7xx_HAL_WWDG_H
67#if (USE_HAL_WWDG_REGISTER_CALLBACKS == 1)
68typedef 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;
115#define WWDG_IT_EWI WWDG_CFR_EWI
125#define WWDG_FLAG_EWIF WWDG_SR_EWIF
134#define WWDG_PRESCALER_1 0x00000000u
135#define WWDG_PRESCALER_2 WWDG_CFR_WDGTB_0
136#define WWDG_PRESCALER_4 WWDG_CFR_WDGTB_1
137#define WWDG_PRESCALER_8 (WWDG_CFR_WDGTB_1 | WWDG_CFR_WDGTB_0)
138#define WWDG_PRESCALER_16 WWDG_CFR_WDGTB_2
139#define WWDG_PRESCALER_32 (WWDG_CFR_WDGTB_2 | WWDG_CFR_WDGTB_0)
140#define WWDG_PRESCALER_64 (WWDG_CFR_WDGTB_2 | WWDG_CFR_WDGTB_1)
141#define WWDG_PRESCALER_128 WWDG_CFR_WDGTB
150#define WWDG_EWI_DISABLE 0x00000000u
151#define WWDG_EWI_ENABLE WWDG_CFR_EWI
166#define IS_WWDG_PRESCALER(__PRESCALER__) (((__PRESCALER__) == WWDG_PRESCALER_1) || \
167 ((__PRESCALER__) == WWDG_PRESCALER_2) || \
168 ((__PRESCALER__) == WWDG_PRESCALER_4) || \
169 ((__PRESCALER__) == WWDG_PRESCALER_8) || \
170 ((__PRESCALER__) == WWDG_PRESCALER_16) || \
171 ((__PRESCALER__) == WWDG_PRESCALER_32) || \
172 ((__PRESCALER__) == WWDG_PRESCALER_64) || \
173 ((__PRESCALER__) == WWDG_PRESCALER_128))
175#define IS_WWDG_WINDOW(__WINDOW__) (((__WINDOW__) >= WWDG_CFR_W_6) && ((__WINDOW__) <= WWDG_CFR_W))
177#define IS_WWDG_COUNTER(__COUNTER__) (((__COUNTER__) >= WWDG_CR_T_6) && ((__COUNTER__) <= WWDG_CR_T))
179#define IS_WWDG_EWI_MODE(__MODE__) (((__MODE__) == WWDG_EWI_ENABLE) || \
180 ((__MODE__) == WWDG_EWI_DISABLE))
198#define __HAL_WWDG_ENABLE(__HANDLE__) SET_BIT((__HANDLE__)->Instance->CR, WWDG_CR_WDGA)
209#define __HAL_WWDG_ENABLE_IT(__HANDLE__, __INTERRUPT__) SET_BIT((__HANDLE__)->Instance->CFR, (__INTERRUPT__))
219#define __HAL_WWDG_GET_IT(__HANDLE__, __INTERRUPT__) __HAL_WWDG_GET_FLAG((__HANDLE__),(__INTERRUPT__))
228#define __HAL_WWDG_CLEAR_IT(__HANDLE__, __INTERRUPT__) __HAL_WWDG_CLEAR_FLAG((__HANDLE__), (__INTERRUPT__))
238#define __HAL_WWDG_GET_FLAG(__HANDLE__, __FLAG__) (((__HANDLE__)->Instance->SR & (__FLAG__)) == (__FLAG__))
248#define __HAL_WWDG_CLEAR_FLAG(__HANDLE__, __FLAG__) ((__HANDLE__)->Instance->SR = ~(__FLAG__))
257#define __HAL_WWDG_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__) (((__HANDLE__)->Instance->CFR\
258 & (__INTERRUPT__)) == (__INTERRUPT__))
277#if (USE_HAL_WWDG_REGISTER_CALLBACKS == 1)
279 pWWDG_CallbackTypeDef pCallback);
This file contains HAL common defines, enumeration, macros and structures definitions.
HAL_StatusTypeDef
HAL Status structures definition.
Definition: stm32h7xx_hal_def.h:47
WWDG handle Structure definition.
Definition: stm32h7xx_hal_wwdg.h:72
WWDG_InitTypeDef Init
Definition: stm32h7xx_hal_wwdg.h:75
WWDG_TypeDef * Instance
Definition: stm32h7xx_hal_wwdg.h:73
WWDG Init structure definition.
Definition: stm32h7xx_hal_wwdg.h:49
uint32_t Prescaler
Definition: stm32h7xx_hal_wwdg.h:50
uint32_t Counter
Definition: stm32h7xx_hal_wwdg.h:56
uint32_t Window
Definition: stm32h7xx_hal_wwdg.h:53
uint32_t EWIMode
Definition: stm32h7xx_hal_wwdg.h:59
Window WATCHDOG.
Definition: stm32h723xx.h:1633