1 /*! 2 * @file apm32f0xx_wwdt.h 3 * 4 * @brief This file contains all the functions prototypes for the WWDG firmware library 5 * 6 * @version V1.0.2 7 * 8 * @date 2022-02-21 9 * 10 * @attention 11 * 12 * Copyright (C) 2020-2022 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 #ifndef __APM32F0XX_WWDT_H 27 #define __APM32F0XX_WWDT_H 28 29 #ifdef __cplusplus 30 extern "C" { 31 #endif 32 33 #include "apm32f0xx.h" 34 35 /** @addtogroup APM32F0xx_StdPeriphDriver 36 @{ 37 */ 38 39 /** @addtogroup WWDT_Driver WWDT Driver 40 @{ 41 */ 42 43 /** @defgroup WWDT_Macros Macros 44 @{ 45 */ 46 47 /**@} end of group WWDT_Macros */ 48 49 /** @defgroup WWDT_Enumerations Enumerations 50 @{ 51 */ 52 53 /** 54 * @brief WWDT Timebase(Prescaler) define 55 */ 56 typedef enum 57 { 58 WWDT_DIV_1 = ((uint8_t)0x00), 59 WWDT_DIV_2 = ((uint8_t)0x01), 60 WWDT_DIV_4 = ((uint8_t)0x02), 61 WWDT_DIV_8 = ((uint8_t)0x03) 62 } WWDT_DIV_T; 63 64 /**@} end of group WWDT_Enumerations*/ 65 66 /** @defgroup WWDT_Structures Structures 67 @{ 68 */ 69 70 /**@} end of group WWDT_Structures */ 71 72 /** @defgroup WWDT_Variables Variables 73 @{ 74 */ 75 76 /**@} end of group WWDT_Variables */ 77 78 79 /** @defgroup WWDT_Functions Functions 80 @{ 81 */ 82 83 /* WWDT reset */ 84 void WWDT_Reset(void); 85 86 /* Set WWDT Timebase */ 87 void WWDT_SetTimebase(uint32_t div); 88 89 /* Set Window Data */ 90 void WWDT_ConfigWindowValue(uint16_t windowValue); 91 92 /* Set Couter */ 93 void WWDT_ConfigCounter(uint8_t couter); 94 95 /* Enable WWDT and Early Wakeup interrupt */ 96 void WWDT_EnableEWI(void); 97 void WWDT_Enable(uint8_t count); 98 99 /* Read Flag and Clear Flag */ 100 uint8_t WWDT_ReadStatusFlag(void); 101 void WWDT_ClearStatusFlag(void); 102 103 #ifdef __cplusplus 104 } 105 #endif 106 107 #endif /* __APM32F0XX_WWDT_H */ 108 109 /**@} end of group WWDT_Functions */ 110 /**@} end of group WWDT_Driver */ 111 /**@} end of group APM32F0xx_StdPeriphDriver */ 112