aboutsummaryrefslogtreecommitdiff
path: root/lib/chibios-contrib/os/hal/boards/PJRC_TEENSY_3_5/board.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chibios-contrib/os/hal/boards/PJRC_TEENSY_3_5/board.h')
-rw-r--r--lib/chibios-contrib/os/hal/boards/PJRC_TEENSY_3_5/board.h243
1 files changed, 243 insertions, 0 deletions
diff --git a/lib/chibios-contrib/os/hal/boards/PJRC_TEENSY_3_5/board.h b/lib/chibios-contrib/os/hal/boards/PJRC_TEENSY_3_5/board.h
new file mode 100644
index 000000000..7c10831bb
--- /dev/null
+++ b/lib/chibios-contrib/os/hal/boards/PJRC_TEENSY_3_5/board.h
@@ -0,0 +1,243 @@
1/*
2 ChibiOS - Copyright (C) 2017 Wim Lewis
3
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
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
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.
15*/
16
17#ifndef _BOARD_H_
18#define _BOARD_H_
19
20/*
21 * Setup for the PJRC Teensy 3.5 board.
22 */
23
24/*
25 * Board identifier
26 */
27#define BOARD_PJRC_TEENSY_3_5
28#define BOARD_NAME "PJRC Teensy 3.5"
29
30/* External 16 MHz crystal */
31#define KINETIS_XTAL_FREQUENCY 16000000UL
32
33/* Use internal capacitors for the crystal */
34#define KINETIS_BOARD_OSCILLATOR_SETTING OSC_CR_SC8P|OSC_CR_SC2P
35
36/*
37 * MCU type
38 */
39#define K64FX512
40
41/*
42 * IO pin assignments
43 */
44#define TEENSY_PIN25 5
45#define TEENSY_PIN3 12
46#define TEENSY_PIN4 13
47#define TEENSY_PIN26 14
48#define TEENSY_PIN27 15
49#define TEENSY_PIN28 16
50#define TEENSY_PIN39 17
51#define TEENSY_PIN42 26
52#define TEENSY_PIN40 28
53#define TEENSY_PIN41 29
54
55#define TEENSY_PIN25_IOPORT IOPORT1
56#define TEENSY_PIN3_IOPORT IOPORT1
57#define TEENSY_PIN4_IOPORT IOPORT1
58#define TEENSY_PIN26_IOPORT IOPORT1
59#define TEENSY_PIN27_IOPORT IOPORT1
60#define TEENSY_PIN28_IOPORT IOPORT1
61#define TEENSY_PIN39_IOPORT IOPORT1
62#define TEENSY_PIN42_IOPORT IOPORT1
63#define TEENSY_PIN40_IOPORT IOPORT1
64#define TEENSY_PIN41_IOPORT IOPORT1
65
66#define TEENSY_PIN16 0
67#define TEENSY_PIN17 1
68#define TEENSY_PIN19 2
69#define TEENSY_PIN18 3
70#define TEENSY_PIN49 4
71#define TEENSY_PIN50 5
72#define TEENSY_PIN31 10
73#define TEENSY_PIN32 11
74#define TEENSY_PIN0 16
75#define TEENSY_PIN1 17
76#define TEENSY_PIN29 18
77#define TEENSY_PIN30 19
78#define TEENSY_PIN43 20
79#define TEENSY_PIN46 21
80#define TEENSY_PIN44 22
81#define TEENSY_PIN45 23
82
83#define TEENSY_PIN16_IOPORT IOPORT2
84#define TEENSY_PIN17_IOPORT IOPORT2
85#define TEENSY_PIN19_IOPORT IOPORT2
86#define TEENSY_PIN18_IOPORT IOPORT2
87#define TEENSY_PIN49_IOPORT IOPORT2
88#define TEENSY_PIN50_IOPORT IOPORT2
89#define TEENSY_PIN31_IOPORT IOPORT2
90#define TEENSY_PIN32_IOPORT IOPORT2
91#define TEENSY_PIN0_IOPORT IOPORT2
92#define TEENSY_PIN1_IOPORT IOPORT2
93#define TEENSY_PIN29_IOPORT IOPORT2
94#define TEENSY_PIN30_IOPORT IOPORT2
95#define TEENSY_PIN43_IOPORT IOPORT2
96#define TEENSY_PIN46_IOPORT IOPORT2
97#define TEENSY_PIN44_IOPORT IOPORT2
98#define TEENSY_PIN45_IOPORT IOPORT2
99
100#define TEENSY_PIN15 0
101#define TEENSY_PIN22 1
102#define TEENSY_PIN23 2
103#define TEENSY_PIN9 3
104#define TEENSY_PIN10 4
105#define TEENSY_PIN13 5
106#define TEENSY_PIN11 6
107#define TEENSY_PIN12 7
108#define TEENSY_PIN35 8
109#define TEENSY_PIN36 9
110#define TEENSY_PIN37 10
111#define TEENSY_PIN38 11
112
113#define TEENSY_PIN15_IOPORT IOPORT3
114#define TEENSY_PIN22_IOPORT IOPORT3
115#define TEENSY_PIN23_IOPORT IOPORT3
116#define TEENSY_PIN9_IOPORT IOPORT3
117#define TEENSY_PIN10_IOPORT IOPORT3
118#define TEENSY_PIN13_IOPORT IOPORT3
119#define TEENSY_PIN11_IOPORT IOPORT3
120#define TEENSY_PIN12_IOPORT IOPORT3
121#define TEENSY_PIN35_IOPORT IOPORT3
122#define TEENSY_PIN36_IOPORT IOPORT3
123#define TEENSY_PIN37_IOPORT IOPORT3
124#define TEENSY_PIN38_IOPORT IOPORT3
125
126#define TEENSY_PIN2 0
127#define TEENSY_PIN14 1
128#define TEENSY_PIN7 2
129#define TEENSY_PIN8 3
130#define TEENSY_PIN6 4
131#define TEENSY_PIN20 5
132#define TEENSY_PIN21 6
133#define TEENSY_PIN5 7
134#define TEENSY_PIN47 8
135#define TEENSY_PIN48 9
136#define TEENSY_PIN55 11
137#define TEENSY_PIN53 12
138#define TEENSY_PIN52 13
139#define TEENSY_PIN51 14
140#define TEENSY_PIN54 15
141
142#define TEENSY_PIN2_IOPORT IOPORT4
143#define TEENSY_PIN14_IOPORT IOPORT4
144#define TEENSY_PIN7_IOPORT IOPORT4
145#define TEENSY_PIN8_IOPORT IOPORT4
146#define TEENSY_PIN6_IOPORT IOPORT4
147#define TEENSY_PIN20_IOPORT IOPORT4
148#define TEENSY_PIN21_IOPORT IOPORT4
149#define TEENSY_PIN5_IOPORT IOPORT4
150#define TEENSY_PIN47_IOPORT IOPORT4
151#define TEENSY_PIN48_IOPORT IOPORT4
152#define TEENSY_PIN55_IOPORT IOPORT4
153#define TEENSY_PIN53_IOPORT IOPORT4
154#define TEENSY_PIN52_IOPORT IOPORT4
155#define TEENSY_PIN51_IOPORT IOPORT4
156#define TEENSY_PIN54_IOPORT IOPORT4
157
158#define TEENSY_PIN56 10
159#define TEENSY_PIN57 11
160#define TEENSY_PIN33 24
161#define TEENSY_PIN34 25
162#define TEENSY_PIN24 26
163
164#define TEENSY_PIN56_IOPORT IOPORT5
165#define TEENSY_PIN57_IOPORT IOPORT5
166#define TEENSY_PIN33_IOPORT IOPORT5
167#define TEENSY_PIN34_IOPORT IOPORT5
168#define TEENSY_PIN24_IOPORT IOPORT5
169
170#define LINE_PIN0 PAL_LINE(TEENSY_PIN0_IOPORT, TEENSY_PIN0)
171#define LINE_PIN1 PAL_LINE(TEENSY_PIN1_IOPORT, TEENSY_PIN1)
172#define LINE_PIN2 PAL_LINE(TEENSY_PIN2_IOPORT, TEENSY_PIN2)
173#define LINE_PIN3 PAL_LINE(TEENSY_PIN3_IOPORT, TEENSY_PIN3)
174#define LINE_PIN4 PAL_LINE(TEENSY_PIN4_IOPORT, TEENSY_PIN4)
175#define LINE_PIN5 PAL_LINE(TEENSY_PIN5_IOPORT, TEENSY_PIN5)
176#define LINE_PIN6 PAL_LINE(TEENSY_PIN6_IOPORT, TEENSY_PIN6)
177#define LINE_PIN7 PAL_LINE(TEENSY_PIN7_IOPORT, TEENSY_PIN7)
178#define LINE_PIN8 PAL_LINE(TEENSY_PIN8_IOPORT, TEENSY_PIN8)
179#define LINE_PIN9 PAL_LINE(TEENSY_PIN9_IOPORT, TEENSY_PIN9)
180#define LINE_PIN10 PAL_LINE(TEENSY_PIN10_IOPORT, TEENSY_PIN10)
181#define LINE_PIN11 PAL_LINE(TEENSY_PIN11_IOPORT, TEENSY_PIN11)
182#define LINE_PIN12 PAL_LINE(TEENSY_PIN12_IOPORT, TEENSY_PIN12)
183#define LINE_PIN13 PAL_LINE(TEENSY_PIN13_IOPORT, TEENSY_PIN13)
184#define LINE_PIN14 PAL_LINE(TEENSY_PIN14_IOPORT, TEENSY_PIN14)
185#define LINE_PIN15 PAL_LINE(TEENSY_PIN15_IOPORT, TEENSY_PIN15)
186#define LINE_PIN16 PAL_LINE(TEENSY_PIN16_IOPORT, TEENSY_PIN16)
187#define LINE_PIN17 PAL_LINE(TEENSY_PIN17_IOPORT, TEENSY_PIN17)
188#define LINE_PIN18 PAL_LINE(TEENSY_PIN18_IOPORT, TEENSY_PIN18)
189#define LINE_PIN19 PAL_LINE(TEENSY_PIN19_IOPORT, TEENSY_PIN19)
190#define LINE_PIN20 PAL_LINE(TEENSY_PIN20_IOPORT, TEENSY_PIN20)
191#define LINE_PIN21 PAL_LINE(TEENSY_PIN21_IOPORT, TEENSY_PIN21)
192#define LINE_PIN22 PAL_LINE(TEENSY_PIN22_IOPORT, TEENSY_PIN22)
193#define LINE_PIN23 PAL_LINE(TEENSY_PIN23_IOPORT, TEENSY_PIN23)
194#define LINE_PIN24 PAL_LINE(TEENSY_PIN24_IOPORT, TEENSY_PIN24)
195#define LINE_PIN25 PAL_LINE(TEENSY_PIN25_IOPORT, TEENSY_PIN25)
196#define LINE_PIN25 PAL_LINE(TEENSY_PIN25_IOPORT, TEENSY_PIN25)
197#define LINE_PIN26 PAL_LINE(TEENSY_PIN26_IOPORT, TEENSY_PIN26)
198#define LINE_PIN27 PAL_LINE(TEENSY_PIN27_IOPORT, TEENSY_PIN27)
199#define LINE_PIN28 PAL_LINE(TEENSY_PIN28_IOPORT, TEENSY_PIN28)
200#define LINE_PIN29 PAL_LINE(TEENSY_PIN29_IOPORT, TEENSY_PIN29)
201#define LINE_PIN30 PAL_LINE(TEENSY_PIN30_IOPORT, TEENSY_PIN30)
202#define LINE_PIN31 PAL_LINE(TEENSY_PIN31_IOPORT, TEENSY_PIN31)
203#define LINE_PIN32 PAL_LINE(TEENSY_PIN32_IOPORT, TEENSY_PIN32)
204#define LINE_PIN33 PAL_LINE(TEENSY_PIN33_IOPORT, TEENSY_PIN33)
205#define LINE_PIN34 PAL_LINE(TEENSY_PIN34_IOPORT, TEENSY_PIN34)
206#define LINE_PIN35 PAL_LINE(TEENSY_PIN35_IOPORT, TEENSY_PIN35)
207#define LINE_PIN36 PAL_LINE(TEENSY_PIN36_IOPORT, TEENSY_PIN36)
208#define LINE_PIN37 PAL_LINE(TEENSY_PIN37_IOPORT, TEENSY_PIN37)
209#define LINE_PIN38 PAL_LINE(TEENSY_PIN38_IOPORT, TEENSY_PIN38)
210#define LINE_PIN39 PAL_LINE(TEENSY_PIN39_IOPORT, TEENSY_PIN39)
211#define LINE_PIN40 PAL_LINE(TEENSY_PIN40_IOPORT, TEENSY_PIN40)
212#define LINE_PIN41 PAL_LINE(TEENSY_PIN41_IOPORT, TEENSY_PIN41)
213#define LINE_PIN42 PAL_LINE(TEENSY_PIN42_IOPORT, TEENSY_PIN42)
214#define LINE_PIN43 PAL_LINE(TEENSY_PIN43_IOPORT, TEENSY_PIN43)
215#define LINE_PIN44 PAL_LINE(TEENSY_PIN44_IOPORT, TEENSY_PIN44)
216#define LINE_PIN45 PAL_LINE(TEENSY_PIN45_IOPORT, TEENSY_PIN45)
217#define LINE_PIN46 PAL_LINE(TEENSY_PIN46_IOPORT, TEENSY_PIN46)
218#define LINE_PIN47 PAL_LINE(TEENSY_PIN47_IOPORT, TEENSY_PIN47)
219#define LINE_PIN48 PAL_LINE(TEENSY_PIN48_IOPORT, TEENSY_PIN48)
220#define LINE_PIN49 PAL_LINE(TEENSY_PIN49_IOPORT, TEENSY_PIN49)
221#define LINE_PIN50 PAL_LINE(TEENSY_PIN50_IOPORT, TEENSY_PIN50)
222#define LINE_PIN51 PAL_LINE(TEENSY_PIN51_IOPORT, TEENSY_PIN51)
223#define LINE_PIN52 PAL_LINE(TEENSY_PIN52_IOPORT, TEENSY_PIN52)
224#define LINE_PIN53 PAL_LINE(TEENSY_PIN53_IOPORT, TEENSY_PIN53)
225#define LINE_PIN54 PAL_LINE(TEENSY_PIN54_IOPORT, TEENSY_PIN54)
226#define LINE_PIN55 PAL_LINE(TEENSY_PIN55_IOPORT, TEENSY_PIN55)
227#define LINE_PIN56 PAL_LINE(TEENSY_PIN56_IOPORT, TEENSY_PIN56)
228#define LINE_PIN57 PAL_LINE(TEENSY_PIN57_IOPORT, TEENSY_PIN57)
229
230#define LINE_LED LINE_PIN13
231
232#if !defined(_FROM_ASM_)
233#ifdef __cplusplus
234extern "C" {
235#endif
236 void boardInit(void);
237#ifdef __cplusplus
238}
239#endif
240#endif /* _FROM_ASM_ */
241
242#endif /* _BOARD_H_ */
243