1 /*! 2 * @file apm32e10x_wwdt.h 3 * 4 * @brief This file contains all the functions prototypes for the WWDT firmware library 5 * 6 * @version V1.0.2 7 * 8 * @date 2022-12-31 9 * 10 * @attention 11 * 12 * Copyright (C) 2021-2023 Geehy Semiconductor 13 * 14 * You may not use this file except in compliance with the 15 * GEEHY COPYRIGHT NOTICE (GEEHY SOFTWARE PACKAGE LICENSE). 16 * 17 * The program is only for reference, which is distributed in the hope 18 * that it will be useful and instructional for customers to develop 19 * their software. Unless required by applicable law or agreed to in 20 * writing, the program is distributed on an "AS IS" BASIS, WITHOUT 21 * ANY WARRANTY OR CONDITIONS OF ANY KIND, either express or implied. 22 * See the GEEHY SOFTWARE PACKAGE LICENSE for the governing permissions 23 * and limitations under the License. 24 */ 25 26 /* Define to prevent recursive inclusion */ 27 #ifndef __APM32E10X_WWDT_H 28 #define __APM32E10X_WWDT_H 29 30 /* Includes */ 31 #include "apm32e10x.h" 32 33 #ifdef __cplusplus 34 extern "C" { 35 #endif 36 37 /** @addtogroup APM32E10x_StdPeriphDriver 38 @{ 39 */ 40 41 /** @addtogroup WWDT_Driver 42 @{ 43 */ 44 45 /** @defgroup WWDT_Enumerations Enumerations 46 @{ 47 */ 48 49 /** 50 * @brief WWDT Timebase(Prescaler) define 51 */ 52 typedef enum 53 { 54 WWDT_TIME_BASE_1 = 0x00000000, 55 WWDT_TIME_BASE_2 = 0x00000080, 56 WWDT_TIME_BASE_4 = 0x00000100, 57 WWDT_TIME_BASE_8 = 0x00000180 58 }WWDT_TIME_BASE_T; 59 60 /**@} end of group WWDT_Enumerations */ 61 62 /** @defgroup WWDT_Functions Functions 63 @{ 64 */ 65 66 /* WWDT reset */ 67 void WWDT_Reset(void); 68 69 /* Config WWDT Timebase */ 70 void WWDT_ConfigTimebase(WWDT_TIME_BASE_T timeBase); 71 72 /* Config Window Data */ 73 void WWDT_ConfigWindowData(uint8_t windowData); 74 75 /* Config Couter */ 76 void WWDT_ConfigCounter(uint8_t counter); 77 78 /* Enable WWDT and Early Wakeup interrupt */ 79 void WWDT_EnableEWI(void); 80 void WWDT_Enable(uint8_t count); 81 82 /* Read Flag and Clear Flag */ 83 uint8_t WWDT_ReadFlag(void); 84 void WWDT_ClearFlag(void); 85 86 /**@} end of group WWDT_Functions */ 87 /**@} end of group WWDT_Driver */ 88 /**@} end of group APM32E10x_StdPeriphDriver */ 89 90 #ifdef __cplusplus 91 } 92 #endif 93 94 #endif /* __APM32E10X_WWDT_H */ 95