MAX32665 Peripheral Driver API
Peripheral Driver API for the MAX32665
tmr_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 _TMR_REGS_H_
41
#define _TMR_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
}
mxc_tmr_regs_t
;
96
97
/* Register offsets for module TMR */
104
#define MXC_R_TMR_CNT ((uint32_t)0x00000000UL)
105
#define MXC_R_TMR_CMP ((uint32_t)0x00000004UL)
106
#define MXC_R_TMR_PWM ((uint32_t)0x00000008UL)
107
#define MXC_R_TMR_INTR ((uint32_t)0x0000000CUL)
108
#define MXC_R_TMR_CN ((uint32_t)0x00000010UL)
109
#define MXC_R_TMR_NOLCMP ((uint32_t)0x00000014UL)
119
#define MXC_F_TMR_INTR_IRQ_POS 0
120
#define MXC_F_TMR_INTR_IRQ ((uint32_t)(0x1UL << MXC_F_TMR_INTR_IRQ_POS))
130
#define MXC_F_TMR_CN_TMODE_POS 0
131
#define MXC_F_TMR_CN_TMODE ((uint32_t)(0x7UL << MXC_F_TMR_CN_TMODE_POS))
132
#define MXC_V_TMR_CN_TMODE_ONESHOT ((uint32_t)0x0UL)
133
#define MXC_S_TMR_CN_TMODE_ONESHOT (MXC_V_TMR_CN_TMODE_ONESHOT << MXC_F_TMR_CN_TMODE_POS)
134
#define MXC_V_TMR_CN_TMODE_CONTINUOUS ((uint32_t)0x1UL)
135
#define MXC_S_TMR_CN_TMODE_CONTINUOUS (MXC_V_TMR_CN_TMODE_CONTINUOUS << MXC_F_TMR_CN_TMODE_POS)
136
#define MXC_V_TMR_CN_TMODE_COUNTER ((uint32_t)0x2UL)
137
#define MXC_S_TMR_CN_TMODE_COUNTER (MXC_V_TMR_CN_TMODE_COUNTER << MXC_F_TMR_CN_TMODE_POS)
138
#define MXC_V_TMR_CN_TMODE_PWM ((uint32_t)0x3UL)
139
#define MXC_S_TMR_CN_TMODE_PWM (MXC_V_TMR_CN_TMODE_PWM << MXC_F_TMR_CN_TMODE_POS)
140
#define MXC_V_TMR_CN_TMODE_CAPTURE ((uint32_t)0x4UL)
141
#define MXC_S_TMR_CN_TMODE_CAPTURE (MXC_V_TMR_CN_TMODE_CAPTURE << MXC_F_TMR_CN_TMODE_POS)
142
#define MXC_V_TMR_CN_TMODE_COMPARE ((uint32_t)0x5UL)
143
#define MXC_S_TMR_CN_TMODE_COMPARE (MXC_V_TMR_CN_TMODE_COMPARE << MXC_F_TMR_CN_TMODE_POS)
144
#define MXC_V_TMR_CN_TMODE_GATED ((uint32_t)0x6UL)
145
#define MXC_S_TMR_CN_TMODE_GATED (MXC_V_TMR_CN_TMODE_GATED << MXC_F_TMR_CN_TMODE_POS)
146
#define MXC_V_TMR_CN_TMODE_CAPTURECOMPARE ((uint32_t)0x7UL)
147
#define MXC_S_TMR_CN_TMODE_CAPTURECOMPARE (MXC_V_TMR_CN_TMODE_CAPTURECOMPARE << MXC_F_TMR_CN_TMODE_POS)
149
#define MXC_F_TMR_CN_PRES_POS 3
150
#define MXC_F_TMR_CN_PRES ((uint32_t)(0x7UL << MXC_F_TMR_CN_PRES_POS))
151
#define MXC_V_TMR_CN_PRES_DIV1 ((uint32_t)0x0UL)
152
#define MXC_S_TMR_CN_PRES_DIV1 (MXC_V_TMR_CN_PRES_DIV1 << MXC_F_TMR_CN_PRES_POS)
153
#define MXC_V_TMR_CN_PRES_DIV2 ((uint32_t)0x1UL)
154
#define MXC_S_TMR_CN_PRES_DIV2 (MXC_V_TMR_CN_PRES_DIV2 << MXC_F_TMR_CN_PRES_POS)
155
#define MXC_V_TMR_CN_PRES_DIV4 ((uint32_t)0x2UL)
156
#define MXC_S_TMR_CN_PRES_DIV4 (MXC_V_TMR_CN_PRES_DIV4 << MXC_F_TMR_CN_PRES_POS)
157
#define MXC_V_TMR_CN_PRES_DIV8 ((uint32_t)0x3UL)
158
#define MXC_S_TMR_CN_PRES_DIV8 (MXC_V_TMR_CN_PRES_DIV8 << MXC_F_TMR_CN_PRES_POS)
159
#define MXC_V_TMR_CN_PRES_DIV16 ((uint32_t)0x4UL)
160
#define MXC_S_TMR_CN_PRES_DIV16 (MXC_V_TMR_CN_PRES_DIV16 << MXC_F_TMR_CN_PRES_POS)
161
#define MXC_V_TMR_CN_PRES_DIV32 ((uint32_t)0x5UL)
162
#define MXC_S_TMR_CN_PRES_DIV32 (MXC_V_TMR_CN_PRES_DIV32 << MXC_F_TMR_CN_PRES_POS)
163
#define MXC_V_TMR_CN_PRES_DIV64 ((uint32_t)0x6UL)
164
#define MXC_S_TMR_CN_PRES_DIV64 (MXC_V_TMR_CN_PRES_DIV64 << MXC_F_TMR_CN_PRES_POS)
165
#define MXC_V_TMR_CN_PRES_DIV128 ((uint32_t)0x7UL)
166
#define MXC_S_TMR_CN_PRES_DIV128 (MXC_V_TMR_CN_PRES_DIV128 << MXC_F_TMR_CN_PRES_POS)
168
#define MXC_F_TMR_CN_TPOL_POS 6
169
#define MXC_F_TMR_CN_TPOL ((uint32_t)(0x1UL << MXC_F_TMR_CN_TPOL_POS))
171
#define MXC_F_TMR_CN_TEN_POS 7
172
#define MXC_F_TMR_CN_TEN ((uint32_t)(0x1UL << MXC_F_TMR_CN_TEN_POS))
174
#define MXC_F_TMR_CN_PRES3_POS 8
175
#define MXC_F_TMR_CN_PRES3 ((uint32_t)(0x1UL << MXC_F_TMR_CN_PRES3_POS))
177
#define MXC_F_TMR_CN_PWMSYNC_POS 9
178
#define MXC_F_TMR_CN_PWMSYNC ((uint32_t)(0x1UL << MXC_F_TMR_CN_PWMSYNC_POS))
180
#define MXC_F_TMR_CN_NOLHPOL_POS 10
181
#define MXC_F_TMR_CN_NOLHPOL ((uint32_t)(0x1UL << MXC_F_TMR_CN_NOLHPOL_POS))
183
#define MXC_F_TMR_CN_NOLLPOL_POS 11
184
#define MXC_F_TMR_CN_NOLLPOL ((uint32_t)(0x1UL << MXC_F_TMR_CN_NOLLPOL_POS))
186
#define MXC_F_TMR_CN_PWMCKBD_POS 12
187
#define MXC_F_TMR_CN_PWMCKBD ((uint32_t)(0x1UL << MXC_F_TMR_CN_PWMCKBD_POS))
197
#define MXC_F_TMR_NOLCMP_NOLLCMP_POS 0
198
#define MXC_F_TMR_NOLCMP_NOLLCMP ((uint32_t)(0xFFUL << MXC_F_TMR_NOLCMP_NOLLCMP_POS))
200
#define MXC_F_TMR_NOLCMP_NOLHCMP_POS 8
201
#define MXC_F_TMR_NOLCMP_NOLHCMP ((uint32_t)(0xFFUL << MXC_F_TMR_NOLCMP_NOLHCMP_POS))
205
#ifdef __cplusplus
206
}
207
#endif
208
209
#endif
/* _TMR_REGS_H_ */
mxc_tmr_regs_t::intr
__IO uint32_t intr
Definition:
tmr_regs.h:92
mxc_tmr_regs_t::pwm
__IO uint32_t pwm
Definition:
tmr_regs.h:91
mxc_tmr_regs_t::nolcmp
__IO uint32_t nolcmp
Definition:
tmr_regs.h:94
mxc_tmr_regs_t::cnt
__IO uint32_t cnt
Definition:
tmr_regs.h:89
mxc_tmr_regs_t::cmp
__IO uint32_t cmp
Definition:
tmr_regs.h:90
mxc_tmr_regs_t
Definition:
tmr_regs.h:88
mxc_tmr_regs_t::cn
__IO uint32_t cn
Definition:
tmr_regs.h:93
CMSIS
Device
Maxim
MAX32665
Include
tmr_regs.h
Generated on Fri Dec 4 2020 11:48:59 for MAX32665 Peripheral Driver API by
1.8.20