WB32F10x Standard Peripherals Firmware Library

wb32f10x_wwdg.h
浏览该文件的文档.
1
10 /* Define to prevent recursive inclusion -------------------------------------*/
11 #ifndef __WB32F10x_WWDG_H
12 #define __WB32F10x_WWDG_H
13
14 #ifdef __cplusplus
15 extern "C" {
16 #endif
17
18 /* Includes ------------------------------------------------------------------*/
19 #include "wb32f10x.h"
20
29 /* Exported types ------------------------------------------------------------*/
30 /* Exported constants --------------------------------------------------------*/
31
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))
50
59 /* Exported macro ------------------------------------------------------------*/
60 /* Exported functions --------------------------------------------------------*/
61
62 void WWDG_DeInit(void);
63 void WWDG_SetPrescaler(uint32_t WWDG_Prescaler);
64 void WWDG_SetWindowValue(uint8_t WindowValue);
65 void WWDG_EnableIT(void);
66 void WWDG_SetCounter(uint8_t Counter);
67 void WWDG_Enable(uint8_t Counter);
68 FlagStatus WWDG_GetFlagStatus(void);
69 void WWDG_ClearFlag(void);
70
79 #ifdef __cplusplus
80 }
81 #endif
82
83 #endif /* __WB32F10x_WWDG_H */
WWDG_Enable
void WWDG_Enable(uint8_t Counter)
Enables WWDG and load the counter value.
Definition: wb32f10x_wwdg.c:148
WWDG_DeInit
void WWDG_DeInit(void)
Deinitializes the WWDG peripheral registers to their default reset values.
Definition: wb32f10x_wwdg.c:65
WWDG_SetCounter
void WWDG_SetCounter(uint8_t Counter)
Sets the WWDG counter value.
Definition: wb32f10x_wwdg.c:133
WWDG_EnableIT
void WWDG_EnableIT(void)
Enables the WWDG Early Wakeup interrupt(EWI).
Definition: wb32f10x_wwdg.c:122
WWDG_SetWindowValue
void WWDG_SetWindowValue(uint8_t WindowValue)
Sets the WWDG window value.
Definition: wb32f10x_wwdg.c:100
WWDG_ClearFlag
void WWDG_ClearFlag(void)
Clears Early Wakeup interrupt flag.
Definition: wb32f10x_wwdg.c:170
WWDG_SetPrescaler
void WWDG_SetPrescaler(uint32_t WWDG_Prescaler)
Sets the WWDG Prescaler.
Definition: wb32f10x_wwdg.c:81
WWDG_GetFlagStatus
FlagStatus WWDG_GetFlagStatus(void)
Checks whether the Early Wakeup interrupt flag is set or not.
Definition: wb32f10x_wwdg.c:160