1 /********************************** (C) COPYRIGHT  *******************************
2  * File Name          : ch32v10x_wwdg.h
3  * Author             : WCH
4  * Version            : V1.0.0
5  * Date               : 2020/04/30
6  * Description        : This file contains all the functions prototypes for the WWDG
7  *                      firmware library.
8  * Copyright (c) 2021 Nanjing Qinheng Microelectronics Co., Ltd.
9  * SPDX-License-Identifier: Apache-2.0
10  *******************************************************************************/
11 #ifndef __CH32V10x_WWDG_H
12 #define __CH32V10x_WWDG_H
13 
14 #ifdef __cplusplus
15 extern "C" {
16 #endif
17 
18 #include "ch32v10x.h"
19 
20 /* WWDG_Prescaler */
21 #define WWDG_Prescaler_1    ((uint32_t)0x00000000)
22 #define WWDG_Prescaler_2    ((uint32_t)0x00000080)
23 #define WWDG_Prescaler_4    ((uint32_t)0x00000100)
24 #define WWDG_Prescaler_8    ((uint32_t)0x00000180)
25 
26 void       WWDG_DeInit(void);
27 void       WWDG_SetPrescaler(uint32_t WWDG_Prescaler);
28 void       WWDG_SetWindowValue(uint8_t WindowValue);
29 void       WWDG_EnableIT(void);
30 void       WWDG_SetCounter(uint8_t Counter);
31 void       WWDG_Enable(uint8_t Counter);
32 FlagStatus WWDG_GetFlagStatus(void);
33 void       WWDG_ClearFlag(void);
34 
35 #ifdef __cplusplus
36 }
37 #endif
38 
39 #endif /* __CH32V10x_WWDG_H */
40