MG32L003 Standard Peripherals Firmware Library

mg32l003_wwdg.h
浏览该文件的文档.
1
10 /* Define to prevent recursive inclusion -------------------------------------*/
11 #ifndef __MG32L003_WWDG_H
12 #define __MG32L003_WWDG_H
13
14 #ifdef __cplusplus
15 extern "C" {
16 #endif
17
18 /* Includes ------------------------------------------------------------------*/
19 #include "mg32l003.h"
20
29 /* Exported types ------------------------------------------------------------*/
30 /* Exported constants --------------------------------------------------------*/
31
39 #define WWDG_PRESCALER_MIN ((uint32_t)0x00000000U)
40 #define WWDG_PRESCALER_MAX ((uint32_t)0x000FFFFFU)
49 #define WWDG_WINDOW_MIN ((uint8_t)0x00000010U)
50 #define WWDG_WINDOW_MAX ((uint8_t)0x000000FFU)
51 #define WWDG_RELOAD_MIN ((uint8_t)0x00000020U)
52 #define WWDG_RELOAD_MAX ((uint8_t)0x000000FFU)
53
61 /* Exported macro ------------------------------------------------------------*/
62
63 #define IS_WWDG_PRESCALER_VALUE(VALUE) ((VALUE) <= WWDG_PRESCALER_MAX)
64
65 #define IS_WWDG_WINDOW_VALUE(VALUE) (((VALUE) >= WWDG_WINDOW_MIN) && \
66 ((VALUE) <= WWDG_WINDOW_MAX))
67
68 #define IS_WWDG_RELOAD_VALUE(VALUE) (((VALUE) >= WWDG_RELOAD_MIN) && \
69 ((VALUE) <= WWDG_RELOAD_MAX))
70
71 /* Exported functions --------------------------------------------------------*/
72
73 void WWDG_DeInit(void);
74 void WWDG_SetPrescaler(uint32_t WWDG_Prescaler);
75 void WWDG_SetWindowValue(uint8_t WindowValue);
76 void WWDG_IT_Cmd(FunctionalState NewState);
77 void WWDG_SetCounter(uint8_t Counter);
78 void WWDG_Cmd(FunctionalState NewState);
79 FlagStatus WWDG_GetFlagStatus(void);
80 void WWDG_ClearFlag(void);
81
90 #ifdef __cplusplus
91 }
92 #endif
93
94 #endif /*__MG32L003_WWDG_H */
WWDG_IT_Cmd
void WWDG_IT_Cmd(FunctionalState NewState)
Enables or disable the WWDG's interrupt.
Definition: mg32l003_wwdg.c:90
WWDG_DeInit
void WWDG_DeInit(void)
Deinitializes the WWDG peripheral registers to their default reset values.
Definition: mg32l003_wwdg.c:38
WWDG_SetCounter
void WWDG_SetCounter(uint8_t Counter)
Sets the WWDG counter value.
Definition: mg32l003_wwdg.c:108
WWDG_Cmd
void WWDG_Cmd(FunctionalState NewState)
Enables or disables the WWDG peripheral.
Definition: mg32l003_wwdg.c:123
WWDG_SetWindowValue
void WWDG_SetWindowValue(uint8_t WindowValue)
Sets the WWDG window value.
Definition: mg32l003_wwdg.c:68
WWDG_ClearFlag
void WWDG_ClearFlag(void)
Clears Early Wakeup interrupt flag.
Definition: mg32l003_wwdg.c:152
WWDG_SetPrescaler
void WWDG_SetPrescaler(uint32_t WWDG_Prescaler)
Sets the WWDG Prescaler.
Definition: mg32l003_wwdg.c:49
WWDG_GetFlagStatus
FlagStatus WWDG_GetFlagStatus(void)
Checks whether the Early Wakeup interrupt flag is set or not.
Definition: mg32l003_wwdg.c:142