diff options
Diffstat (limited to 'lib/chibios-contrib/os/hal/boards/PJRC_TEENSY_3_6')
3 files changed, 570 insertions, 0 deletions
diff --git a/lib/chibios-contrib/os/hal/boards/PJRC_TEENSY_3_6/board.c b/lib/chibios-contrib/os/hal/boards/PJRC_TEENSY_3_6/board.c new file mode 100644 index 000000000..e59f4ae2c --- /dev/null +++ b/lib/chibios-contrib/os/hal/boards/PJRC_TEENSY_3_6/board.c | |||
@@ -0,0 +1,216 @@ | |||
1 | /* | ||
2 | ChibiOS - Copyright (C) 2015 RedoX https://github.com/RedoXyde | ||
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 | #include "hal.h" | ||
17 | |||
18 | #if HAL_USE_PAL || defined(__DOXYGEN__) | ||
19 | /** | ||
20 | * @brief PAL setup. | ||
21 | * @details Digital I/O ports static configuration as defined in @p board.h. | ||
22 | * This variable is used by the HAL when initializing the PAL driver. | ||
23 | */ | ||
24 | const PALConfig pal_default_config = | ||
25 | { | ||
26 | .ports = { | ||
27 | { | ||
28 | /* | ||
29 | * PORTA setup. | ||
30 | * | ||
31 | * PTA0 - SWD | ||
32 | * PTA3 - SWD | ||
33 | * PTA5 - PIN25 | ||
34 | * PTA12 - PIN3 | ||
35 | * PTA13 - PIN4 | ||
36 | * PTA14 - PIN26 | ||
37 | * PTA15 - PIN27 | ||
38 | * PTA16 - PIN28 | ||
39 | * PTA17 - PIN39 | ||
40 | * PTA18 - Crystal | ||
41 | * PTA19 - Crystal | ||
42 | * PTA26 - PIN42 | ||
43 | * PTA28 - PIN40 | ||
44 | * PTA29 - PIN41 | ||
45 | * | ||
46 | */ | ||
47 | .port = IOPORT1, | ||
48 | .pads = { | ||
49 | PAL_MODE_ALTERNATIVE_7, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, | ||
50 | PAL_MODE_ALTERNATIVE_7, PAL_MODE_UNCONNECTED, PAL_MODE_OUTPUT_PUSHPULL, | ||
51 | PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, | ||
52 | PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, | ||
53 | PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, | ||
54 | PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, | ||
55 | PAL_MODE_INPUT_ANALOG, PAL_MODE_INPUT_ANALOG, PAL_MODE_UNCONNECTED, | ||
56 | PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, | ||
57 | PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_OUTPUT_PUSHPULL, | ||
58 | PAL_MODE_UNCONNECTED, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, | ||
59 | PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, | ||
60 | }, | ||
61 | }, | ||
62 | { | ||
63 | /* | ||
64 | * PORTB setup. | ||
65 | * | ||
66 | * PTB0 - PIN16 | ||
67 | * PTB1 - PIN17 | ||
68 | * PTB2 - PIN19 | ||
69 | * PTB3 - PIN18 | ||
70 | * PTB4 - PIN49 | ||
71 | * PTB5 - PIN50 | ||
72 | * PTB10 - PIN31 | ||
73 | * PTB11 - PIN32 | ||
74 | * PTB16 - PIN0 - UART0_RX | ||
75 | * PTB17 - PIN1 - UART0_TX | ||
76 | * PTB18 - PIN29 | ||
77 | * PTB19 - PIN30 | ||
78 | * PTB20 - PIN43 | ||
79 | * PTB21 - PIN46 | ||
80 | * PTB22 - PIN44 | ||
81 | * PTB23 - PIN45 | ||
82 | */ | ||
83 | .port = IOPORT2, | ||
84 | .pads = { | ||
85 | PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, | ||
86 | PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, | ||
87 | PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, | ||
88 | PAL_MODE_UNCONNECTED, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, | ||
89 | PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, | ||
90 | PAL_MODE_UNCONNECTED, PAL_MODE_ALTERNATIVE_3, PAL_MODE_ALTERNATIVE_3, | ||
91 | PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, | ||
92 | PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, | ||
93 | PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, | ||
94 | PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, | ||
95 | PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, | ||
96 | }, | ||
97 | }, | ||
98 | { | ||
99 | /* | ||
100 | * PORTC setup. | ||
101 | * PTC0 - PIN15 | ||
102 | * PTC1 - PIN22 | ||
103 | * PTC2 - PIN23 | ||
104 | * PTC3 - PIN9 | ||
105 | * PTC4 - PIN10 | ||
106 | * PTC5 - PIN13 | ||
107 | * PTC6 - PIN11 | ||
108 | * PTC7 - PIN12 | ||
109 | * PTC8 - PIN35 | ||
110 | * PTC9 - PIN36 | ||
111 | * PTC10 - PIN37 | ||
112 | * PTC11 - PIN38 | ||
113 | * | ||
114 | */ | ||
115 | .port = IOPORT3, | ||
116 | .pads = { | ||
117 | PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, | ||
118 | PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, | ||
119 | PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, | ||
120 | PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, | ||
121 | PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, | ||
122 | PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, | ||
123 | PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, | ||
124 | PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, | ||
125 | PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, | ||
126 | PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, | ||
127 | PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, | ||
128 | }, | ||
129 | }, | ||
130 | { | ||
131 | /* | ||
132 | * PORTD setup. | ||
133 | * | ||
134 | * PTD0 - PIN2 | ||
135 | * PTD1 - PIN14 | ||
136 | * PTD2 - PIN7 | ||
137 | * PTD3 - PIN8 | ||
138 | * PTD4 - PIN6 | ||
139 | * PTD5 - PIN20 | ||
140 | * PTD6 - PIN21 | ||
141 | * PTD7 - PIN5 | ||
142 | * PTD8 - PIN47 | ||
143 | * PTD9 - PIN48 | ||
144 | * PTD11 - PIN55 | ||
145 | * PTD12 - PIN53 | ||
146 | * PTD13 - PIN52 | ||
147 | * PTD14 - PIN51 | ||
148 | * PTD15 - PIN54 | ||
149 | */ | ||
150 | .port = IOPORT4, | ||
151 | .pads = { | ||
152 | PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, | ||
153 | PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, | ||
154 | PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, | ||
155 | PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_UNCONNECTED, PAL_MODE_OUTPUT_PUSHPULL, | ||
156 | PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, | ||
157 | PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, | ||
158 | PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, | ||
159 | PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, | ||
160 | PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, | ||
161 | PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, | ||
162 | PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, | ||
163 | }, | ||
164 | }, | ||
165 | { | ||
166 | /* | ||
167 | * PORTE setup. | ||
168 | * | ||
169 | * PTE0 - SDHC | ||
170 | * PTE1 - SDHC | ||
171 | * PTE2 - SDHC | ||
172 | * PTE3 - SDHC | ||
173 | * PTE4 - SDHC | ||
174 | * PTE5 - SDHC | ||
175 | * PTE6 - USB OTG power switch | ||
176 | * PTE10 - PIN56 | ||
177 | * PTE11 - PIN57 | ||
178 | * PTE24 - PIN33 | ||
179 | * PTE25 - PIN34 | ||
180 | * PTE26 - PIN24 | ||
181 | */ | ||
182 | .port = IOPORT5, | ||
183 | .pads = { | ||
184 | PAL_MODE_ALTERNATIVE_4, PAL_MODE_ALTERNATIVE_4, PAL_MODE_ALTERNATIVE_4, | ||
185 | PAL_MODE_ALTERNATIVE_4, PAL_MODE_ALTERNATIVE_4, PAL_MODE_ALTERNATIVE_4, | ||
186 | PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, | ||
187 | PAL_MODE_UNCONNECTED, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, | ||
188 | PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, | ||
189 | PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, | ||
190 | PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, | ||
191 | PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, | ||
192 | PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, | ||
193 | PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, | ||
194 | PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, | ||
195 | }, | ||
196 | }, | ||
197 | }, | ||
198 | }; | ||
199 | #endif | ||
200 | |||
201 | /** | ||
202 | * @brief Early initialization code. | ||
203 | * @details This initialization must be performed just after stack setup | ||
204 | * and before any other initialization. | ||
205 | */ | ||
206 | void __early_init(void) { | ||
207 | |||
208 | MK66F18_clock_init(); | ||
209 | } | ||
210 | |||
211 | /** | ||
212 | * @brief Board-specific initialization code. | ||
213 | * @todo Add your board-specific code, if any. | ||
214 | */ | ||
215 | void boardInit(void) { | ||
216 | } | ||
diff --git a/lib/chibios-contrib/os/hal/boards/PJRC_TEENSY_3_6/board.h b/lib/chibios-contrib/os/hal/boards/PJRC_TEENSY_3_6/board.h new file mode 100644 index 000000000..0607d56f0 --- /dev/null +++ b/lib/chibios-contrib/os/hal/boards/PJRC_TEENSY_3_6/board.h | |||
@@ -0,0 +1,345 @@ | |||
1 | /* | ||
2 | ChibiOS - Copyright (C) 2015 RedoX https://github.com/RedoXyde | ||
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.6 board. | ||
22 | */ | ||
23 | |||
24 | /* | ||
25 | * Board identifier. | ||
26 | */ | ||
27 | #define BOARD_PJRC_TEENSY_3_6 | ||
28 | #define BOARD_NAME "PJRC Teensy 3.6" | ||
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 OSC0_CR_SC8P_SET(1) | OSC0_CR_SC2P_SET(1) | OSC0_CR_ERCLKEN_SET(1) | ||
35 | |||
36 | /* | ||
37 | * MCU type | ||
38 | */ | ||
39 | #define MK66F18 | ||
40 | |||
41 | /* | ||
42 | * IO pins assignments. | ||
43 | */ | ||
44 | #define PORTA_PIN0 0 | ||
45 | #define PORTA_PIN1 1 | ||
46 | #define PORTA_PIN2 2 | ||
47 | #define PORTA_PIN3 3 | ||
48 | #define PORTA_PIN4 4 | ||
49 | #define TEENSY_PIN25 5 | ||
50 | #define PORTA_PIN6 6 | ||
51 | #define PORTA_PIN7 7 | ||
52 | #define PORTA_PIN8 8 | ||
53 | #define PORTA_PIN9 9 | ||
54 | #define PORTA_PIN10 10 | ||
55 | #define PORTA_PIN11 11 | ||
56 | #define TEENSY_PIN3 12 | ||
57 | #define TEENSY_PIN4 13 | ||
58 | #define TEENSY_PIN26 14 | ||
59 | #define TEENSY_PIN27 15 | ||
60 | #define TEENSY_PIN28 16 | ||
61 | #define TEENSY_PIN39 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 TEENSY_PIN42 26 | ||
71 | #define PORTA_PIN27 27 | ||
72 | #define TEENSY_PIN40 28 | ||
73 | #define TEENSY_PIN41 29 | ||
74 | #define PORTA_PIN30 30 | ||
75 | #define PORTA_PIN31 31 | ||
76 | |||
77 | #define TEENSY_PIN40_IOPORT IOPORT1 | ||
78 | #define TEENSY_PIN41_IOPORT IOPORT1 | ||
79 | #define TEENSY_PIN42_IOPORT IOPORT1 | ||
80 | #define TEENSY_PIN3_IOPORT IOPORT1 | ||
81 | #define TEENSY_PIN4_IOPORT IOPORT1 | ||
82 | #define TEENSY_PIN25_IOPORT IOPORT1 | ||
83 | #define TEENSY_PIN26_IOPORT IOPORT1 | ||
84 | #define TEENSY_PIN27_IOPORT IOPORT1 | ||
85 | #define TEENSY_PIN28_IOPORT IOPORT1 | ||
86 | #define TEENSY_PIN39_IOPORT IOPORT1 | ||
87 | |||
88 | #define TEENSY_PIN16 0 | ||
89 | #define TEENSY_PIN17 1 | ||
90 | #define TEENSY_PIN19 2 | ||
91 | #define TEENSY_PIN18 3 | ||
92 | #define TEENSY_PIN49 4 | ||
93 | #define TEENSY_PIN50 5 | ||
94 | #define PORTB_PIN6 6 | ||
95 | #define PORTB_PIN7 7 | ||
96 | #define PORTB_PIN8 8 | ||
97 | #define PORTB_PIN9 9 | ||
98 | #define TEENSY_PIN31 10 | ||
99 | #define TEENSY_PIN32 11 | ||
100 | #define PORTB_PIN12 12 | ||
101 | #define PORTB_PIN13 13 | ||
102 | #define PORTB_PIN14 14 | ||
103 | #define PORTB_PIN15 15 | ||
104 | #define TEENSY_PIN0 16 | ||
105 | #define TEENSY_PIN1 17 | ||
106 | #define TEENSY_PIN29 18 | ||
107 | #define TEENSY_PIN30 19 | ||
108 | #define TEENSY_PIN43 20 | ||
109 | #define TEENSY_PIN46 21 | ||
110 | #define TEENSY_PIN44 22 | ||
111 | #define TEENSY_PIN45 23 | ||
112 | #define PORTB_PIN24 24 | ||
113 | #define PORTB_PIN25 25 | ||
114 | #define PORTB_PIN26 26 | ||
115 | #define PORTB_PIN27 27 | ||
116 | #define PORTB_PIN28 28 | ||
117 | #define PORTB_PIN29 29 | ||
118 | #define PORTB_PIN30 30 | ||
119 | #define PORTB_PIN31 31 | ||
120 | |||
121 | #define TEENSY_PIN49_IOPORT IOPORT2 | ||
122 | #define TEENSY_PIN50_IOPORT IOPORT2 | ||
123 | #define TEENSY_PIN43_IOPORT IOPORT2 | ||
124 | #define TEENSY_PIN44_IOPORT IOPORT2 | ||
125 | #define TEENSY_PIN45_IOPORT IOPORT2 | ||
126 | #define TEENSY_PIN46_IOPORT IOPORT2 | ||
127 | #define TEENSY_PIN0_IOPORT IOPORT2 | ||
128 | #define TEENSY_PIN1_IOPORT IOPORT2 | ||
129 | #define TEENSY_PIN29_IOPORT IOPORT2 | ||
130 | #define TEENSY_PIN30_IOPORT IOPORT2 | ||
131 | #define TEENSY_PIN31_IOPORT IOPORT2 | ||
132 | #define TEENSY_PIN32_IOPORT IOPORT2 | ||
133 | #define TEENSY_PIN16_IOPORT IOPORT2 | ||
134 | #define TEENSY_PIN17_IOPORT IOPORT2 | ||
135 | #define TEENSY_PIN19_IOPORT IOPORT2 | ||
136 | #define TEENSY_PIN18_IOPORT IOPORT2 | ||
137 | |||
138 | #define TEENSY_PIN15 0 | ||
139 | #define TEENSY_PIN22 1 | ||
140 | #define TEENSY_PIN23 2 | ||
141 | #define TEENSY_PIN9 3 | ||
142 | #define TEENSY_PIN10 4 | ||
143 | #define TEENSY_PIN13 5 | ||
144 | #define TEENSY_PIN11 6 | ||
145 | #define TEENSY_PIN12 7 | ||
146 | #define TEENSY_PIN35 8 | ||
147 | #define TEENSY_PIN36 9 | ||
148 | #define TEENSY_PIN37 10 | ||
149 | #define TEENSY_PIN38 11 | ||
150 | #define PORTC_PIN12 12 | ||
151 | #define PORTC_PIN13 13 | ||
152 | #define PORTC_PIN14 14 | ||
153 | #define PORTC_PIN15 15 | ||
154 | #define PORTC_PIN16 16 | ||
155 | #define PORTC_PIN17 17 | ||
156 | #define PORTC_PIN18 18 | ||
157 | #define PORTC_PIN19 19 | ||
158 | #define PORTC_PIN20 20 | ||
159 | #define PORTC_PIN21 21 | ||
160 | #define PORTC_PIN22 22 | ||
161 | #define PORTC_PIN23 23 | ||
162 | #define PORTC_PIN24 24 | ||
163 | #define PORTC_PIN25 25 | ||
164 | #define PORTC_PIN26 26 | ||
165 | #define PORTC_PIN27 27 | ||
166 | #define PORTC_PIN28 28 | ||
167 | #define PORTC_PIN29 29 | ||
168 | #define PORTC_PIN30 30 | ||
169 | #define PORTC_PIN31 31 | ||
170 | |||
171 | #define TEENSY_PIN9_IOPORT IOPORT3 | ||
172 | #define TEENSY_PIN10_IOPORT IOPORT3 | ||
173 | #define TEENSY_PIN11_IOPORT IOPORT3 | ||
174 | #define TEENSY_PIN12_IOPORT IOPORT3 | ||
175 | #define TEENSY_PIN35_IOPORT IOPORT3 | ||
176 | #define TEENSY_PIN36_IOPORT IOPORT3 | ||
177 | #define TEENSY_PIN37_IOPORT IOPORT3 | ||
178 | #define TEENSY_PIN38_IOPORT IOPORT3 | ||
179 | #define TEENSY_PIN13_IOPORT IOPORT3 | ||
180 | #define TEENSY_PIN15_IOPORT IOPORT3 | ||
181 | #define TEENSY_PIN22_IOPORT IOPORT3 | ||
182 | #define TEENSY_PIN23_IOPORT IOPORT3 | ||
183 | |||
184 | #define TEENSY_PIN2 0 | ||
185 | #define TEENSY_PIN14 1 | ||
186 | #define TEENSY_PIN7 2 | ||
187 | #define TEENSY_PIN8 3 | ||
188 | #define TEENSY_PIN6 4 | ||
189 | #define TEENSY_PIN20 5 | ||
190 | #define TEENSY_PIN21 6 | ||
191 | #define TEENSY_PIN5 7 | ||
192 | #define TEENSY_PIN47 8 | ||
193 | #define TEENSY_PIN48 9 | ||
194 | #define PORTD_PIN10 10 | ||
195 | #define TEENSY_PIN55 11 | ||
196 | #define TEENSY_PIN53 12 | ||
197 | #define TEENSY_PIN52 13 | ||
198 | #define TEENSY_PIN51 14 | ||
199 | #define TEENSY_PIN54 15 | ||
200 | #define PORTD_PIN16 16 | ||
201 | #define PORTD_PIN17 17 | ||
202 | #define PORTD_PIN18 18 | ||
203 | #define PORTD_PIN19 19 | ||
204 | #define PORTD_PIN20 20 | ||
205 | #define PORTD_PIN21 21 | ||
206 | #define PORTD_PIN22 22 | ||
207 | #define PORTD_PIN23 23 | ||
208 | #define PORTD_PIN24 24 | ||
209 | #define PORTD_PIN25 25 | ||
210 | #define PORTD_PIN26 26 | ||
211 | #define PORTD_PIN27 27 | ||
212 | #define PORTD_PIN28 28 | ||
213 | #define PORTD_PIN29 29 | ||
214 | #define PORTD_PIN30 30 | ||
215 | #define PORTD_PIN31 31 | ||
216 | |||
217 | #define TEENSY_PIN51_IOPORT IOPORT4 | ||
218 | #define TEENSY_PIN52_IOPORT IOPORT4 | ||
219 | #define TEENSY_PIN53_IOPORT IOPORT4 | ||
220 | #define TEENSY_PIN54_IOPORT IOPORT4 | ||
221 | #define TEENSY_PIN55_IOPORT IOPORT4 | ||
222 | #define TEENSY_PIN47_IOPORT IOPORT4 | ||
223 | #define TEENSY_PIN48_IOPORT IOPORT4 | ||
224 | #define TEENSY_PIN2_IOPORT IOPORT4 | ||
225 | #define TEENSY_PIN5_IOPORT IOPORT4 | ||
226 | #define TEENSY_PIN6_IOPORT IOPORT4 | ||
227 | #define TEENSY_PIN7_IOPORT IOPORT4 | ||
228 | #define TEENSY_PIN8_IOPORT IOPORT4 | ||
229 | #define TEENSY_PIN14_IOPORT IOPORT4 | ||
230 | #define TEENSY_PIN20_IOPORT IOPORT4 | ||
231 | #define TEENSY_PIN21_IOPORT IOPORT4 | ||
232 | |||
233 | #define PORTE_PIN0 0 | ||
234 | #define PORTE_PIN1 1 | ||
235 | #define PORTE_PIN2 2 | ||
236 | #define PORTE_PIN3 3 | ||
237 | #define PORTE_PIN4 4 | ||
238 | #define PORTE_PIN5 5 | ||
239 | #define PORTE_PIN6 6 | ||
240 | #define PORTE_PIN7 7 | ||
241 | #define PORTE_PIN8 8 | ||
242 | #define PORTE_PIN9 9 | ||
243 | #define TEENSY_PIN56 10 | ||
244 | #define TEENSY_PIN57 11 | ||
245 | #define PORTE_PIN12 12 | ||
246 | #define PORTE_PIN13 13 | ||
247 | #define PORTE_PIN14 14 | ||
248 | #define PORTE_PIN15 15 | ||
249 | #define PORTE_PIN16 16 | ||
250 | #define PORTE_PIN17 17 | ||
251 | #define PORTE_PIN18 18 | ||
252 | #define PORTE_PIN19 19 | ||
253 | #define PORTE_PIN20 20 | ||
254 | #define PORTE_PIN21 21 | ||
255 | #define PORTE_PIN22 22 | ||
256 | #define PORTE_PIN23 23 | ||
257 | #define TEENSY_PIN33 24 | ||
258 | #define TEENSY_PIN34 25 | ||
259 | #define TEENSY_PIN24 26 | ||
260 | #define PORTE_PIN27 27 | ||
261 | #define PORTE_PIN28 28 | ||
262 | #define PORTE_PIN29 29 | ||
263 | #define PORTE_PIN30 30 | ||
264 | #define PORTE_PIN31 31 | ||
265 | |||
266 | #define TEENSY_PIN56_IOPORT IOPORT5 | ||
267 | #define TEENSY_PIN57_IOPORT IOPORT5 | ||
268 | #define TEENSY_PIN24_IOPORT IOPORT5 | ||
269 | #define TEENSY_PIN33_IOPORT IOPORT5 | ||
270 | #define TEENSY_PIN34_IOPORT IOPORT5 | ||
271 | |||
272 | |||
273 | #define LINE_PIN0 PAL_LINE(TEENSY_PIN0_IOPORT, TEENSY_PIN0) | ||
274 | #define LINE_PIN1 PAL_LINE(TEENSY_PIN1_IOPORT, TEENSY_PIN1) | ||
275 | #define LINE_PIN2 PAL_LINE(TEENSY_PIN2_IOPORT, TEENSY_PIN2) | ||
276 | #define LINE_PIN3 PAL_LINE(TEENSY_PIN3_IOPORT, TEENSY_PIN3) | ||
277 | #define LINE_PIN4 PAL_LINE(TEENSY_PIN4_IOPORT, TEENSY_PIN4) | ||
278 | #define LINE_PIN5 PAL_LINE(TEENSY_PIN5_IOPORT, TEENSY_PIN5) | ||
279 | #define LINE_PIN6 PAL_LINE(TEENSY_PIN6_IOPORT, TEENSY_PIN6) | ||
280 | #define LINE_PIN7 PAL_LINE(TEENSY_PIN7_IOPORT, TEENSY_PIN7) | ||
281 | #define LINE_PIN8 PAL_LINE(TEENSY_PIN8_IOPORT, TEENSY_PIN8) | ||
282 | #define LINE_PIN9 PAL_LINE(TEENSY_PIN9_IOPORT, TEENSY_PIN9) | ||
283 | #define LINE_PIN10 PAL_LINE(TEENSY_PIN10_IOPORT, TEENSY_PIN10) | ||
284 | #define LINE_PIN11 PAL_LINE(TEENSY_PIN11_IOPORT, TEENSY_PIN11) | ||
285 | #define LINE_PIN12 PAL_LINE(TEENSY_PIN12_IOPORT, TEENSY_PIN12) | ||
286 | #define LINE_PIN13 PAL_LINE(TEENSY_PIN13_IOPORT, TEENSY_PIN13) | ||
287 | #define LINE_PIN14 PAL_LINE(TEENSY_PIN14_IOPORT, TEENSY_PIN14) | ||
288 | #define LINE_PIN15 PAL_LINE(TEENSY_PIN15_IOPORT, TEENSY_PIN15) | ||
289 | #define LINE_PIN16 PAL_LINE(TEENSY_PIN16_IOPORT, TEENSY_PIN16) | ||
290 | #define LINE_PIN17 PAL_LINE(TEENSY_PIN17_IOPORT, TEENSY_PIN17) | ||
291 | #define LINE_PIN18 PAL_LINE(TEENSY_PIN18_IOPORT, TEENSY_PIN18) | ||
292 | #define LINE_PIN19 PAL_LINE(TEENSY_PIN19_IOPORT, TEENSY_PIN19) | ||
293 | #define LINE_PIN20 PAL_LINE(TEENSY_PIN20_IOPORT, TEENSY_PIN20) | ||
294 | #define LINE_PIN21 PAL_LINE(TEENSY_PIN21_IOPORT, TEENSY_PIN21) | ||
295 | #define LINE_PIN22 PAL_LINE(TEENSY_PIN22_IOPORT, TEENSY_PIN22) | ||
296 | #define LINE_PIN23 PAL_LINE(TEENSY_PIN23_IOPORT, TEENSY_PIN23) | ||
297 | #define LINE_PIN24 PAL_LINE(TEENSY_PIN24_IOPORT, TEENSY_PIN24) | ||
298 | #define LINE_PIN25 PAL_LINE(TEENSY_PIN25_IOPORT, TEENSY_PIN25) | ||
299 | #define LINE_PIN25 PAL_LINE(TEENSY_PIN25_IOPORT, TEENSY_PIN25) | ||
300 | #define LINE_PIN26 PAL_LINE(TEENSY_PIN26_IOPORT, TEENSY_PIN26) | ||
301 | #define LINE_PIN27 PAL_LINE(TEENSY_PIN27_IOPORT, TEENSY_PIN27) | ||
302 | #define LINE_PIN28 PAL_LINE(TEENSY_PIN28_IOPORT, TEENSY_PIN28) | ||
303 | #define LINE_PIN29 PAL_LINE(TEENSY_PIN29_IOPORT, TEENSY_PIN29) | ||
304 | #define LINE_PIN30 PAL_LINE(TEENSY_PIN30_IOPORT, TEENSY_PIN30) | ||
305 | #define LINE_PIN31 PAL_LINE(TEENSY_PIN31_IOPORT, TEENSY_PIN31) | ||
306 | #define LINE_PIN32 PAL_LINE(TEENSY_PIN32_IOPORT, TEENSY_PIN32) | ||
307 | #define LINE_PIN33 PAL_LINE(TEENSY_PIN33_IOPORT, TEENSY_PIN33) | ||
308 | #define LINE_PIN34 PAL_LINE(TEENSY_PIN34_IOPORT, TEENSY_PIN34) | ||
309 | #define LINE_PIN35 PAL_LINE(TEENSY_PIN35_IOPORT, TEENSY_PIN35) | ||
310 | #define LINE_PIN36 PAL_LINE(TEENSY_PIN36_IOPORT, TEENSY_PIN36) | ||
311 | #define LINE_PIN37 PAL_LINE(TEENSY_PIN37_IOPORT, TEENSY_PIN37) | ||
312 | #define LINE_PIN38 PAL_LINE(TEENSY_PIN38_IOPORT, TEENSY_PIN38) | ||
313 | #define LINE_PIN39 PAL_LINE(TEENSY_PIN39_IOPORT, TEENSY_PIN39) | ||
314 | #define LINE_PIN40 PAL_LINE(TEENSY_PIN40_IOPORT, TEENSY_PIN40) | ||
315 | #define LINE_PIN41 PAL_LINE(TEENSY_PIN41_IOPORT, TEENSY_PIN41) | ||
316 | #define LINE_PIN42 PAL_LINE(TEENSY_PIN42_IOPORT, TEENSY_PIN42) | ||
317 | #define LINE_PIN43 PAL_LINE(TEENSY_PIN43_IOPORT, TEENSY_PIN43) | ||
318 | #define LINE_PIN44 PAL_LINE(TEENSY_PIN44_IOPORT, TEENSY_PIN44) | ||
319 | #define LINE_PIN45 PAL_LINE(TEENSY_PIN45_IOPORT, TEENSY_PIN45) | ||
320 | #define LINE_PIN46 PAL_LINE(TEENSY_PIN46_IOPORT, TEENSY_PIN46) | ||
321 | #define LINE_PIN47 PAL_LINE(TEENSY_PIN47_IOPORT, TEENSY_PIN47) | ||
322 | #define LINE_PIN48 PAL_LINE(TEENSY_PIN48_IOPORT, TEENSY_PIN48) | ||
323 | #define LINE_PIN49 PAL_LINE(TEENSY_PIN49_IOPORT, TEENSY_PIN49) | ||
324 | #define LINE_PIN50 PAL_LINE(TEENSY_PIN50_IOPORT, TEENSY_PIN50) | ||
325 | #define LINE_PIN51 PAL_LINE(TEENSY_PIN51_IOPORT, TEENSY_PIN50) | ||
326 | #define LINE_PIN52 PAL_LINE(TEENSY_PIN52_IOPORT, TEENSY_PIN52) | ||
327 | #define LINE_PIN53 PAL_LINE(TEENSY_PIN53_IOPORT, TEENSY_PIN53) | ||
328 | #define LINE_PIN54 PAL_LINE(TEENSY_PIN54_IOPORT, TEENSY_PIN54) | ||
329 | #define LINE_PIN55 PAL_LINE(TEENSY_PIN55_IOPORT, TEENSY_PIN55) | ||
330 | #define LINE_PIN56 PAL_LINE(TEENSY_PIN56_IOPORT, TEENSY_PIN56) | ||
331 | #define LINE_PIN57 PAL_LINE(TEENSY_PIN57_IOPORT, TEENSY_PIN57) | ||
332 | |||
333 | #define LINE_LED LINE_PIN13 | ||
334 | |||
335 | #if !defined(_FROM_ASM_) | ||
336 | #ifdef __cplusplus | ||
337 | extern "C" { | ||
338 | #endif | ||
339 | void boardInit(void); | ||
340 | #ifdef __cplusplus | ||
341 | } | ||
342 | #endif | ||
343 | #endif /* _FROM_ASM_ */ | ||
344 | |||
345 | #endif /* _BOARD_H_ */ | ||
diff --git a/lib/chibios-contrib/os/hal/boards/PJRC_TEENSY_3_6/board.mk b/lib/chibios-contrib/os/hal/boards/PJRC_TEENSY_3_6/board.mk new file mode 100644 index 000000000..ba25c8560 --- /dev/null +++ b/lib/chibios-contrib/os/hal/boards/PJRC_TEENSY_3_6/board.mk | |||
@@ -0,0 +1,9 @@ | |||
1 | # List of all the board related files. | ||
2 | BOARDSRC = ${CHIBIOS_CONTRIB}/os/hal/boards/PJRC_TEENSY_3_6/board.c | ||
3 | |||
4 | # Required include directories | ||
5 | BOARDINC = ${CHIBIOS_CONTRIB}/os/hal/boards/PJRC_TEENSY_3_6 | ||
6 | |||
7 | # Shared variables | ||
8 | ALLCSRC += $(BOARDSRC) | ||
9 | ALLINC += $(BOARDINC) | ||