1 /** 2 ****************************************************************************** 3 * @file lib_wdt.h 4 * @author Application Team 5 * @version V4.4.0 6 * @date 2018-09-27 7 * @brief WDT library. 8 ****************************************************************************** 9 * @attention 10 * 11 ****************************************************************************** 12 */ 13 #ifndef __LIB_WDT_H 14 #define __LIB_WDT_H 15 16 #ifdef __cplusplus 17 extern "C" { 18 #endif 19 20 #include "target.h" 21 22 #define WDT_2_SECS PMU_WDTEN_WDTSEL_0 23 #define WDT_1_SECS PMU_WDTEN_WDTSEL_1 24 #define WDT_0_5_SECS PMU_WDTEN_WDTSEL_2 25 #define WDT_0_25_SECS PMU_WDTEN_WDTSEL_3 26 27 /* Private macros ------------------------------------------------------------*/ 28 #define IS_WDT_PERIOD(__PERIOD__) (((__PERIOD__) == WDT_2_SECS) ||\ 29 ((__PERIOD__) == WDT_1_SECS) ||\ 30 ((__PERIOD__) == WDT_0_5_SECS) ||\ 31 ((__PERIOD__) == WDT_0_25_SECS)) 32 33 /* Exported Functions ------------------------------------------------------- */ 34 void WDT_Enable(void); 35 void WDT_Disable(void); 36 void WDT_Clear(void); 37 void WDT_SetPeriod(uint32_t period); 38 uint16_t WDT_GetCounterValue(void); 39 40 #ifdef __cplusplus 41 } 42 #endif 43 44 #endif /* __LIB_WDT_H */ 45 46 /*********************************** END OF FILE ******************************/ 47