11 #ifndef __MG32F10x_WWDG_H 12 #define __MG32F10x_WWDG_H 40 #define WWDG_Prescaler_1 ((uint32_t)0x00000000) 41 #define WWDG_Prescaler_2 ((uint32_t)0x00000080) 42 #define WWDG_Prescaler_4 ((uint32_t)0x00000100) 43 #define WWDG_Prescaler_8 ((uint32_t)0x00000180) 44 #define IS_WWDG_PRESCALER(PRESCALER) (((PRESCALER) == WWDG_Prescaler_1) || \ 45 ((PRESCALER) == WWDG_Prescaler_2) || \ 46 ((PRESCALER) == WWDG_Prescaler_4) || \ 47 ((PRESCALER) == WWDG_Prescaler_8)) 48 #define IS_WWDG_WINDOW_VALUE(VALUE) ((VALUE) <= 0x7F) 49 #define IS_WWDG_COUNTER(COUNTER) (((COUNTER) >= 0x40) && ((COUNTER) <= 0x7F)) void WWDG_Enable(uint8_t Counter)
Enables WWDG and load the counter value.
Definition: mg32f10x_wwdg.c:148
void WWDG_DeInit(void)
Deinitializes the WWDG peripheral registers to their default reset values.
Definition: mg32f10x_wwdg.c:65
void WWDG_SetCounter(uint8_t Counter)
Sets the WWDG counter value.
Definition: mg32f10x_wwdg.c:133
void WWDG_EnableIT(void)
Enables the WWDG Early Wakeup interrupt(EWI).
Definition: mg32f10x_wwdg.c:122
void WWDG_SetWindowValue(uint8_t WindowValue)
Sets the WWDG window value.
Definition: mg32f10x_wwdg.c:100
void WWDG_ClearFlag(void)
Clears Early Wakeup interrupt flag.
Definition: mg32f10x_wwdg.c:170
void WWDG_SetPrescaler(uint32_t WWDG_Prescaler)
Sets the WWDG Prescaler.
Definition: mg32f10x_wwdg.c:81
FlagStatus WWDG_GetFlagStatus(void)
Checks whether the Early Wakeup interrupt flag is set or not.
Definition: mg32f10x_wwdg.c:160