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
io2343.h
Go to the documentation of this file.
1
9
/*
10
* Copyright (c) 2002, Marek Michalkiewicz
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_IO2343_H_
42
#define _AVR_IO2343_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_ "io2343.h"
57
#else
58
# error "Attempt to include more than one <avr/ioXXX.h> file."
59
#endif
60
61
/* I/O registers */
62
63
/* Input Pins, Port B */
64
#define PINB _SFR_IO8(0x16)
65
66
/* Data Direction Register, Port B */
67
#define DDRB _SFR_IO8(0x17)
68
69
/* Data Register, Port B */
70
#define PORTB _SFR_IO8(0x18)
71
72
/* EEPROM Control Register */
73
#define EECR _SFR_IO8(0x1C)
74
75
/* EEPROM Data Register */
76
#define EEDR _SFR_IO8(0x1D)
77
78
/* EEPROM Address Register */
79
#define EEAR _SFR_IO8(0x1E)
80
#define EEARL _SFR_IO8(0x1E)
81
82
/* Watchdog Timer Control Register */
83
#define WDTCR _SFR_IO8(0x21)
84
85
/* Timer/Counter 0 */
86
#define TCNT0 _SFR_IO8(0x32)
87
88
/* Timer/Counter 0 Control Register */
89
#define TCCR0 _SFR_IO8(0x33)
90
91
/* MCU Status Register */
92
#define MCUSR _SFR_IO8(0x34)
93
94
/* MCU general Control Register */
95
#define MCUCR _SFR_IO8(0x35)
96
97
/* Timer/Counter Interrupt Flag register */
98
#define TIFR _SFR_IO8(0x38)
99
100
/* Timer/Counter Interrupt MaSK register */
101
#define TIMSK _SFR_IO8(0x39)
102
103
/* General Interrupt Flag register */
104
#define GIFR _SFR_IO8(0x3A)
105
106
/* General Interrupt MaSK register */
107
#define GIMSK _SFR_IO8(0x3B)
108
109
/* 0x3D..0x3E SP */
110
111
/* 0x3F SREG */
112
113
/* Interrupt vectors */
114
115
/* External Interrupt 0 */
116
#define INT0_vect _VECTOR(1)
117
#define SIG_INTERRUPT0 _VECTOR(1)
118
119
/* Timer/Counter0 Overflow */
120
#define TIMER0_OVF0_vect _VECTOR(2)
121
#define SIG_OVERFLOW0 _VECTOR(2)
122
123
#define _VECTORS_SIZE 6
124
125
/*
126
The Register Bit names are represented by their bit number (0-7).
127
*/
128
129
/* General Interrupt MaSK register */
130
#define INT0 6
131
#define INTF0 6
132
133
/* General Interrupt Flag Register */
134
#define TOIE0 1
135
#define TOV0 1
136
137
/* MCU general Control Register */
138
#define SE 5
139
#define SM 4
140
#define ISC01 1
141
#define ISC00 0
142
143
/* MCU Status Register */
144
#define PORF 0
145
#define EXTRF 1
146
147
/* Timer/Counter 0 Control Register */
148
#define CS02 2
149
#define CS01 1
150
#define CS00 0
151
152
/* Watchdog Timer Control Register */
153
#define WDTOE 4
154
#define WDE 3
155
#define WDP2 2
156
#define WDP1 1
157
#define WDP0 0
158
159
/*
160
PB3 = CLOCK
161
PB2 = SCK/T0
162
PB1 = MISO/INT0
163
PB0 = MOSI
164
*/
165
166
/* Data Register, Port B */
167
#define PB4 4
168
#define PB3 3
169
#define PB2 2
170
#define PB1 1
171
#define PB0 0
172
173
/* Data Direction Register, Port B */
174
#define DDB4 4
175
#define DDB3 3
176
#define DDB2 2
177
#define DDB1 1
178
#define DDB0 0
179
180
/* Input Pins, Port B */
181
#define PINB4 4
182
#define PINB3 3
183
#define PINB2 2
184
#define PINB1 1
185
#define PINB0 0
186
187
/* EEPROM Control Register */
188
#define EERIE 3
189
#define EEMWE 2
190
#define EEWE 1
191
#define EERE 0
192
193
/* Constants */
194
#define RAMEND 0xDF
195
#define XRAMEND RAMEND
196
#define E2END 0x7F
197
#define E2PAGESIZE 0
198
#define FLASHEND 0x07FF
199
200
201
/* Fuses */
202
#define FUSE_MEMORY_SIZE 1
203
204
/* Low Fuse Byte */
205
#define FUSE_RCEN (unsigned char)~_BV(0)
206
#define FUSE_SPIEN (unsigned char)~_BV(5)
207
#define LFUSE_DEFAULT (0xFF)
208
209
210
/* Lock Bits */
211
#define __LOCK_BITS_EXIST
212
213
214
/* Signature */
215
#define SIGNATURE_0 0x1E
216
#define SIGNATURE_1 0x91
217
#define SIGNATURE_2 0x03
218
219
221
#endif
/* _AVR_IO2343_H_ */
Generated by
1.8.13