NANO102/112 BSP
V3.03.003
The Board Support Package for Nano102/112 Series
StdDriver
inc
wwdt.h
Go to the documentation of this file.
1
/**************************************************************************/
12
#ifndef __WWDT_H__
13
#define __WWDT_H__
14
15
#ifdef __cplusplus
16
extern
"C"
17
{
18
#endif
19
20
32
#define WWDT_PRESCALER_1 (0UL << WWDT_CR_PERIODSEL_Pos)
33
#define WWDT_PRESCALER_2 (1UL << WWDT_CR_PERIODSEL_Pos)
34
#define WWDT_PRESCALER_4 (2UL << WWDT_CR_PERIODSEL_Pos)
35
#define WWDT_PRESCALER_8 (3UL << WWDT_CR_PERIODSEL_Pos)
36
#define WWDT_PRESCALER_16 (4UL << WWDT_CR_PERIODSEL_Pos)
37
#define WWDT_PRESCALER_32 (5UL << WWDT_CR_PERIODSEL_Pos)
38
#define WWDT_PRESCALER_64 (6UL << WWDT_CR_PERIODSEL_Pos)
39
#define WWDT_PRESCALER_128 (7UL << WWDT_CR_PERIODSEL_Pos)
40
#define WWDT_PRESCALER_192 (8UL << WWDT_CR_PERIODSEL_Pos)
41
#define WWDT_PRESCALER_256 (9UL << WWDT_CR_PERIODSEL_Pos)
42
#define WWDT_PRESCALER_384 (0xAUL << WWDT_CR_PERIODSEL_Pos)
43
#define WWDT_PRESCALER_512 (0xBUL << WWDT_CR_PERIODSEL_Pos)
44
#define WWDT_PRESCALER_768 (0xCUL << WWDT_CR_PERIODSEL_Pos)
45
#define WWDT_PRESCALER_1024 (0xDUL << WWDT_CR_PERIODSEL_Pos)
46
#define WWDT_PRESCALER_1536 (0xEUL << WWDT_CR_PERIODSEL_Pos)
47
#define WWDT_PRESCALER_2048 (0xFUL << WWDT_CR_PERIODSEL_Pos)
49
#define WWDT_RELOAD_WORD (0x00005AA5)
/* end of group NANO1X2_WWDT_EXPORTED_CONSTANTS */
51
52
63
#define WWDT_CLEAR_RESET_FLAG() (WWDT->STS = WWDT_STS_RF_Msk)
64
71
#define WWDT_CLEAR_INT_FLAG() (WWDT->STS = WWDT_STS_IF_Msk)
72
80
#define WWDT_GET_RESET_FLAG() (WWDT->STS & WWDT_STS_RF_Msk ? 1 : 0)
81
89
#define WWDT_GET_INT_FLAG() (WWDT->STS & WWDT_STS_IF_Msk ? 1 : 0)
90
97
#define WWDT_GET_COUNTER() (WWDT->VAL)
98
108
#define WWDT_RELOAD_COUNTER() (WWDT->RLD = WWDT_RELOAD_WORD)
109
110
111
void
WWDT_Open
(uint32_t u32PreScale, uint32_t u32CmpValue, uint32_t u32EnableInt);
112
113
/* end of group NANO1X2_WWDT_EXPORTED_FUNCTIONS */
115
/* end of group NANO1X2_WWDT_Driver */
117
/* end of group NANO1X2_Device_Driver */
119
120
#ifdef __cplusplus
121
}
122
#endif
123
124
#endif
//__WWDT_H__
125
126
/*** (C) COPYRIGHT 2014 Nuvoton Technology Corp. ***/
WWDT_Open
void WWDT_Open(uint32_t u32PreScale, uint32_t u32CmpValue, uint32_t u32EnableInt)
This function make WWDT module start counting with different counter period and compared window value...
Definition:
wwdt.c:51
Generated on Wed Mar 8 2023 11:33:52 for NANO102/112 BSP by
1.9.3