MAX32655 Peripheral Driver API
Peripheral Driver API for the MAX32655
wut_regs.h
1 
6 /* ****************************************************************************
7  * Copyright (C) Maxim Integrated Products, Inc., All Rights Reserved.
8  *
9  * Permission is hereby granted, free of charge, to any person obtaining a
10  * copy of this software and associated documentation files (the "Software"),
11  * to deal in the Software without restriction, including without limitation
12  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
13  * and/or sell copies of the Software, and to permit persons to whom the
14  * Software is furnished to do so, subject to the following conditions:
15  *
16  * The above copyright notice and this permission notice shall be included
17  * in all copies or substantial portions of the Software.
18  *
19  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
20  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
21  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
22  * IN NO EVENT SHALL MAXIM INTEGRATED BE LIABLE FOR ANY CLAIM, DAMAGES
23  * OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
24  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
25  * OTHER DEALINGS IN THE SOFTWARE.
26  *
27  * Except as contained in this notice, the name of Maxim Integrated
28  * Products, Inc. shall not be used except as stated in the Maxim Integrated
29  * Products, Inc. Branding Policy.
30  *
31  * The mere transfer of this software does not imply any licenses
32  * of trade secrets, proprietary technology, copyrights, patents,
33  * trademarks, maskwork rights, or any other form of intellectual
34  * property whatsoever. Maxim Integrated Products, Inc. retains all
35  * ownership rights.
36  *
37  *
38  *************************************************************************** */
39 
40 #ifndef _WUT_REGS_H_
41 #define _WUT_REGS_H_
42 
43 /* **** Includes **** */
44 #include <stdint.h>
45 
46 #ifdef __cplusplus
47 extern "C" {
48 #endif
49 
50 #if defined (__ICCARM__)
51  #pragma system_include
52 #endif
53 
54 #if defined (__CC_ARM)
55  #pragma anon_unions
56 #endif
57 /*
59  If types are not defined elsewhere (CMSIS) define them here
60 */
61 #ifndef __IO
62 #define __IO volatile
63 #endif
64 #ifndef __I
65 #define __I volatile const
66 #endif
67 #ifndef __O
68 #define __O volatile
69 #endif
70 #ifndef __R
71 #define __R volatile const
72 #endif
73 
75 /* **** Definitions **** */
76 
88 typedef struct {
89  __IO uint32_t cnt;
90  __IO uint32_t cmp;
91  __IO uint32_t pwm;
92  __IO uint32_t intr;
93  __IO uint32_t cn;
94  __IO uint32_t nolcmp;
95  __IO uint32_t preset;
96  __IO uint32_t reload;
97  __IO uint32_t snapshot;
99 
100 /* Register offsets for module WUT */
107  #define MXC_R_WUT_CNT ((uint32_t)0x00000000UL)
108  #define MXC_R_WUT_CMP ((uint32_t)0x00000004UL)
109  #define MXC_R_WUT_PWM ((uint32_t)0x00000008UL)
110  #define MXC_R_WUT_INTR ((uint32_t)0x0000000CUL)
111  #define MXC_R_WUT_CN ((uint32_t)0x00000010UL)
112  #define MXC_R_WUT_NOLCMP ((uint32_t)0x00000014UL)
113  #define MXC_R_WUT_PRESET ((uint32_t)0x00000018UL)
114  #define MXC_R_WUT_RELOAD ((uint32_t)0x0000001CUL)
115  #define MXC_R_WUT_SNAPSHOT ((uint32_t)0x00000020UL)
125  #define MXC_F_WUT_INTR_IRQ_CLR_POS 0
126  #define MXC_F_WUT_INTR_IRQ_CLR ((uint32_t)(0x1UL << MXC_F_WUT_INTR_IRQ_CLR_POS))
136  #define MXC_F_WUT_CN_TMODE_POS 0
137  #define MXC_F_WUT_CN_TMODE ((uint32_t)(0x7UL << MXC_F_WUT_CN_TMODE_POS))
138  #define MXC_V_WUT_CN_TMODE_ONESHOT ((uint32_t)0x0UL)
139  #define MXC_S_WUT_CN_TMODE_ONESHOT (MXC_V_WUT_CN_TMODE_ONESHOT << MXC_F_WUT_CN_TMODE_POS)
140  #define MXC_V_WUT_CN_TMODE_CONTINUOUS ((uint32_t)0x1UL)
141  #define MXC_S_WUT_CN_TMODE_CONTINUOUS (MXC_V_WUT_CN_TMODE_CONTINUOUS << MXC_F_WUT_CN_TMODE_POS)
142  #define MXC_V_WUT_CN_TMODE_COUNTER ((uint32_t)0x2UL)
143  #define MXC_S_WUT_CN_TMODE_COUNTER (MXC_V_WUT_CN_TMODE_COUNTER << MXC_F_WUT_CN_TMODE_POS)
144  #define MXC_V_WUT_CN_TMODE_PWM ((uint32_t)0x3UL)
145  #define MXC_S_WUT_CN_TMODE_PWM (MXC_V_WUT_CN_TMODE_PWM << MXC_F_WUT_CN_TMODE_POS)
146  #define MXC_V_WUT_CN_TMODE_CAPTURE ((uint32_t)0x4UL)
147  #define MXC_S_WUT_CN_TMODE_CAPTURE (MXC_V_WUT_CN_TMODE_CAPTURE << MXC_F_WUT_CN_TMODE_POS)
148  #define MXC_V_WUT_CN_TMODE_COMPARE ((uint32_t)0x5UL)
149  #define MXC_S_WUT_CN_TMODE_COMPARE (MXC_V_WUT_CN_TMODE_COMPARE << MXC_F_WUT_CN_TMODE_POS)
150  #define MXC_V_WUT_CN_TMODE_GATED ((uint32_t)0x6UL)
151  #define MXC_S_WUT_CN_TMODE_GATED (MXC_V_WUT_CN_TMODE_GATED << MXC_F_WUT_CN_TMODE_POS)
152  #define MXC_V_WUT_CN_TMODE_CAPTURECOMPARE ((uint32_t)0x7UL)
153  #define MXC_S_WUT_CN_TMODE_CAPTURECOMPARE (MXC_V_WUT_CN_TMODE_CAPTURECOMPARE << MXC_F_WUT_CN_TMODE_POS)
155  #define MXC_F_WUT_CN_PRES_POS 3
156  #define MXC_F_WUT_CN_PRES ((uint32_t)(0x7UL << MXC_F_WUT_CN_PRES_POS))
157  #define MXC_V_WUT_CN_PRES_DIV1 ((uint32_t)0x0UL)
158  #define MXC_S_WUT_CN_PRES_DIV1 (MXC_V_WUT_CN_PRES_DIV1 << MXC_F_WUT_CN_PRES_POS)
159  #define MXC_V_WUT_CN_PRES_DIV2 ((uint32_t)0x1UL)
160  #define MXC_S_WUT_CN_PRES_DIV2 (MXC_V_WUT_CN_PRES_DIV2 << MXC_F_WUT_CN_PRES_POS)
161  #define MXC_V_WUT_CN_PRES_DIV4 ((uint32_t)0x2UL)
162  #define MXC_S_WUT_CN_PRES_DIV4 (MXC_V_WUT_CN_PRES_DIV4 << MXC_F_WUT_CN_PRES_POS)
163  #define MXC_V_WUT_CN_PRES_DIV8 ((uint32_t)0x3UL)
164  #define MXC_S_WUT_CN_PRES_DIV8 (MXC_V_WUT_CN_PRES_DIV8 << MXC_F_WUT_CN_PRES_POS)
165  #define MXC_V_WUT_CN_PRES_DIV16 ((uint32_t)0x4UL)
166  #define MXC_S_WUT_CN_PRES_DIV16 (MXC_V_WUT_CN_PRES_DIV16 << MXC_F_WUT_CN_PRES_POS)
167  #define MXC_V_WUT_CN_PRES_DIV32 ((uint32_t)0x5UL)
168  #define MXC_S_WUT_CN_PRES_DIV32 (MXC_V_WUT_CN_PRES_DIV32 << MXC_F_WUT_CN_PRES_POS)
169  #define MXC_V_WUT_CN_PRES_DIV64 ((uint32_t)0x6UL)
170  #define MXC_S_WUT_CN_PRES_DIV64 (MXC_V_WUT_CN_PRES_DIV64 << MXC_F_WUT_CN_PRES_POS)
171  #define MXC_V_WUT_CN_PRES_DIV128 ((uint32_t)0x7UL)
172  #define MXC_S_WUT_CN_PRES_DIV128 (MXC_V_WUT_CN_PRES_DIV128 << MXC_F_WUT_CN_PRES_POS)
174  #define MXC_F_WUT_CN_TPOL_POS 6
175  #define MXC_F_WUT_CN_TPOL ((uint32_t)(0x1UL << MXC_F_WUT_CN_TPOL_POS))
177  #define MXC_F_WUT_CN_TEN_POS 7
178  #define MXC_F_WUT_CN_TEN ((uint32_t)(0x1UL << MXC_F_WUT_CN_TEN_POS))
180  #define MXC_F_WUT_CN_PRES3_POS 8
181  #define MXC_F_WUT_CN_PRES3 ((uint32_t)(0x1UL << MXC_F_WUT_CN_PRES3_POS))
183  #define MXC_F_WUT_CN_PWMSYNC_POS 9
184  #define MXC_F_WUT_CN_PWMSYNC ((uint32_t)(0x1UL << MXC_F_WUT_CN_PWMSYNC_POS))
186  #define MXC_F_WUT_CN_NOLHPOL_POS 10
187  #define MXC_F_WUT_CN_NOLHPOL ((uint32_t)(0x1UL << MXC_F_WUT_CN_NOLHPOL_POS))
189  #define MXC_F_WUT_CN_NOLLPOL_POS 11
190  #define MXC_F_WUT_CN_NOLLPOL ((uint32_t)(0x1UL << MXC_F_WUT_CN_NOLLPOL_POS))
192  #define MXC_F_WUT_CN_PWMCKBD_POS 12
193  #define MXC_F_WUT_CN_PWMCKBD ((uint32_t)(0x1UL << MXC_F_WUT_CN_PWMCKBD_POS))
203  #define MXC_F_WUT_NOLCMP_NOLLCMP_POS 0
204  #define MXC_F_WUT_NOLCMP_NOLLCMP ((uint32_t)(0xFFUL << MXC_F_WUT_NOLCMP_NOLLCMP_POS))
206  #define MXC_F_WUT_NOLCMP_NOLHCMP_POS 8
207  #define MXC_F_WUT_NOLCMP_NOLHCMP ((uint32_t)(0xFFUL << MXC_F_WUT_NOLCMP_NOLHCMP_POS))
211 #ifdef __cplusplus
212 }
213 #endif
214 
215 #endif /* _WUT_REGS_H_ */
__IO uint32_t nolcmp
Definition: wut_regs.h:94
__IO uint32_t cn
Definition: wut_regs.h:93
Definition: wut_regs.h:88
__IO uint32_t cnt
Definition: wut_regs.h:89
__IO uint32_t preset
Definition: wut_regs.h:95
__IO uint32_t reload
Definition: wut_regs.h:96
__IO uint32_t cmp
Definition: wut_regs.h:90
__IO uint32_t snapshot
Definition: wut_regs.h:97
__IO uint32_t intr
Definition: wut_regs.h:92
__IO uint32_t pwm
Definition: wut_regs.h:91