Mini51 BSP  V3.02.002
The Board Support Package for Mini51 Series
wdt.c
Go to the documentation of this file.
1 /**************************************************************************/
12 #include "Mini51Series.h"
13 
43 void WDT_Open(uint32_t u32TimeoutInterval,
44  uint32_t u32ResetDelay,
45  uint32_t u32EnableReset,
46  uint32_t u32EnableWakeup)
47 {
48 
49  WDT->WTCR = u32TimeoutInterval | WDT_WTCR_WTE_Msk |
50  (u32EnableReset << WDT_WTCR_WTRE_Pos) |
51  (u32EnableWakeup << WDT_WTCR_WTWKE_Pos);
52  return;
53 }
54 
60 void WDT_Close(void)
61 {
62  WDT->WTCR = 0;
63  return;
64 }
65 
71 void WDT_EnableInt(void)
72 {
74  return;
75 }
76 
82 void WDT_DisableInt(void)
83 {
85  return;
86 }
87 
88 
89  /* end of group MINI51_WDT_EXPORTED_FUNCTIONS */
91  /* end of group MINI51_WDT_Driver */
93  /* end of group MINI51_Device_Driver */
95 
96 /*** (C) COPYRIGHT 2013 Nuvoton Technology Corp. ***/
#define WDT_WTCR_WTRF_Msk
#define WDT_WTCR_WTWKE_Pos
Mini51 series peripheral access layer header file. This file contains all the peripheral register's d...
void WDT_Open(uint32_t u32TimeoutInterval, uint32_t u32ResetDelay, uint32_t u32EnableReset, uint32_t u32EnableWakeup)
This function make WDT module start counting with different time-out interval.
Definition: wdt.c:43
#define WDT_WTCR_WTIE_Msk
#define WDT_WTCR_WTIF_Msk
#define WDT_WTCR_WTRE_Pos
void WDT_Close(void)
This function stops WDT counting and disable WDT module.
Definition: wdt.c:60
void WDT_DisableInt(void)
This function disables the WDT time-out interrupt.
Definition: wdt.c:82
#define WDT
Pointer to WDT register structure.
void WDT_EnableInt(void)
This function enables the WDT time-out interrupt.
Definition: wdt.c:71
#define WDT_WTCR_WTE_Msk
#define WDT_WTCR_WTWKF_Msk