2 ChibiOS - Copyright (C) 2015 RedoX https://github.com/RedoXyde
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
8 http://www.apache.org/licenses/LICENSE-2.0
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
21 * Setup for the PJRC Teensy 3.1 board.
27 #define BOARD_PJRC_TEENSY_3_1
28 #define BOARD_NAME "PJRC Teensy 3.1"
30 /* External 16 MHz crystal */
31 #define KINETIS_XTAL_FREQUENCY 16000000UL
33 /* Use internal capacitors for the crystal */
34 #define KINETIS_BOARD_OSCILLATOR_SETTING OSC_CR_SC8P|OSC_CR_SC2P
42 * IO pins assignments.
48 #define TEENSY_PIN33 4
49 #define TEENSY_PIN24 5
54 #define PORTA_PIN10 10
55 #define PORTA_PIN11 11
56 #define TEENSY_PIN3 12
57 #define TEENSY_PIN4 13
58 #define PORTA_PIN14 14
59 #define PORTA_PIN15 15
60 #define PORTA_PIN16 16
61 #define PORTA_PIN17 17
62 #define PORTA_PIN18 18
63 #define PORTA_PIN19 19
64 #define PORTA_PIN20 20
65 #define PORTA_PIN21 21
66 #define PORTA_PIN22 22
67 #define PORTA_PIN23 23
68 #define PORTA_PIN24 24
69 #define PORTA_PIN25 25
70 #define PORTA_PIN26 26
71 #define PORTA_PIN27 27
72 #define PORTA_PIN28 28
73 #define PORTA_PIN29 29
74 #define PORTA_PIN30 30
75 #define PORTA_PIN31 31
77 #define TEENSY_PIN3_IOPORT IOPORT1
78 #define TEENSY_PIN4_IOPORT IOPORT1
79 #define TEENSY_PIN24_IOPORT IOPORT1
80 #define TEENSY_PIN33_IOPORT IOPORT1
82 #define TEENSY_PIN16 0
83 #define TEENSY_PIN17 1
84 #define TEENSY_PIN19 2
85 #define TEENSY_PIN18 3
92 #define PORTB_PIN10 10
93 #define PORTB_PIN11 11
94 #define PORTB_PIN12 12
95 #define PORTB_PIN13 13
96 #define PORTB_PIN14 14
97 #define PORTB_PIN15 15
98 #define TEENSY_PIN0 16
99 #define TEENSY_PIN1 17
100 #define TEENSY_PIN32 18
101 #define TEENSY_PIN25 19
102 #define PORTB_PIN20 20
103 #define PORTB_PIN21 21
104 #define PORTB_PIN22 22
105 #define PORTB_PIN23 23
106 #define PORTB_PIN24 24
107 #define PORTB_PIN25 25
108 #define PORTB_PIN26 26
109 #define PORTB_PIN27 27
110 #define PORTB_PIN28 28
111 #define PORTB_PIN29 29
112 #define PORTB_PIN30 30
113 #define PORTB_PIN31 31
115 #define TEENSY_PIN0_IOPORT IOPORT2
116 #define TEENSY_PIN1_IOPORT IOPORT2
117 #define TEENSY_PIN16_IOPORT IOPORT2
118 #define TEENSY_PIN17_IOPORT IOPORT2
119 #define TEENSY_PIN18_IOPORT IOPORT2
120 #define TEENSY_PIN19_IOPORT IOPORT2
121 #define TEENSY_PIN25_IOPORT IOPORT2
122 #define TEENSY_PIN32_IOPORT IOPORT2
124 #define TEENSY_PIN15 0
125 #define TEENSY_PIN22 1
126 #define TEENSY_PIN23 2
127 #define TEENSY_PIN9 3
128 #define TEENSY_PIN10 4
129 #define TEENSY_PIN13 5
130 #define TEENSY_PIN11 6
131 #define TEENSY_PIN12 7
132 #define TEENSY_PIN28 8
133 #define TEENSY_PIN27 9
134 #define TEENSY_PIN29 10
135 #define TEENSY_PIN30 11
136 #define PORTC_PIN12 12
137 #define PORTC_PIN13 13
138 #define PORTC_PIN14 14
139 #define PORTC_PIN15 15
140 #define PORTC_PIN16 16
141 #define PORTC_PIN17 17
142 #define PORTC_PIN18 18
143 #define PORTC_PIN19 19
144 #define PORTC_PIN20 20
145 #define PORTC_PIN21 21
146 #define PORTC_PIN22 22
147 #define PORTC_PIN23 23
148 #define PORTC_PIN24 24
149 #define PORTC_PIN25 25
150 #define PORTC_PIN26 26
151 #define PORTC_PIN27 27
152 #define PORTC_PIN28 28
153 #define PORTC_PIN29 29
154 #define PORTC_PIN30 30
155 #define PORTC_PIN31 31
157 #define TEENSY_PIN9_IOPORT IOPORT3
158 #define TEENSY_PIN10_IOPORT IOPORT3
159 #define TEENSY_PIN11_IOPORT IOPORT3
160 #define TEENSY_PIN12_IOPORT IOPORT3
161 #define TEENSY_PIN13_IOPORT IOPORT3
162 #define TEENSY_PIN15_IOPORT IOPORT3
163 #define TEENSY_PIN22_IOPORT IOPORT3
164 #define TEENSY_PIN23_IOPORT IOPORT3
165 #define TEENSY_PIN27_IOPORT IOPORT3
166 #define TEENSY_PIN28_IOPORT IOPORT3
167 #define TEENSY_PIN29_IOPORT IOPORT3
168 #define TEENSY_PIN30_IOPORT IOPORT3
170 #define TEENSY_PIN2 0
171 #define TEENSY_PIN14 1
172 #define TEENSY_PIN7 2
173 #define TEENSY_PIN8 3
174 #define TEENSY_PIN6 4
175 #define TEENSY_PIN20 5
176 #define TEENSY_PIN21 6
177 #define TEENSY_PIN5 7
180 #define PORTD_PIN10 10
181 #define PORTD_PIN11 11
182 #define PORTD_PIN12 12
183 #define PORTD_PIN13 13
184 #define PORTD_PIN14 14
185 #define PORTD_PIN15 15
186 #define PORTD_PIN16 16
187 #define PORTD_PIN17 17
188 #define PORTD_PIN18 18
189 #define PORTD_PIN19 19
190 #define PORTD_PIN20 20
191 #define PORTD_PIN21 21
192 #define PORTD_PIN22 22
193 #define PORTD_PIN23 23
194 #define PORTD_PIN24 24
195 #define PORTD_PIN25 25
196 #define PORTD_PIN26 26
197 #define PORTD_PIN27 27
198 #define PORTD_PIN28 28
199 #define PORTD_PIN29 29
200 #define PORTD_PIN30 30
201 #define PORTD_PIN31 31
203 #define TEENSY_PIN2_IOPORT IOPORT4
204 #define TEENSY_PIN5_IOPORT IOPORT4
205 #define TEENSY_PIN6_IOPORT IOPORT4
206 #define TEENSY_PIN7_IOPORT IOPORT4
207 #define TEENSY_PIN8_IOPORT IOPORT4
208 #define TEENSY_PIN14_IOPORT IOPORT4
209 #define TEENSY_PIN20_IOPORT IOPORT4
210 #define TEENSY_PIN21_IOPORT IOPORT4
212 #define TEENSY_PIN31 0
213 #define TEENSY_PIN26 1
222 #define PORTE_PIN10 10
223 #define PORTE_PIN11 11
224 #define PORTE_PIN12 12
225 #define PORTE_PIN13 13
226 #define PORTE_PIN14 14
227 #define PORTE_PIN15 15
228 #define PORTE_PIN16 16
229 #define PORTE_PIN17 17
230 #define PORTE_PIN18 18
231 #define PORTE_PIN19 19
232 #define PORTE_PIN20 20
233 #define PORTE_PIN21 21
234 #define PORTE_PIN22 22
235 #define PORTE_PIN23 23
236 #define PORTE_PIN24 24
237 #define PORTE_PIN25 25
238 #define PORTE_PIN26 26
239 #define PORTE_PIN27 27
240 #define PORTE_PIN28 28
241 #define PORTE_PIN29 29
242 #define PORTE_PIN30 30
243 #define PORTE_PIN31 31
245 #define TEENSY_PIN26_IOPORT IOPORT5
246 #define TEENSY_PIN31_IOPORT IOPORT5
248 #define LINE_PIN1 PAL_LINE(TEENSY_PIN1_IOPORT, TEENSY_PIN1)
249 #define LINE_PIN2 PAL_LINE(TEENSY_PIN2_IOPORT, TEENSY_PIN2)
250 #define LINE_PIN3 PAL_LINE(TEENSY_PIN3_IOPORT, TEENSY_PIN3)
251 #define LINE_PIN4 PAL_LINE(TEENSY_PIN4_IOPORT, TEENSY_PIN4)
252 #define LINE_PIN5 PAL_LINE(TEENSY_PIN5_IOPORT, TEENSY_PIN5)
253 #define LINE_PIN6 PAL_LINE(TEENSY_PIN6_IOPORT, TEENSY_PIN6)
254 #define LINE_PIN7 PAL_LINE(TEENSY_PIN7_IOPORT, TEENSY_PIN7)
255 #define LINE_PIN8 PAL_LINE(TEENSY_PIN8_IOPORT, TEENSY_PIN8)
256 #define LINE_PIN9 PAL_LINE(TEENSY_PIN9_IOPORT, TEENSY_PIN9)
257 #define LINE_PIN10 PAL_LINE(TEENSY_PIN10_IOPORT, TEENSY_PIN10)
258 #define LINE_PIN11 PAL_LINE(TEENSY_PIN11_IOPORT, TEENSY_PIN11)
259 #define LINE_PIN12 PAL_LINE(TEENSY_PIN12_IOPORT, TEENSY_PIN12)
260 #define LINE_PIN13 PAL_LINE(TEENSY_PIN13_IOPORT, TEENSY_PIN13)
261 #define LINE_PIN14 PAL_LINE(TEENSY_PIN14_IOPORT, TEENSY_PIN14)
262 #define LINE_PIN15 PAL_LINE(TEENSY_PIN15_IOPORT, TEENSY_PIN15)
263 #define LINE_PIN16 PAL_LINE(TEENSY_PIN16_IOPORT, TEENSY_PIN16)
264 #define LINE_PIN17 PAL_LINE(TEENSY_PIN17_IOPORT, TEENSY_PIN17)
265 #define LINE_PIN18 PAL_LINE(TEENSY_PIN18_IOPORT, TEENSY_PIN18)
266 #define LINE_PIN19 PAL_LINE(TEENSY_PIN19_IOPORT, TEENSY_PIN19)
267 #define LINE_PIN20 PAL_LINE(TEENSY_PIN20_IOPORT, TEENSY_PIN20)
268 #define LINE_PIN21 PAL_LINE(TEENSY_PIN21_IOPORT, TEENSY_PIN21)
269 #define LINE_PIN22 PAL_LINE(TEENSY_PIN22_IOPORT, TEENSY_PIN22)
270 #define LINE_PIN23 PAL_LINE(TEENSY_PIN23_IOPORT, TEENSY_PIN23)
271 #define LINE_PIN24 PAL_LINE(TEENSY_PIN24_IOPORT, TEENSY_PIN24)
272 #define LINE_PIN25 PAL_LINE(TEENSY_PIN25_IOPORT, TEENSY_PIN25)
273 #define LINE_PIN25 PAL_LINE(TEENSY_PIN25_IOPORT, TEENSY_PIN25)
274 #define LINE_PIN26 PAL_LINE(TEENSY_PIN26_IOPORT, TEENSY_PIN26)
275 #define LINE_PIN27 PAL_LINE(TEENSY_PIN27_IOPORT, TEENSY_PIN27)
276 #define LINE_PIN28 PAL_LINE(TEENSY_PIN28_IOPORT, TEENSY_PIN28)
277 #define LINE_PIN29 PAL_LINE(TEENSY_PIN29_IOPORT, TEENSY_PIN29)
278 #define LINE_PIN30 PAL_LINE(TEENSY_PIN30_IOPORT, TEENSY_PIN30)
279 #define LINE_PIN31 PAL_LINE(TEENSY_PIN31_IOPORT, TEENSY_PIN31)
280 #define LINE_PIN32 PAL_LINE(TEENSY_PIN32_IOPORT, TEENSY_PIN32)
281 #define LINE_PIN33 PAL_LINE(TEENSY_PIN33_IOPORT, TEENSY_PIN33)
283 #define LINE_LED LINE_PIN13
285 #if !defined(_FROM_ASM_)
289 void boardInit(void);
293 #endif /* _FROM_ASM_ */
295 #endif /* _BOARD_H_ */