RTEMS CPU Kit with SuperCore
4.11.3
Main Page
Related Pages
Modules
+
Data Structures
Data Structures
+
Data Fields
+
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
+
Variables
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
+
Files
File List
+
Globals
+
All
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
x
+
Functions
_
a
b
c
d
e
f
g
i
j
l
m
n
o
p
q
r
s
t
u
v
w
+
Variables
_
b
c
d
i
r
+
Typedefs
a
b
c
d
f
h
i
m
o
p
q
r
s
t
u
w
x
+
Enumerations
b
c
d
e
h
i
m
o
p
r
s
t
w
+
Enumerator
c
i
m
p
r
s
t
w
+
Macros
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
w
mnt
data0
chrisj
rtems
releases
rtems-release.git
4.11.3
ws-rtems
rtems-4.11.3
cpukit
score
cpu
avr
avr
io43u32x.h
Go to the documentation of this file.
1
9
/*
10
* Copyright (c) 2003,2005 Keith Gudger
11
* All rights reserved.
12
*
13
* Redistribution and use in source and binary forms, with or without
14
* modification, are permitted provided that the following conditions are met:
15
*
16
* * Redistributions of source code must retain the above copyright
17
* notice, this list of conditions and the following disclaimer.
18
*
19
* * Redistributions in binary form must reproduce the above copyright
20
* notice, this list of conditions and the following disclaimer in
21
* the documentation and/or other materials provided with the
22
* distribution.
23
*
24
* * Neither the name of the copyright holders nor the names of
25
* contributors may be used to endorse or promote products derived
26
* from this software without specific prior written permission.
27
*
28
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
29
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
30
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
31
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
32
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
33
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
34
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
35
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
36
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
37
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
38
* POSSIBILITY OF SUCH DAMAGE.
39
*/
40
41
#ifndef _AVR_IO43U32X_H_
42
#define _AVR_IO43U32X_H_ 1
43
51
#ifndef _AVR_IO_H_
52
# error "Include <avr/io.h> instead of this file."
53
#endif
54
55
#ifndef _AVR_IOXXX_H_
56
# define _AVR_IOXXX_H_ "io43u32x.h"
57
#else
58
# error "Attempt to include more than one <avr/ioXXX.h> file."
59
#endif
60
61
/* I/O registers */
62
63
/* Analog Comparator Control and Status Register */
64
#define ACSR _SFR_IO8(0x08)
65
66
/* UART Baud Rate Register */
67
#define UBRR _SFR_IO8(0x09)
68
69
/* UART Control Register */
70
#define UCR _SFR_IO8(0x0A)
71
72
/* UART Status Register */
73
#define USR _SFR_IO8(0x0B)
74
75
/* UART I/O Data Register */
76
#define UDR _SFR_IO8(0x0C)
77
78
/* Input Pins, Port E */
// new port for 43324/6
79
#define PINE _SFR_IO8(0x01)
80
81
/* Data Direction Register, Port E */
82
#define DDRE _SFR_IO8(0x02)
83
84
/* Data Register, Port E */
85
#define PORTE _SFR_IO8(0x03)
86
87
/* SPI Control Register */
88
#define SPCR _SFR_IO8(0x0D)
89
90
/* SPI Status Register */
91
#define SPSR _SFR_IO8(0x0E)
92
93
/* SPI I/O Data Register */
94
#define SPDR _SFR_IO8(0x0F)
95
96
/* Input Pins, Port D */
97
#define PIND _SFR_IO8(0x10)
98
99
/* Data Direction Register, Port D */
100
#define DDRD _SFR_IO8(0x11)
101
102
/* Data Register, Port D */
103
#define PORTD _SFR_IO8(0x12)
104
105
/* Input Pins, Port C */
106
#define PINC _SFR_IO8(0x13)
107
108
/* Data Direction Register, Port C */
109
#define DDRC _SFR_IO8(0x14)
110
111
/* Data Register, Port C */
112
#define PORTC _SFR_IO8(0x15)
113
114
/* Input Pins, Port B */
115
#define PINB _SFR_IO8(0x16)
116
117
/* Data Direction Register, Port B */
118
#define DDRB _SFR_IO8(0x17)
119
120
/* Data Register, Port B */
121
#define PORTB _SFR_IO8(0x18)
122
123
/* Input Pins, Port A */
124
#define PINA _SFR_IO8(0x19)
125
126
/* Data Direction Register, Port A */
127
#define DDRA _SFR_IO8(0x1A)
128
129
/* Data Register, Port A */
130
#define PORTA _SFR_IO8(0x1B)
131
132
/* 0x1C..0x1F reserved */
133
134
/* Watchdog Timer Control Register */
135
#define WDTCR _SFR_IO8(0x21)
136
137
/* T/C 1 Input Capture Register */
138
#define ICR1 _SFR_IO16(0x24)
139
#define ICR1L _SFR_IO8(0x24)
140
#define ICR1H _SFR_IO8(0x25)
141
142
/* Timer/Counter1 Output Compare Register B */
143
#define OCR1B _SFR_IO16(0x28)
144
#define OCR1BL _SFR_IO8(0x28)
145
#define OCR1BH _SFR_IO8(0x29)
146
147
/* Timer/Counter1 Output Compare Register A */
148
#define OCR1A _SFR_IO16(0x2A)
149
#define OCR1AL _SFR_IO8(0x2A)
150
#define OCR1AH _SFR_IO8(0x2B)
151
152
/* Timer/Counter 1 */
153
#define TCNT1 _SFR_IO16(0x2C)
154
#define TCNT1L _SFR_IO8(0x2C)
155
#define TCNT1H _SFR_IO8(0x2D)
156
157
/* Timer/Counter 1 Control and Status Register */
158
#define TCCR1B _SFR_IO8(0x2E)
159
160
/* Timer/Counter 1 Control Register */
161
#define TCCR1A _SFR_IO8(0x2F)
162
163
/* Timer/Counter 0 */
164
#define TCNT0 _SFR_IO8(0x32)
165
166
/* Timer/Counter 0 Control Register */
167
#define TCCR0 _SFR_IO8(0x33)
168
169
/* MCU general Control Register */
170
#define MCUCR _SFR_IO8(0x35)
171
172
/* Timer/Counter Interrupt Flag Register */
173
#define TIFR _SFR_IO8(0x38)
174
175
/* Timer/Counter Interrupt MaSK register */
176
#define TIMSK _SFR_IO8(0x39)
177
178
/* General Interrupt Control Register */
179
#define GIFR _SFR_IO8(0x3A)
180
181
/* General Interrupt Mask register */
182
#define GIMSK _SFR_IO8(0x3B)
183
184
/* Interrupt vectors */
185
186
#define SIG_INTERRUPT0 _VECTOR(1)
187
#define SIG_INTERRUPT1 _VECTOR(2)
188
#define SIG_TIMER1_CAPT1 _VECTOR(3)
189
#define SIG_INPUT_CAPTURE1 _VECTOR(3)
190
#define SIG_OUTPUT_COMPARE1A _VECTOR(4)
191
#define SIG_OUTPUT_COMPARE1B _VECTOR(5)
192
#define SIG_OVERFLOW1 _VECTOR(6)
193
#define SIG_OVERFLOW0 _VECTOR(7)
194
#define SIG_SPI _VECTOR(8)
195
#define SIG_UART_RECV _VECTOR(9)
196
#define SIG_UART_DATA _VECTOR(10)
197
#define SIG_UART_TRANS _VECTOR(11)
198
#define SIG_USB_INT _VECTOR(12)
199
200
#define _VECTORS_SIZE 52
201
202
/*
203
The Register Bit names are represented by their bit number (0-7).
204
*/
205
206
/* Timer/Counter Interrupt MaSK register */
207
#define TICIE1 3
208
#define OCIE1A 6
209
#define OCIE1B 5
210
#define TOIE1 7
211
#define TOIE0 1
212
213
/* Timer/Counter Interrupt Flag Register */
214
#define ICF1 3
215
#define OCF1A 6
216
#define OCF1B 5
217
#define TOV1 7
218
#define TOV0 1
219
220
/* MCU general Control Register */
221
#define SE 5
222
#define SM 4
223
#define ISC11 3
224
#define ISC10 2
225
#define ISC01 1
226
#define ISC00 0
227
228
/* Timer/Counter 0 Control Register */
229
#define CS02 2
230
#define CS01 1
231
#define CS00 0
232
233
234
/* Timer/Counter 1 Control Register */
235
#define COM1A1 7
236
#define COM1A0 6
237
#define COM1B1 5
238
#define COM1B0 4
239
#define PWM11 1
240
#define PWM10 0
241
242
/* Timer/Counter 1 Control and Status Register */
243
#define ICNC1 7
244
#define ICES1 6
245
#define CTC1 3
246
#define CS12 2
247
#define CS11 1
248
#define CS10 0
249
250
/* Watchdog Timer Control Register */
251
#define WDTOE 4
252
#define WDE 3
253
#define WDP2 2
254
#define WDP1 1
255
#define WDP0 0
256
257
/* Data Register, Port A */
258
#define PA7 7
259
#define PA6 6
260
#define PA5 5
261
#define PA4 4
262
#define PA3 3
263
#define PA2 2
264
#define PA1 1
265
#define PA0 0
266
267
/* Data Direction Register, Port A */
268
#define DDA7 7
269
#define DDA6 6
270
#define DDA5 5
271
#define DDA4 4
272
#define DDA3 3
273
#define DDA2 2
274
#define DDA1 1
275
#define DDA0 0
276
277
/* Input Pins, Port A */
278
#define PINA7 7
279
#define PINA6 6
280
#define PINA5 5
281
#define PINA4 4
282
#define PINA3 3
283
#define PINA2 2
284
#define PINA1 1
285
#define PINA0 0
286
287
/* Data Register, Port B */
288
#define PB7 7
289
#define PB6 6
290
#define PB5 5
291
#define PB4 4
292
#define PB3 3
293
#define PB2 2
294
#define PB1 1
295
#define PB0 0
296
297
/* Data Direction Register, Port B */
298
#define DDB7 7
299
#define DDB6 6
300
#define DDB5 5
301
#define DDB4 4
302
#define DDB3 3
303
#define DDB2 2
304
#define DDB1 1
305
#define DDB0 0
306
307
/* Input Pins, Port B */
308
#define PINB7 7
309
#define PINB6 6
310
#define PINB5 5
311
#define PINB4 4
312
#define PINB3 3
313
#define PINB2 2
314
#define PINB1 1
315
#define PINB0 0
316
317
/* Data Direction Register, Port C */
318
#define DDC7 7
319
#define DDC6 6
320
#define DDC5 5
321
#define DDC4 4
322
#define DDC3 3
323
#define DDC2 2
324
#define DDC1 1
325
#define DDC0 0
326
327
/* Input Pins, Port C */
328
#define PINC7 7
329
#define PINC6 6
330
#define PINC5 5
331
#define PINC4 4
332
#define PINC3 3
333
#define PINC2 2
334
#define PINC1 1
335
#define PINC0 0
336
337
/* Data Register, Port C */
338
#define PC7 7
339
#define PC6 6
340
#define PC5 5
341
#define PC4 4
342
#define PC3 3
343
#define PC2 2
344
#define PC1 1
345
#define PC0 0
346
347
/* Data Register, Port D */
348
#define PD7 7
349
#define PD6 6
350
#define PD5 5
351
#define PD4 4
352
#define PD3 3
353
#define PD2 2
354
#define PD1 1
355
#define PD0 0
356
357
/* Data Direction Register, Port D */
358
#define DDD7 7
359
#define DDD6 6
360
#define DDD5 5
361
#define DDD4 4
362
#define DDD3 3
363
#define DDD2 2
364
#define DDD1 1
365
#define DDD0 0
366
367
/* Input Pins, Port D */
368
#define PIND7 7
369
#define PIND6 6
370
#define PIND5 5
371
#define PIND4 4
372
#define PIND3 3
373
#define PIND2 2
374
#define PIND1 1
375
#define PIND0 0
376
377
/* Data Register, Port E */
378
#define PE7 7
379
#define PE6 6
380
#define PE5 5
381
#define PE4 4
382
#define PE3 3
383
#define PE2 2
384
#define PE1 1
385
#define PE0 0
386
387
/* Data Direction Register, Port E */
388
#define DDE7 7
389
#define DDE6 6
390
#define DDE5 5
391
#define DDE4 4
392
#define DDE3 3
393
#define DDE2 2
394
#define DDE1 1
395
#define DDE0 0
396
397
/* Input Pins, Port E */
398
#define PINE7 7
399
#define PINE6 6
400
#define PINE5 5
401
#define PINE4 4
402
#define PINE3 3
403
#define PINE2 2
404
#define PINE1 1
405
#define PINE0 0
406
407
/* SPI Status Register */
408
#define SPIF 7
409
#define WCOL 6
410
411
/* SPI Control Register */
412
#define SPIE 7
413
#define SPE 6
414
#define DORD 5
415
#define MSTR 4
416
#define CPOL 3
417
#define CPHA 2
418
#define SPR1 1
419
#define SPR0 0
420
421
/* UART Status Register */
422
#define RXC 7
423
#define TXC 6
424
#define UDRE 5
425
#define FE 4
426
#define DOR 3
427
428
/* UART Control Register */
429
#define RXCIE 7
430
#define TXCIE 6
431
#define UDRIE 5
432
#define RXEN 4
433
#define TXEN 3
434
#define CHR9 2
435
#define RXB8 1
436
#define TXB8 0
437
438
/* Constants */
439
#define RAMEND 0x025F
/*Last On-Chip SRAM Location*/
440
#define XRAMEND RAMEND
441
#define E2END 0x0000
442
443
/* FIXME: should be 0x1FFFF for max 128K (64K*16) external program memory,
444
but no RAMPZ causes gcrt1.S build to fail, so assume 64K for now... */
445
#define FLASHEND 0x0FFFF
446
448
#endif
/* _AVR_43USB32X_H_ */
Generated by
1.8.13