MAX32665 Peripheral Driver API
Peripheral Driver API for the MAX32665
wut_regs.h
1 
6 /* ****************************************************************************
7  * Copyright (C) 2016 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 intfl;
93  __IO uint32_t ctrl;
94  __IO uint32_t nolcmp;
96 
97 /* Register offsets for module WUT */
104  #define MXC_R_WUT_CNT ((uint32_t)0x00000000UL)
105  #define MXC_R_WUT_CMP ((uint32_t)0x00000004UL)
106  #define MXC_R_WUT_PWM ((uint32_t)0x00000008UL)
107  #define MXC_R_WUT_INTFL ((uint32_t)0x0000000CUL)
108  #define MXC_R_WUT_CTRL ((uint32_t)0x00000010UL)
109  #define MXC_R_WUT_NOLCMP ((uint32_t)0x00000014UL)
118  #define MXC_F_WUT_CNT_COUNT_POS 0
119  #define MXC_F_WUT_CNT_COUNT ((uint32_t)(0xFFFFFFFFUL << MXC_F_WUT_CNT_COUNT_POS))
129  #define MXC_F_WUT_CMP_COMPARE_POS 0
130  #define MXC_F_WUT_CMP_COMPARE ((uint32_t)(0xFFFFFFFFUL << MXC_F_WUT_CMP_COMPARE_POS))
140  #define MXC_F_WUT_PWM_PWM_POS 0
141  #define MXC_F_WUT_PWM_PWM ((uint32_t)(0xFFFFFFFFUL << MXC_F_WUT_PWM_PWM_POS))
151  #define MXC_F_WUT_INTFL_IRQ_CLR_POS 0
152  #define MXC_F_WUT_INTFL_IRQ_CLR ((uint32_t)(0x1UL << MXC_F_WUT_INTFL_IRQ_CLR_POS))
162  #define MXC_F_WUT_CTRL_TMODE_POS 0
163  #define MXC_F_WUT_CTRL_TMODE ((uint32_t)(0x7UL << MXC_F_WUT_CTRL_TMODE_POS))
164  #define MXC_V_WUT_CTRL_TMODE_ONESHOT ((uint32_t)0x0UL)
165  #define MXC_S_WUT_CTRL_TMODE_ONESHOT (MXC_V_WUT_CTRL_TMODE_ONESHOT << MXC_F_WUT_CTRL_TMODE_POS)
166  #define MXC_V_WUT_CTRL_TMODE_CONTINUOUS ((uint32_t)0x1UL)
167  #define MXC_S_WUT_CTRL_TMODE_CONTINUOUS (MXC_V_WUT_CTRL_TMODE_CONTINUOUS << MXC_F_WUT_CTRL_TMODE_POS)
169  #define MXC_F_WUT_CTRL_PRES_POS 3
170  #define MXC_F_WUT_CTRL_PRES ((uint32_t)(0x7UL << MXC_F_WUT_CTRL_PRES_POS))
171  #define MXC_V_WUT_CTRL_PRES_DIV1 ((uint32_t)0x0UL)
172  #define MXC_S_WUT_CTRL_PRES_DIV1 (MXC_V_WUT_CTRL_PRES_DIV1 << MXC_F_WUT_CTRL_PRES_POS)
173  #define MXC_V_WUT_CTRL_PRES_DIV2 ((uint32_t)0x1UL)
174  #define MXC_S_WUT_CTRL_PRES_DIV2 (MXC_V_WUT_CTRL_PRES_DIV2 << MXC_F_WUT_CTRL_PRES_POS)
175  #define MXC_V_WUT_CTRL_PRES_DIV4 ((uint32_t)0x2UL)
176  #define MXC_S_WUT_CTRL_PRES_DIV4 (MXC_V_WUT_CTRL_PRES_DIV4 << MXC_F_WUT_CTRL_PRES_POS)
177  #define MXC_V_WUT_CTRL_PRES_DIV8 ((uint32_t)0x3UL)
178  #define MXC_S_WUT_CTRL_PRES_DIV8 (MXC_V_WUT_CTRL_PRES_DIV8 << MXC_F_WUT_CTRL_PRES_POS)
179  #define MXC_V_WUT_CTRL_PRES_DIV16 ((uint32_t)0x4UL)
180  #define MXC_S_WUT_CTRL_PRES_DIV16 (MXC_V_WUT_CTRL_PRES_DIV16 << MXC_F_WUT_CTRL_PRES_POS)
181  #define MXC_V_WUT_CTRL_PRES_DIV32 ((uint32_t)0x5UL)
182  #define MXC_S_WUT_CTRL_PRES_DIV32 (MXC_V_WUT_CTRL_PRES_DIV32 << MXC_F_WUT_CTRL_PRES_POS)
183  #define MXC_V_WUT_CTRL_PRES_DIV64 ((uint32_t)0x6UL)
184  #define MXC_S_WUT_CTRL_PRES_DIV64 (MXC_V_WUT_CTRL_PRES_DIV64 << MXC_F_WUT_CTRL_PRES_POS)
185  #define MXC_V_WUT_CTRL_PRES_DIV128 ((uint32_t)0x7UL)
186  #define MXC_S_WUT_CTRL_PRES_DIV128 (MXC_V_WUT_CTRL_PRES_DIV128 << MXC_F_WUT_CTRL_PRES_POS)
187  #define MXC_V_WUT_CTRL_PRES_DIV256 ((uint32_t)0x0UL)
188  #define MXC_S_WUT_CTRL_PRES_DIV256 (MXC_V_WUT_CTRL_PRES_DIV256 << MXC_F_WUT_CTRL_PRES_POS)
189  #define MXC_V_WUT_CTRL_PRES_DIV512 ((uint32_t)0x2UL)
190  #define MXC_S_WUT_CTRL_PRES_DIV512 (MXC_V_WUT_CTRL_PRES_DIV512 << MXC_F_WUT_CTRL_PRES_POS)
191  #define MXC_V_WUT_CTRL_PRES_DIV1024 ((uint32_t)0x3UL)
192  #define MXC_S_WUT_CTRL_PRES_DIV1024 (MXC_V_WUT_CTRL_PRES_DIV1024 << MXC_F_WUT_CTRL_PRES_POS)
193  #define MXC_V_WUT_CTRL_PRES_DIV2048 ((uint32_t)0x4UL)
194  #define MXC_S_WUT_CTRL_PRES_DIV2048 (MXC_V_WUT_CTRL_PRES_DIV2048 << MXC_F_WUT_CTRL_PRES_POS)
195  #define MXC_V_WUT_CTRL_PRES_DIV4096 ((uint32_t)0x5UL)
196  #define MXC_S_WUT_CTRL_PRES_DIV4096 (MXC_V_WUT_CTRL_PRES_DIV4096 << MXC_F_WUT_CTRL_PRES_POS)
198  #define MXC_F_WUT_CTRL_TPOL_POS 6
199  #define MXC_F_WUT_CTRL_TPOL ((uint32_t)(0x1UL << MXC_F_WUT_CTRL_TPOL_POS))
201  #define MXC_F_WUT_CTRL_TEN_POS 7
202  #define MXC_F_WUT_CTRL_TEN ((uint32_t)(0x1UL << MXC_F_WUT_CTRL_TEN_POS))
204  #define MXC_F_WUT_CTRL_PRES3_POS 8
205  #define MXC_F_WUT_CTRL_PRES3 ((uint32_t)(0x1UL << MXC_F_WUT_CTRL_PRES3_POS))
207  #define MXC_F_WUT_CTRL_PWMSYNC_POS 9
208  #define MXC_F_WUT_CTRL_PWMSYNC ((uint32_t)(0x1UL << MXC_F_WUT_CTRL_PWMSYNC_POS))
210  #define MXC_F_WUT_CTRL_NOLHPOL_POS 10
211  #define MXC_F_WUT_CTRL_NOLHPOL ((uint32_t)(0x1UL << MXC_F_WUT_CTRL_NOLHPOL_POS))
213  #define MXC_F_WUT_CTRL_NOLLPOL_POS 11
214  #define MXC_F_WUT_CTRL_NOLLPOL ((uint32_t)(0x1UL << MXC_F_WUT_CTRL_NOLLPOL_POS))
216  #define MXC_F_WUT_CTRL_PWMCKBD_POS 12
217  #define MXC_F_WUT_CTRL_PWMCKBD ((uint32_t)(0x1UL << MXC_F_WUT_CTRL_PWMCKBD_POS))
227  #define MXC_F_WUT_NOLCMP_NOLLCMP_POS 0
228  #define MXC_F_WUT_NOLCMP_NOLLCMP ((uint32_t)(0xFFUL << MXC_F_WUT_NOLCMP_NOLLCMP_POS))
230  #define MXC_F_WUT_NOLCMP_NOLHCMP_POS 8
231  #define MXC_F_WUT_NOLCMP_NOLHCMP ((uint32_t)(0xFFUL << MXC_F_WUT_NOLCMP_NOLHCMP_POS))
235 #ifdef __cplusplus
236 }
237 #endif
238 
239 #endif /* _WUT_REGS_H_ */
mxc_wut_regs_t::pwm
__IO uint32_t pwm
Definition: wut_regs.h:91
mxc_wut_regs_t
Definition: wut_regs.h:88
mxc_wut_regs_t::intfl
__IO uint32_t intfl
Definition: wut_regs.h:92
mxc_wut_regs_t::ctrl
__IO uint32_t ctrl
Definition: wut_regs.h:93
mxc_wut_regs_t::nolcmp
__IO uint32_t nolcmp
Definition: wut_regs.h:94
mxc_wut_regs_t::cnt
__IO uint32_t cnt
Definition: wut_regs.h:89
mxc_wut_regs_t::cmp
__IO uint32_t cmp
Definition: wut_regs.h:90