M480 BSP
V3.05.005
The Board Support Package for M480 Series
StdDriver
inc
wwdt.h
Go to the documentation of this file.
1
/**************************************************************************/
9
#ifndef __WWDT_H__
10
#define __WWDT_H__
11
12
#ifdef __cplusplus
13
extern
"C"
14
{
15
#endif
16
17
29
/*---------------------------------------------------------------------------------------------------------*/
30
/* WWDT Prescale Period Constant Definitions */
31
/*---------------------------------------------------------------------------------------------------------*/
32
#define WWDT_PRESCALER_1 (0 << WWDT_CTL_PSCSEL_Pos)
33
#define WWDT_PRESCALER_2 (1 << WWDT_CTL_PSCSEL_Pos)
34
#define WWDT_PRESCALER_4 (2 << WWDT_CTL_PSCSEL_Pos)
35
#define WWDT_PRESCALER_8 (3 << WWDT_CTL_PSCSEL_Pos)
36
#define WWDT_PRESCALER_16 (4 << WWDT_CTL_PSCSEL_Pos)
37
#define WWDT_PRESCALER_32 (5 << WWDT_CTL_PSCSEL_Pos)
38
#define WWDT_PRESCALER_64 (6 << WWDT_CTL_PSCSEL_Pos)
39
#define WWDT_PRESCALER_128 (7 << WWDT_CTL_PSCSEL_Pos)
40
#define WWDT_PRESCALER_192 (8 << WWDT_CTL_PSCSEL_Pos)
41
#define WWDT_PRESCALER_256 (9 << WWDT_CTL_PSCSEL_Pos)
42
#define WWDT_PRESCALER_384 (10 << WWDT_CTL_PSCSEL_Pos)
43
#define WWDT_PRESCALER_512 (11 << WWDT_CTL_PSCSEL_Pos)
44
#define WWDT_PRESCALER_768 (12 << WWDT_CTL_PSCSEL_Pos)
45
#define WWDT_PRESCALER_1024 (13 << WWDT_CTL_PSCSEL_Pos)
46
#define WWDT_PRESCALER_1536 (14 << WWDT_CTL_PSCSEL_Pos)
47
#define WWDT_PRESCALER_2048 (15 << WWDT_CTL_PSCSEL_Pos)
49
/*---------------------------------------------------------------------------------------------------------*/
50
/* WWDT Reload Counter Keyword Constant Definitions */
51
/*---------------------------------------------------------------------------------------------------------*/
52
#define WWDT_RELOAD_WORD (0x00005AA5)
/* end of group WWDT_EXPORTED_CONSTANTS */
55
56
71
#define WWDT_CLEAR_RESET_FLAG() (WWDT->STATUS = WWDT_STATUS_WWDTRF_Msk)
72
83
#define WWDT_CLEAR_INT_FLAG() (WWDT->STATUS = WWDT_STATUS_WWDTIF_Msk)
84
96
#define WWDT_GET_RESET_FLAG() ((WWDT->STATUS & WWDT_STATUS_WWDTRF_Msk)? 1 : 0)
97
109
#define WWDT_GET_INT_FLAG() ((WWDT->STATUS & WWDT_STATUS_WWDTIF_Msk)? 1 : 0)
110
121
#define WWDT_GET_COUNTER() (WWDT->CNT)
122
136
#define WWDT_RELOAD_COUNTER() (WWDT->RLDCNT = WWDT_RELOAD_WORD)
137
138
void
WWDT_Open
(uint32_t u32PreScale, uint32_t u32CmpValue, uint32_t u32EnableInt);
139
/* end of group WWDT_EXPORTED_FUNCTIONS */
141
/* end of group WWDT_Driver */
143
/* end of group Standard_Driver */
145
146
#ifdef __cplusplus
147
}
148
#endif
149
150
#endif
/* __WWDT_H__ */
151
152
/*** (C) COPYRIGHT 2016 Nuvoton Technology Corp. ***/
WWDT_Open
void WWDT_Open(uint32_t u32PreScale, uint32_t u32CmpValue, uint32_t u32EnableInt)
Open WWDT and start counting.
Definition:
wwdt.c:52
Generated on Thu Mar 16 2023 13:35:49 for M480 BSP by
1.9.3