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
iotnx61.h
Go to the documentation of this file.
1
9
/*
10
* Copyright (c) 2006, 2007 Anatoly Sokolov
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_IO_H_
42
# error "Include <avr/io.h> instead of this file."
43
#endif
44
45
#ifndef _AVR_IOXXX_H_
46
# define _AVR_IOXXX_H_ "iotnx61.h"
47
#else
48
# error "Attempt to include more than one <avr/ioXXX.h> file."
49
#endif
50
51
#ifndef _AVR_IOTNx61_H_
52
#define _AVR_IOTNx61_H_ 1
53
62
/* Registers and associated bit numbers */
63
64
#define TCCR1E _SFR_IO8(0x00)
65
#define OC1OE0 0
66
#define OC1OE1 1
67
#define OC1OE2 2
68
#define OC1OE3 3
69
#define OC1OE4 4
70
#define OC1OE5 5
71
72
#define DIDR0 _SFR_IO8(0x01)
73
#define ADC0D 0
74
#define ADC1D 1
75
#define ADC2D 2
76
#define AREFD 3
77
#define ADC3D 4
78
#define ADC4D 5
79
#define ADC5D 6
80
#define ADC6D 7
81
82
#define DIDR1 _SFR_IO8(0x02)
83
#define ADC7D 4
84
#define ADC8D 5
85
#define ADC9D 6
86
#define ADC10D 7
87
88
#define ADCSRB _SFR_IO8(0x03)
89
#define ADTS0 0
90
#define ADTS1 1
91
#define ADTS2 2
92
#define MUX5 3
93
#define REFS2 4
94
#define IRP 5
95
#define GSEL 6
96
#define BIN 7
97
98
#define ADCW _SFR_IO16(0x04)
99
#ifndef __ASSEMBLER__
100
#define ADC _SFR_IO16(0x04)
101
#endif
102
103
#define ADCL _SFR_IO8(0x04)
104
#define ADCH _SFR_IO8(0x05)
105
106
#define ADCSRA _SFR_IO8(0x06)
107
#define ADPS0 0
108
#define ADPS1 1
109
#define ADPS2 2
110
#define ADIE 3
111
#define ADIF 4
112
#define ADATE 5
113
#define ADSC 6
114
#define ADEN 7
115
116
#define ADMUX _SFR_IO8(0x07)
117
#define MUX0 0
118
#define MUX1 1
119
#define MUX2 2
120
#define MUX3 3
121
#define MUX4 4
122
#define ADLAR 5
123
#define REFS0 6
124
#define REFS1 7
125
126
#define ACSRA _SFR_IO8(0x08)
127
#define ACIS0 0
128
#define ACIS1 1
129
#define ACME 2
130
#define ACIE 3
131
#define ACI 4
132
#define ACO 5
133
#define ACBG 6
134
#define ACD 7
135
136
#define ACSRB _SFR_IO8(0x09)
137
#define ACM0 0
138
#define ACM1 1
139
#define ACM2 2
140
#define HLEV 6
141
#define HSEL 7
142
143
#define GPIOR0 _SFR_IO8(0x0A)
144
145
#define GPIOR1 _SFR_IO8(0x0B)
146
147
#define GPIOR2 _SFR_IO8(0x0C)
148
149
#define USICR _SFR_IO8(0x0D)
150
#define USITC 0
151
#define USICLK 1
152
#define USICS0 2
153
#define USICS1 3
154
#define USIWM0 4
155
#define USIWM1 5
156
#define USIOIE 6
157
#define USISIE 7
158
159
#define USISR _SFR_IO8(0x0E)
160
#define USICNT0 0
161
#define USICNT1 1
162
#define USICNT2 2
163
#define USICNT3 3
164
#define USIDC 4
165
#define USIPF 5
166
#define USIOIF 6
167
#define USISIF 7
168
169
#define USIDR _SFR_IO8(0x0F)
170
171
#define USIBR _SFR_IO8(0x10)
172
173
#define USIPP _SFR_IO8(0x11)
174
#define USIPOS 0
175
176
#define OCR0B _SFR_IO8(0x12)
177
178
#define OCR0A _SFR_IO8(0x13)
179
180
#define TCNT0H _SFR_IO8(0x14)
181
182
#define TCCR0A _SFR_IO8(0x15)
183
#define WGM00 0
184
#define ACIC0 3
185
#define ICES0 4
186
#define ICNC0 5
187
#define ICEN0 6
188
#define TCW0 7
189
190
#define PINB _SFR_IO8(0x16)
191
#define PINB0 0
192
#define PINB1 1
193
#define PINB2 2
194
#define PINB3 3
195
#define PINB4 4
196
#define PINB5 5
197
#define PINB6 6
198
#define PINB7 7
199
200
#define DDRB _SFR_IO8(0x17)
201
#define DDB0 0
202
#define DDB1 1
203
#define DDB2 2
204
#define DDB3 3
205
#define DDB4 4
206
#define DDB5 5
207
#define DDB6 6
208
#define DDB7 7
209
210
#define PORTB _SFR_IO8(0x18)
211
#define PB0 0
212
#define PB1 1
213
#define PB2 2
214
#define PB3 3
215
#define PB4 4
216
#define PB5 5
217
#define PB6 6
218
#define PB7 7
219
220
#define PINA _SFR_IO8(0x19)
221
#define PINA0 0
222
#define PINA1 1
223
#define PINA2 2
224
#define PINA3 3
225
#define PINA4 4
226
#define PINA5 5
227
#define PINA6 6
228
#define PINA7 7
229
230
#define DDRA _SFR_IO8(0x1A)
231
#define DDA0 0
232
#define DDA1 1
233
#define DDA2 2
234
#define DDA3 3
235
#define DDA4 4
236
#define DDA5 5
237
#define DDA6 6
238
#define DDA7 7
239
240
#define PORTA _SFR_IO8(0x1B)
241
#define PA0 0
242
#define PA1 1
243
#define PA2 2
244
#define PA3 3
245
#define PA4 4
246
#define PA5 5
247
#define PA6 6
248
#define PA7 7
249
250
/* EEPROM Control Register */
251
#define EECR _SFR_IO8(0x1C)
252
#define EERE 0
253
#define EEPE 1
254
#define EEMPE 2
255
#define EERIE 3
256
#define EEPM0 4
257
#define EEPM1 5
258
259
/* EEPROM Data Register */
260
#define EEDR _SFR_IO8(0x1D)
261
262
/* EEPROM Address Register */
263
#define EEAR _SFR_IO16(0x1E)
264
#define EEARL _SFR_IO8(0x1E)
265
#define EEARH _SFR_IO8(0x1F)
266
267
#define DWDR _SFR_IO8(0x20)
268
269
#define WDTCR _SFR_IO8(0x21)
270
#define WDP0 0
271
#define WDP1 1
272
#define WDP2 2
273
#define WDE 3
274
#define WDCE 4
275
#define WDP3 5
276
#define WDIE 6
277
#define WDIF 7
278
279
#define PCMSK1 _SFR_IO8(0x22)
280
#define PCINT8 0
281
#define PCINT9 1
282
#define PCINT10 2
283
#define PCINT11 3
284
#define PCINT12 4
285
#define PCINT13 5
286
#define PCINT14 6
287
#define PCINT15 7
288
289
#define PCMSK0 _SFR_IO8(0x23)
290
#define PCINT0 0
291
#define PCINT1 1
292
#define PCINT2 2
293
#define PCINT3 3
294
#define PCINT4 4
295
#define PCINT5 5
296
#define PCINT6 6
297
#define PCINT7 7
298
299
#define DT1 _SFR_IO8(0x24)
300
#define DT1L0 0
301
#define DT1L1 1
302
#define DT1L2 2
303
#define DT1L3 3
304
#define DT1H0 4
305
#define DT1H1 5
306
#define DT1H2 6
307
#define DT1H3 7
308
309
#define TC1H _SFR_IO8(0x25)
310
#define TC18 0
311
#define TC19 1
312
313
#define TCCR1D _SFR_IO8(0x26)
314
#define WGM10 0
315
#define WGM11 1
316
#define FPF1 2
317
#define FPAC1 3
318
#define FPES1 4
319
#define FPNC1 5
320
#define FPEN1 6
321
#define FPIE1 7
322
323
#define TCCR1C _SFR_IO8(0x27)
324
#define PWM1D 0
325
#define FOC1D 1
326
#define COM1D0 2
327
#define COM1D1 3
328
#define COM1B0S 4
329
#define COM1B1S 5
330
#define COM1A0S 6
331
#define COM1A1S 7
332
333
#define CLKPR _SFR_IO8(0x28)
334
#define CLKPS0 0
335
#define CLKPS1 1
336
#define CLKPS2 2
337
#define CLKPS3 3
338
#define CLKPCE 7
339
340
#define PLLCSR _SFR_IO8(0x29)
341
#define PLOCK 0
342
#define PLLE 1
343
#define PCKE 2
344
#define LSM 7
345
346
#define OCR1D _SFR_IO8(0x2A)
347
348
#define OCR1C _SFR_IO8(0x2B)
349
350
#define OCR1B _SFR_IO8(0x2C)
351
352
#define OCR1A _SFR_IO8(0x2D)
353
354
#define TCNT1 _SFR_IO8(0x2E)
355
356
#define TCCR1B _SFR_IO8(0x2F)
357
#define CS10 0
358
#define CS11 1
359
#define CS12 2
360
#define CS13 3
361
#define DTPS10 4
362
#define DTPS11 5
363
#define PSR1 6
364
#define PWM1X 7
365
366
#define TCCR1A _SFR_IO8(0x30)
367
#define PWM1B 0
368
#define PWM1A 1
369
#define FOC1B 2
370
#define FOC1A 3
371
#define COM1B0 4
372
#define COM1B1 5
373
#define COM1A0 6
374
#define COM1A1 7
375
376
#define OSCCAL _SFR_IO8(0x31)
377
378
#define TCNT0L _SFR_IO8(0x32)
379
380
#define TCCR0B _SFR_IO8(0x33)
381
#define CS00 0
382
#define CS01 1
383
#define CS02 2
384
#define PSR0 3
385
#define TSM 4
386
387
#define MCUSR _SFR_IO8(0x34)
388
#define PORF 0
389
#define EXTRF 1
390
#define BORF 2
391
#define WDRF 3
392
393
#define MCUCR _SFR_IO8(0x35)
394
#define ISC00 0
395
#define ISC01 1
396
#define SM0 3
397
#define SM1 4
398
#define SE 5
399
#define PUD 6
400
401
#define PRR _SFR_IO8(0x36)
402
#define PRADC 0
403
#define PRUSI 1
404
#define PRTIM0 2
405
#define PRTIM1 3
406
407
#define SPMCSR _SFR_IO8(0x37)
408
#define SPMEN 0
409
#define PGERS 1
410
#define PGWRT 2
411
#define RFLB 3
412
#define CTPB 4
413
414
#define TIFR _SFR_IO8(0x38)
415
#define ICF0 0
416
#define TOV0 1
417
#define TOV1 2
418
#define OCF0B 3
419
#define OCF0A 4
420
#define OCF1B 5
421
#define OCF1A 6
422
#define OCF1D 7
423
424
#define TIMSK _SFR_IO8(0x39)
425
#define TICIE0 0
426
#define TOIE0 1
427
#define TOIE1 2
428
#define OCIE0B 3
429
#define OCIE0A 4
430
#define OCIE1B 5
431
#define OCIE1A 6
432
#define OCIE1D 7
433
434
#define GIFR _SFR_IO8(0x3A)
435
#define PCIF 5
436
#define INTF0 6
437
#define INTF1 7
438
439
#define GIMSK _SFR_IO8(0x3B)
440
#define PCIE0 4
441
#define PCIE1 5
442
#define INT0 6
443
#define INT1 7
444
445
/* Reserved [0x3C] */
446
447
/* 0x3D..0x3E SP [defined in <avr/io.h>] */
448
/* 0x3F SREG [defined in <avr/io.h>] */
449
450
451
/* Interrupt vectors */
452
/* Interrupt vector 0 is the reset vector. */
453
/* External Interrupt 0 */
454
#define INT0_vect _VECTOR(1)
455
#define SIG_INTERRUPT0 _VECTOR(1)
456
457
/* Pin Change Interrupt */
458
#define PCINT_vect _VECTOR(2)
459
#define SIG_PIN_CHANGE _VECTOR(2)
460
461
/* Timer/Counter1 Compare Match 1A */
462
#define TIMER1_COMPA_vect _VECTOR(3)
463
#define SIG_OUTPUT_COMPARE1A _VECTOR(3)
464
465
/* Timer/Counter1 Compare Match 1B */
466
#define TIMER1_COMPB_vect _VECTOR(4)
467
#define SIG_OUTPUT_COMPARE1B _VECTOR(4)
468
469
/* Timer/Counter1 Overflow */
470
#define TIMER1_OVF_vect _VECTOR(5)
471
#define SIG_OVERFLOW1 _VECTOR(5)
472
473
/* Timer/Counter0 Overflow */
474
#define TIMER0_OVF_vect _VECTOR(6)
475
#define SIG_OVERFLOW0 _VECTOR(6)
476
477
/* USI Start */
478
#define USI_START_vect _VECTOR(7)
479
#define SIG_USI_START _VECTOR(7)
480
481
/* USI Overflow */
482
#define USI_OVF_vect _VECTOR(8)
483
#define SIG_USI_OVERFLOW _VECTOR(8)
484
485
/* EEPROM Ready */
486
#define EE_RDY_vect _VECTOR(9)
487
#define SIG_EEPROM_READY _VECTOR(9)
488
489
/* Analog Comparator */
490
#define ANA_COMP_vect _VECTOR(10)
491
#define SIG_ANA_COMP _VECTOR(10)
492
#define SIG_COMPARATOR _VECTOR(10)
493
494
/* ADC Conversion Complete */
495
#define ADC_vect _VECTOR(11)
496
#define SIG_ADC _VECTOR(11)
497
498
/* Watchdog Time-Out */
499
#define WDT_vect _VECTOR(12)
500
#define SIG_WDT _VECTOR(12)
501
502
/* External Interrupt 1 */
503
#define INT1_vect _VECTOR(13)
504
#define SIG_INTERRUPT1 _VECTOR(13)
505
506
/* Timer/Counter0 Compare Match A */
507
#define TIMER0_COMPA_vect _VECTOR(14)
508
#define SIG_OUTPUT_COMPARE0A _VECTOR(14)
509
510
/* Timer/Counter0 Compare Match B */
511
#define TIMER0_COMPB_vect _VECTOR(15)
512
#define SIG_OUTPUT_COMPARE0B _VECTOR(15)
513
514
/* ADC Conversion Complete */
515
#define TIMER0_CAPT_vect _VECTOR(16)
516
#define SIG_INPUT_CAPTURE0 _VECTOR(16)
517
518
/* Timer/Counter1 Compare Match D */
519
#define TIMER1_COMPD_vect _VECTOR(17)
520
#define SIG_OUTPUT_COMPARE0D _VECTOR(17)
521
522
/* Timer/Counter1 Fault Protection */
523
#define FAULT_PROTECTION_vect _VECTOR(18)
524
525
#define _VECTORS_SIZE 38
526
528
#endif
/* _AVR_IOTNx61_H_ */
Generated by
1.8.13