1 |
786 |
skrzyp |
#ifndef CYGONCE_HAL_VAR_IO_H
|
2 |
|
|
#define CYGONCE_HAL_VAR_IO_H
|
3 |
|
|
//=============================================================================
|
4 |
|
|
//
|
5 |
|
|
// var_io.h
|
6 |
|
|
//
|
7 |
|
|
// Variant specific registers
|
8 |
|
|
//
|
9 |
|
|
//=============================================================================
|
10 |
|
|
// ####ECOSGPLCOPYRIGHTBEGIN####
|
11 |
|
|
// -------------------------------------------
|
12 |
|
|
// This file is part of eCos, the Embedded Configurable Operating System.
|
13 |
|
|
// Copyright (C) 2004 Free Software Foundation, Inc.
|
14 |
|
|
//
|
15 |
|
|
// eCos is free software; you can redistribute it and/or modify it under
|
16 |
|
|
// the terms of the GNU General Public License as published by the Free
|
17 |
|
|
// Software Foundation; either version 2 or (at your option) any later
|
18 |
|
|
// version.
|
19 |
|
|
//
|
20 |
|
|
// eCos is distributed in the hope that it will be useful, but WITHOUT
|
21 |
|
|
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
22 |
|
|
// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
23 |
|
|
// for more details.
|
24 |
|
|
//
|
25 |
|
|
// You should have received a copy of the GNU General Public License
|
26 |
|
|
// along with eCos; if not, write to the Free Software Foundation, Inc.,
|
27 |
|
|
// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
28 |
|
|
//
|
29 |
|
|
// As a special exception, if other files instantiate templates or use
|
30 |
|
|
// macros or inline functions from this file, or you compile this file
|
31 |
|
|
// and link it with other works to produce a work based on this file,
|
32 |
|
|
// this file does not by itself cause the resulting work to be covered by
|
33 |
|
|
// the GNU General Public License. However the source code for this file
|
34 |
|
|
// must still be made available in accordance with section (3) of the GNU
|
35 |
|
|
// General Public License v2.
|
36 |
|
|
//
|
37 |
|
|
// This exception does not invalidate any other reasons why a work based
|
38 |
|
|
// on this file might be covered by the GNU General Public License.
|
39 |
|
|
// -------------------------------------------
|
40 |
|
|
// ####ECOSGPLCOPYRIGHTEND####
|
41 |
|
|
//=============================================================================
|
42 |
|
|
//#####DESCRIPTIONBEGIN####
|
43 |
|
|
//
|
44 |
|
|
// Author(s): jlarmour
|
45 |
|
|
// Contributors:
|
46 |
|
|
// Date: 2004-07-23
|
47 |
|
|
// Purpose: Philips LPC2xxx variant specific registers
|
48 |
|
|
// Description:
|
49 |
|
|
// Usage: #include <cyg/hal/var_io.h>
|
50 |
|
|
//
|
51 |
|
|
//####DESCRIPTIONEND####
|
52 |
|
|
//
|
53 |
|
|
//=============================================================================
|
54 |
|
|
|
55 |
|
|
#include <pkgconf/hal_arm_lpc2xxx.h> // variant chip model selection.
|
56 |
|
|
#include <cyg/hal/plf_io.h>
|
57 |
|
|
|
58 |
|
|
//=============================================================================
|
59 |
|
|
// Memory access macros
|
60 |
|
|
|
61 |
|
|
#ifndef CYGARC_CACHED_ADDRESS
|
62 |
|
|
# define CYGARC_CACHED_ADDRESS(x) (x)
|
63 |
|
|
#endif
|
64 |
|
|
#ifndef CYGARC_UNCACHED_ADDRESS
|
65 |
|
|
# define CYGARC_UNCACHED_ADDRESS(x) (x)
|
66 |
|
|
#endif
|
67 |
|
|
#ifndef CYGARC_PHYSICAL_ADDRESS
|
68 |
|
|
# define CYGARC_PHYSICAL_ADDRESS(x) (x)
|
69 |
|
|
#endif
|
70 |
|
|
#ifndef CYGARC_VIRTUAL_ADDRESS
|
71 |
|
|
# define CYGARC_VIRTUAL_ADDRESS(x) (x)
|
72 |
|
|
#endif
|
73 |
|
|
|
74 |
|
|
//=============================================================================
|
75 |
|
|
// Watchdog (WD)
|
76 |
|
|
|
77 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_WD_BASE 0xE0000000
|
78 |
|
|
|
79 |
|
|
// Registers are offsets from base of this subsystem
|
80 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_WDMOD 0x0000
|
81 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_WDMOD_WDEN (1<<0)
|
82 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_WDMOD_WDRESET (1<<1)
|
83 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_WDMOD_WDTOF (1<<2)
|
84 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_WDMOD_WDINT (1<<3)
|
85 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_WDTC 0x0004
|
86 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_WDFEED 0x0008
|
87 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_WDFEED_MAGIC1 0xAA
|
88 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_WDFEED_MAGIC2 0x55
|
89 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_WDTV 0x000C
|
90 |
|
|
|
91 |
|
|
//=============================================================================
|
92 |
|
|
// Timers (Tx)
|
93 |
|
|
|
94 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_TIMER0_BASE 0xE0004000
|
95 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_TIMER1_BASE 0xE0008000
|
96 |
|
|
|
97 |
|
|
// Registers are offsets from base for each timer
|
98 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_TxIR 0x0000
|
99 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_TxIR_MR0 (1<<0)
|
100 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_TxIR_MR1 (1<<1)
|
101 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_TxIR_MR2 (1<<2)
|
102 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_TxIR_MR3 (1<<3)
|
103 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_TxIR_CR0 (1<<4)
|
104 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_TxIR_CR1 (1<<5)
|
105 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_TxIR_CR2 (1<<6)
|
106 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_TxIR_CR3 (1<<7)
|
107 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_TxTCR 0x0004
|
108 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_TxTCR_CTR_ENABLE (1<<0)
|
109 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_TxTCR_CTR_RESET (1<<1)
|
110 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_TxTC 0x0008
|
111 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_TxPR 0x000C
|
112 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_TxPC 0x0010
|
113 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_TxMCR 0x0014
|
114 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_TxMCR_MR0_INT (1<<0)
|
115 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_TxMCR_MR0_RESET (1<<1)
|
116 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_TxMCR_MR0_STOP (1<<2)
|
117 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_TxMCR_MR1_INT (1<<3)
|
118 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_TxMCR_MR1_RESET (1<<4)
|
119 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_TxMCR_MR1_STOP (1<<5)
|
120 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_TxMCR_MR2_INT (1<<6)
|
121 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_TxMCR_MR2_RESET (1<<7)
|
122 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_TxMCR_MR2_STOP (1<<8)
|
123 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_TxMCR_MR3_INT (1<<9)
|
124 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_TxMCR_MR3_RESET (1<<10)
|
125 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_TxMCR_MR3_STOP (1<<11)
|
126 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_TxMR0 0x0018
|
127 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_TxMR1 0x001C
|
128 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_TxMR2 0x0020
|
129 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_TxMR3 0x0024
|
130 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_TxCCR 0x0028
|
131 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_TxCCR_INT_CR0_RISE (1<<0)
|
132 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_TxCCR_INT_CR0_FALL (1<<1)
|
133 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_TxCCR_INT_CR0 (1<<2)
|
134 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_TxCCR_INT_CR1_RISE (1<<3)
|
135 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_TxCCR_INT_CR1_FALL (1<<4)
|
136 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_TxCCR_INT_CR1 (1<<5)
|
137 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_TxCCR_INT_CR2_RISE (1<<6)
|
138 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_TxCCR_INT_CR2_FALL (1<<7)
|
139 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_TxCCR_INT_CR2 (1<<8)
|
140 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_TxCCR_INT_CR3_RISE (1<<9)
|
141 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_TxCCR_INT_CR3_FALL (1<<10)
|
142 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_TxCCR_INT_CR3 (1<<11)
|
143 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_TxCR0 0x002C
|
144 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_TxCR1 0x0030
|
145 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_TxCR2 0x0034
|
146 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_TxCR3 0x0038
|
147 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_TxEMR 0x003C
|
148 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_TxEMR_EM0 (1<<0)
|
149 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_TxEMR_EM1 (1<<1)
|
150 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_TxEMR_EM2 (1<<2)
|
151 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_TxEMR_EM3 (1<<3)
|
152 |
|
|
|
153 |
|
|
//=============================================================================
|
154 |
|
|
// UARTs (Ux)
|
155 |
|
|
|
156 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_UART0_BASE 0xE000C000
|
157 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_UART1_BASE 0xE0010000
|
158 |
|
|
|
159 |
|
|
// Registers are offsets from base for each UART
|
160 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_UxRBR 0x0000 // DLAB=0 read
|
161 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_UxTHR 0x0000 // DLAB=0 write
|
162 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_UxDLL 0x0000 // DLAB=1 r/w
|
163 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_UxIER 0x0004 // DLAB=0
|
164 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_UxIER_RXDATA_INT (1<<0)
|
165 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_UxIER_THRE_INT (1<<1)
|
166 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_UxIER_RXLS_INT (1<<2)
|
167 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_U1IER_RXMS_INT (1<<3) // U1 only
|
168 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_UxDLM 0x0004 // DLAB=1
|
169 |
|
|
|
170 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_UxIIR 0x0008 // read
|
171 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_UxIIR_IIR0 (1<<0)
|
172 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_UxIIR_IIR1 (1<<1)
|
173 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_UxIIR_IIR2 (1<<2)
|
174 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_UxIIR_IIR3 (1<<3)
|
175 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_UxIIR_FIFOS (0xB0)
|
176 |
|
|
|
177 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_UxFCR 0x0008 // write
|
178 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_UxFCR_FIFO_ENA (1<<0)
|
179 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_UxFCR_RX_FIFO_RESET (1<<1)
|
180 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_UxFCR_TX_FIFO_RESET (1<<2)
|
181 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_UxFCR_RX_TRIGGER_0 (0x00)
|
182 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_UxFCR_RX_TRIGGER_1 (0x40)
|
183 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_UxFCR_RX_TRIGGER_2 (0x80)
|
184 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_UxFCR_RX_TRIGGER_3 (0xB0)
|
185 |
|
|
|
186 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_UxLCR 0x000C
|
187 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_UxLCR_WORD_LENGTH_5 (0x00)
|
188 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_UxLCR_WORD_LENGTH_6 (0x01)
|
189 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_UxLCR_WORD_LENGTH_7 (0x02)
|
190 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_UxLCR_WORD_LENGTH_8 (0x03)
|
191 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_UxLCR_STOP_1 (0x00)
|
192 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_UxLCR_STOP_2 (0x04)
|
193 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_UxLCR_PARITY_ENA (0x08)
|
194 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_UxLCR_PARITY_ODD (0x00)
|
195 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_UxLCR_PARITY_EVEN (0x10)
|
196 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_UxLCR_PARITY_ONE (0x20)
|
197 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_UxLCR_PARITY_ZERO (0x30)
|
198 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_UxLCR_BREAK_ENA (0x40)
|
199 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_UxLCR_DLAB (0x80)
|
200 |
|
|
|
201 |
|
|
|
202 |
|
|
// Modem Control Register is UART1 only
|
203 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_U1MCR 0x0010
|
204 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_U1MCR_DTR (1<<0)
|
205 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_U1MCR_RTS (1<<1)
|
206 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_U1MCR_LOOPBACK (1<<4)
|
207 |
|
|
|
208 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_UxLSR 0x0014
|
209 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_UxLSR_RDR (1<<0)
|
210 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_UxLSR_OE (1<<1)
|
211 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_UxLSR_PE (1<<2)
|
212 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_UxLSR_FE (1<<3)
|
213 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_UxLSR_BI (1<<4)
|
214 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_UxLSR_THRE (1<<5)
|
215 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_UxLSR_TEMT (1<<6)
|
216 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_UxLSR_RX_FIFO_ERR (1<<7)
|
217 |
|
|
|
218 |
|
|
// Modem Status Register is UART1 only
|
219 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_U1MSR 0x0018
|
220 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_U1MSR_DCTS (1<<0)
|
221 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_U1MSR_DDSR (1<<1)
|
222 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_U1MSR_RI_FALL (1<<2)
|
223 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_U1MSR_DDCD (1<<3)
|
224 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_U1MSR_CTS (1<<4)
|
225 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_U1MSR_DSR (1<<5)
|
226 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_U1MSR_RI (1<<6)
|
227 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_U1MSR_DCD (1<<7)
|
228 |
|
|
|
229 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_UxSCR 0x001C
|
230 |
|
|
|
231 |
|
|
//=============================================================================
|
232 |
|
|
// Pulse Width Modulator (PWM)
|
233 |
|
|
|
234 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_PWM_BASE 0xE0014000
|
235 |
|
|
|
236 |
|
|
// Registers are offsets from base of this subsystem
|
237 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_PWMIR 0x0000
|
238 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_PWMIR_MR0_INT (1<<0)
|
239 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_PWMIR_MR1_INT (1<<1)
|
240 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_PWMIR_MR2_INT (1<<2)
|
241 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_PWMIR_MR3_INT (1<<3)
|
242 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_PWMIR_MR4_INT (1<<8)
|
243 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_PWMIR_MR5_INT (1<<9)
|
244 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_PWMIR_MR6_INT (1<<10)
|
245 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_PWMTCR 0x0004
|
246 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_PWMTCR_CTR_ENA (1<<0)
|
247 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_PWMTCR_CTR_RESET (1<<1)
|
248 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_PWMTCR_PWM_ENA (1<<3)
|
249 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_PWMTC 0x0008
|
250 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_PWMPR 0x000C
|
251 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_PWMPC 0x0010
|
252 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_PWMMCR 0x0014
|
253 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_PWMMCR_MR0_INT (1<<0)
|
254 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_PWMMCR_MR0_RESET (1<<1)
|
255 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_PWMMCR_MR0_STOP (1<<2)
|
256 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_PWMMCR_MR1_INT (1<<3)
|
257 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_PWMMCR_MR1_RESET (1<<4)
|
258 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_PWMMCR_MR1_STOP (1<<5)
|
259 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_PWMMCR_MR2_INT (1<<6)
|
260 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_PWMMCR_MR2_RESET (1<<7)
|
261 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_PWMMCR_MR2_STOP (1<<8)
|
262 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_PWMMCR_MR3_INT (1<<9)
|
263 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_PWMMCR_MR3_RESET (1<<10)
|
264 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_PWMMCR_MR3_STOP (1<<11)
|
265 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_PWMMCR_MR4_INT (1<<12)
|
266 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_PWMMCR_MR4_RESET (1<<13)
|
267 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_PWMMCR_MR4_STOP (1<<14)
|
268 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_PWMMCR_MR5_INT (1<<15)
|
269 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_PWMMCR_MR5_RESET (1<<16)
|
270 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_PWMMCR_MR5_STOP (1<<17)
|
271 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_PWMMCR_MR6_INT (1<<18)
|
272 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_PWMMCR_MR6_RESET (1<<19)
|
273 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_PWMMCR_MR6_STOP (1<<20)
|
274 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_PWMMR0 0x0018
|
275 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_PWMMR1 0x001C
|
276 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_PWMMR2 0x0020
|
277 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_PWMMR3 0x0024
|
278 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_PWMMR4 0x0040
|
279 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_PWMMR5 0x0044
|
280 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_PWMMR6 0x0048
|
281 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_PWMMPCR 0x004C
|
282 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_PWMMPCR_SEL1 (1<<1)
|
283 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_PWMMPCR_SEL2 (1<<2)
|
284 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_PWMMPCR_SEL3 (1<<3)
|
285 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_PWMMPCR_SEL4 (1<<4)
|
286 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_PWMMPCR_SEL5 (1<<5)
|
287 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_PWMMPCR_SEL6 (1<<6)
|
288 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_PWMMPCR_ENA1 (1<<9)
|
289 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_PWMMPCR_ENA2 (1<<10)
|
290 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_PWMMPCR_ENA3 (1<<11)
|
291 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_PWMMPCR_ENA4 (1<<12)
|
292 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_PWMMPCR_ENA5 (1<<13)
|
293 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_PWMMPCR_ENA6 (1<<14)
|
294 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_PWMLER 0x0050
|
295 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_PWMLER_M0_ENA (1<<0)
|
296 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_PWMLER_M1_ENA (1<<1)
|
297 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_PWMLER_M2_ENA (1<<2)
|
298 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_PWMLER_M3_ENA (1<<3)
|
299 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_PWMLER_M4_ENA (1<<4)
|
300 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_PWMLER_M5_ENA (1<<5)
|
301 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_PWMLER_M6_ENA (1<<6)
|
302 |
|
|
|
303 |
|
|
//=============================================================================
|
304 |
|
|
// I2C (I2)
|
305 |
|
|
|
306 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_I2_BASE 0xE001C000
|
307 |
|
|
|
308 |
|
|
// Registers are offsets from base of this subsystem
|
309 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_I2CONSET 0x0000
|
310 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_I2CONSET_AA (1<<2)
|
311 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_I2CONSET_SI (1<<3)
|
312 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_I2CONSET_STO (1<<4)
|
313 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_I2CONSET_STA (1<<5)
|
314 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_I2CONSET_I2EN (1<<6)
|
315 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_I2STAT 0x0004
|
316 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_I2STAT_SHIFT 3
|
317 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_I2DAT 0x0008
|
318 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_I2ADR 0x000C
|
319 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_I2ADR_GC (1<<0)
|
320 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_I2SCLH 0x0010
|
321 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_I2SCLL 0x0014
|
322 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_I2CONCLR 0x0018
|
323 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_I2CONCLR_AAC (1<<2)
|
324 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_I2CONCLR_SIC (1<<3)
|
325 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_I2CONCLR_STAC (1<<5)
|
326 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_I2CONCLR_I2ENC (1<<6)
|
327 |
|
|
|
328 |
|
|
//=============================================================================
|
329 |
|
|
// SPI (S)
|
330 |
|
|
|
331 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_SPI0_BASE 0xE0020000
|
332 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_SPI1_BASE 0xE0030000
|
333 |
|
|
|
334 |
|
|
// Registers are offsets from base of this subsystem
|
335 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_SPI_SPCR 0x0000
|
336 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_SPI_SPCR_CPHA (1<<3)
|
337 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_SPI_SPCR_CPOL (1<<4)
|
338 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_SPI_SPCR_MSTR (1<<5)
|
339 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_SPI_SPCR_LSBF (1<<6)
|
340 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_SPI_SPCR_SPIE (1<<7)
|
341 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_SPI_SPSR 0x0004
|
342 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_SPI_SPSR_ABRT (1<<3)
|
343 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_SPI_SPSR_MODF (1<<4)
|
344 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_SPI_SPSR_ROVR (1<<5)
|
345 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_SPI_SPSR_WCOL (1<<6)
|
346 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_SPI_SPSR_SPIF (1<<7)
|
347 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_SPI_SPDR 0x0008
|
348 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_SPI_SPCCR 0x000C
|
349 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_SPI_SPINT 0x001C
|
350 |
|
|
|
351 |
|
|
|
352 |
|
|
//=============================================================================
|
353 |
|
|
// RTC
|
354 |
|
|
|
355 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_RTC_BASE 0xE0024000
|
356 |
|
|
|
357 |
|
|
// Registers are offsets from base of this subsystem
|
358 |
|
|
|
359 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_RTC_ILR 0x0000
|
360 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_RTC_ILR_CIF (1<<0)
|
361 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_RTC_ILR_ALF (1<<1)
|
362 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_RTC_CTC 0x0004
|
363 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_RTC_CCR 0x0008
|
364 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_RTC_CCR_CLKEN (1<<0)
|
365 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_RTC_CCR_CTCRST (1<<1)
|
366 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_RTC_CIIR 0x000C
|
367 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_RTC_AMR 0x0010
|
368 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_RTC_CTIME0 0x0014
|
369 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_RTC_CTIME1 0x0018
|
370 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_RTC_CTIME2 0x001C
|
371 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_RTC_SEC 0x0020
|
372 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_RTC_MIN 0x0024
|
373 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_RTC_HOUR 0x0028
|
374 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_RTC_DOM 0x002C
|
375 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_RTC_DOW 0x0030
|
376 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_RTC_DOY 0x0034
|
377 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_RTC_MONTH 0x0038
|
378 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_RTC_YEAR 0x003C
|
379 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_RTC_ALSEC 0x0060
|
380 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_RTC_ALMIN 0x0064
|
381 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_RTC_ALHOUR 0x0068
|
382 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_RTC_ALDOM 0x006C
|
383 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_RTC_ALDOW 0x0070
|
384 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_RTC_ALDOY 0x0074
|
385 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_RTC_ALMON 0x0078
|
386 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_RTC_ALYEAR 0x007C
|
387 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_RTC_PREINT 0x0080
|
388 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_RTC_PREFRAC 0x0084
|
389 |
|
|
|
390 |
|
|
//=============================================================================
|
391 |
|
|
// GPIO (IO)
|
392 |
|
|
|
393 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_IO_BASE 0xE0028000
|
394 |
|
|
|
395 |
|
|
#if defined(CYGHWR_HAL_ARM_LPC2XXX_FAMILY_LPC210X)
|
396 |
|
|
|
397 |
|
|
// Registers are offsets from base of this subsystem
|
398 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_IOPIN 0x000
|
399 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_IOSET 0x004
|
400 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_IODIR 0x008
|
401 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_IOCLR 0x00C
|
402 |
|
|
|
403 |
|
|
#else
|
404 |
|
|
|
405 |
|
|
// Registers are offsets from base of this subsystem
|
406 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_IO0PIN 0x000
|
407 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_IO0SET 0x004
|
408 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_IO0DIR 0x008
|
409 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_IO0CLR 0x00C
|
410 |
|
|
|
411 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_IO1PIN 0x010
|
412 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_IO1SET 0x014
|
413 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_IO1DIR 0x018
|
414 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_IO1CLR 0x01C
|
415 |
|
|
|
416 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_IO2PIN 0x020
|
417 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_IO2SET 0x024
|
418 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_IO2DIR 0x028
|
419 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_IO2CLR 0x02C
|
420 |
|
|
|
421 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_IO3PIN 0x030
|
422 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_IO3SET 0x034
|
423 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_IO3DIR 0x038
|
424 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_IO3CLR 0x03C
|
425 |
|
|
|
426 |
|
|
#endif
|
427 |
|
|
|
428 |
|
|
//=============================================================================
|
429 |
|
|
// Pin Connect Block (PIN)
|
430 |
|
|
|
431 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_PIN_BASE 0xE002C000
|
432 |
|
|
|
433 |
|
|
// Registers are offsets from base of this subsystem
|
434 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_PINSEL0 0x000
|
435 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_PINSEL1 0x004
|
436 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_PINSEL2 0x014
|
437 |
|
|
|
438 |
|
|
//=============================================================================
|
439 |
|
|
// ADC (AD)
|
440 |
|
|
|
441 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_AD_BASE 0xE0034000
|
442 |
|
|
|
443 |
|
|
// Registers are offsets from base of this subsystem
|
444 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_ADCR 0x0000
|
445 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_ADCR_BURST (1<<16)
|
446 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_ADCR_PDN (1<<21)
|
447 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_ADCR_EDGE (1<<27)
|
448 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_ADDR 0x0004
|
449 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_ADDR_OVERRUN (1<<30)
|
450 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_ADDR_DONE (1<<31)
|
451 |
|
|
|
452 |
|
|
//=============================================================================
|
453 |
|
|
// System Control Block
|
454 |
|
|
|
455 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_SCB_BASE 0xE01FC000
|
456 |
|
|
|
457 |
|
|
// Registers are offsets from base of this subsystem
|
458 |
|
|
|
459 |
|
|
// Memory accelerator module
|
460 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_MAMCR 0x0000
|
461 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_MAMCR_DISABLED 0x00
|
462 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_MAMCR_PARTIAL 0x01
|
463 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_MAMCR_FULL 0x02
|
464 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_MAMTIM 0x0004
|
465 |
|
|
|
466 |
|
|
// Memory mapping control
|
467 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_MEMMAP 0x0040
|
468 |
|
|
|
469 |
|
|
// PLL
|
470 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_PLLCON 0x0080
|
471 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_PLLCON_PLLE (1<<0)
|
472 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_PLLCON_PLLC (1<<1)
|
473 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_PLLCFG 0x0084
|
474 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_PLLSTAT 0x0088
|
475 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_PLLSTAT_PLLE 0x100 // (1<<8)
|
476 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_PLLSTAT_PLLC 0x200 // (1<<9)
|
477 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_PLLSTAT_PLOCK 0x400 // (1<<10)
|
478 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_PLLFEED 0x008C
|
479 |
|
|
|
480 |
|
|
// Power Control
|
481 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_PCON 0x00C0
|
482 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_PCON_IDL (1<<0)
|
483 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_PCON_PD (1<<1)
|
484 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_PCONP 0x00C4
|
485 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_PCONP_TIM0 (1<<1)
|
486 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_PCONP_TIM1 (1<<2)
|
487 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_PCONP_URT0 (1<<3)
|
488 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_PCONP_URT1 (1<<4)
|
489 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_PCONP_PWM0 (1<<5)
|
490 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_PCONP_I2C (1<<7)
|
491 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_PCONP_SPI0 (1<<8)
|
492 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_PCONP_RTC (1<<9)
|
493 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_PCONP_SPI1 (1<<10)
|
494 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_PCONP_AD (1<<12)
|
495 |
|
|
|
496 |
|
|
// VPB Divider
|
497 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_VPBDIV 0x0100
|
498 |
|
|
|
499 |
|
|
// External interrupt inputs
|
500 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_EXTINT 0x0140
|
501 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_EXTWAKE 0x0144
|
502 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_EXTMODE 0x0148
|
503 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_EXTPOLAR 0x014C
|
504 |
|
|
|
505 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_EXTxxx_INT0 (1<<0)
|
506 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_EXTxxx_INT1 (1<<1)
|
507 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_EXTxxx_INT2 (1<<2)
|
508 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_EXTxxx_INT3 (1<<3)
|
509 |
|
|
|
510 |
|
|
|
511 |
|
|
//=============================================================================
|
512 |
|
|
// External Memory Controller
|
513 |
|
|
|
514 |
|
|
#if defined(CYGHWR_HAL_ARM_LPC2XXX_FAMILY_LPC22XX)
|
515 |
|
|
|
516 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_BCFG0 0xFFE00000
|
517 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_BCFG1 0xFFE00004
|
518 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_BCFG2 0xFFE00008
|
519 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_BCFG3 0xFFE0000C
|
520 |
|
|
|
521 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_BCFGx_RBLE (1<<10)
|
522 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_BCFGx_BUSERR (1<<24)
|
523 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_BCFGx_WPERR (1<<25)
|
524 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_BCFGx_WP (1<<26)
|
525 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_BCFGx_BM (1<<27)
|
526 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_BCFGx_MW_8BIT (0x00000000)
|
527 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_BCFGx_MW_16BIT (0x10000000)
|
528 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_BCFGx_MW_32BIT (0x20000000)
|
529 |
|
|
|
530 |
|
|
#endif
|
531 |
|
|
|
532 |
|
|
//=============================================================================
|
533 |
|
|
// Vectored Interrupt Controller (VIC)
|
534 |
|
|
|
535 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_VIC_BASE 0xFFFFF000
|
536 |
|
|
|
537 |
|
|
// Registers are offsets from base of this subsystem
|
538 |
|
|
|
539 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_VICIRQSTAT 0x0000
|
540 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_VICFIQSTAT 0x0004
|
541 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_VICRAWINTR 0x0008
|
542 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_VICINTSELECT 0x000C
|
543 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_VICINTENABLE 0x0010
|
544 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_VICINTENCLEAR 0x0014
|
545 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_VICSOFTINT 0x0018
|
546 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_VICSOFTINTCLEAR 0x001C
|
547 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_VICPROTECTION 0x0020
|
548 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_VICVECTADDR 0x0030
|
549 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_VICDEFVECTADDR 0x0034
|
550 |
|
|
|
551 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_VICVECTADDR0 0x0100
|
552 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_VICVECTADDR1 0x0104
|
553 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_VICVECTADDR2 0x0108
|
554 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_VICVECTADDR3 0x010C
|
555 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_VICVECTADDR4 0x0110
|
556 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_VICVECTADDR5 0x0114
|
557 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_VICVECTADDR6 0x0118
|
558 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_VICVECTADDR7 0x011C
|
559 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_VICVECTADDR8 0x0120
|
560 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_VICVECTADDR9 0x0124
|
561 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_VICVECTADDR10 0x0128
|
562 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_VICVECTADDR11 0x012C
|
563 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_VICVECTADDR12 0x0130
|
564 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_VICVECTADDR13 0x0134
|
565 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_VICVECTADDR14 0x0138
|
566 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_VICVECTADDR15 0x013C
|
567 |
|
|
|
568 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_VICVECTCNTL0 0x0200
|
569 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_VICVECTCNTL1 0x0204
|
570 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_VICVECTCNTL2 0x0208
|
571 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_VICVECTCNTL3 0x020C
|
572 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_VICVECTCNTL4 0x0210
|
573 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_VICVECTCNTL5 0x0214
|
574 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_VICVECTCNTL6 0x0218
|
575 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_VICVECTCNTL7 0x021C
|
576 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_VICVECTCNTL8 0x0220
|
577 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_VICVECTCNTL9 0x0224
|
578 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_VICVECTCNTL10 0x0228
|
579 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_VICVECTCNTL11 0x022C
|
580 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_VICVECTCNTL12 0x0230
|
581 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_VICVECTCNTL13 0x0234
|
582 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_VICVECTCNTL14 0x0238
|
583 |
|
|
#define CYGARC_HAL_LPC2XXX_REG_VICVECTCNTL15 0x023C
|
584 |
|
|
|
585 |
|
|
|
586 |
|
|
//-----------------------------------------------------------------------------
|
587 |
|
|
// end of var_io.h
|
588 |
|
|
#endif // CYGONCE_HAL_VAR_IO_H
|