]> git.gir.st - tmk_keyboard.git/blob - tmk_core/tool/mbed/mbed-sdk/libraries/mbed/targets/hal/TARGET_Freescale/TARGET_K20XX/TARGET_TEENSY3_1/PinNames.h
Merge commit '1fe4406f374291ab2e86e95a97341fd9c475fcb8'
[tmk_keyboard.git] / tmk_core / tool / mbed / mbed-sdk / libraries / mbed / targets / hal / TARGET_Freescale / TARGET_K20XX / TARGET_TEENSY3_1 / PinNames.h
1 /* mbed Microcontroller Library
2 * Copyright (c) 2006-2015 ARM Limited
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 #ifndef MBED_PINNAMES_H
17 #define MBED_PINNAMES_H
18
19 #include "cmsis.h"
20
21 #ifdef __cplusplus
22 extern "C" {
23 #endif
24
25 typedef enum {
26 PIN_INPUT,
27 PIN_OUTPUT
28 } PinDirection;
29
30 /* PCR - 0x1000 */
31 #define PORT_SHIFT 12
32
33 typedef enum {
34 PTA0 = 0x0,
35 PTA1 = 0x4,
36 PTA2 = 0x8,
37 PTA3 = 0xc,
38 PTA4 = 0x10,
39 PTA5 = 0x14,
40 PTA6 = 0x18,
41 PTA7 = 0x1c,
42 PTA8 = 0x20,
43 PTA9 = 0x24,
44 PTA10 = 0x28,
45 PTA11 = 0x2c,
46 PTA12 = 0x30,
47 PTA13 = 0x34,
48 PTA14 = 0x38,
49 PTA15 = 0x3c,
50 PTA16 = 0x40,
51 PTA17 = 0x44,
52 PTA18 = 0x48,
53 PTA19 = 0x4c,
54 PTA20 = 0x50,
55 PTA21 = 0x54,
56 PTA22 = 0x58,
57 PTA23 = 0x5c,
58 PTA24 = 0x60,
59 PTA25 = 0x64,
60 PTA26 = 0x68,
61 PTA27 = 0x6c,
62 PTA28 = 0x70,
63 PTA29 = 0x74,
64 PTA30 = 0x78,
65 PTA31 = 0x7c,
66 PTB0 = 0x1000,
67 PTB1 = 0x1004,
68 PTB2 = 0x1008,
69 PTB3 = 0x100c,
70 PTB4 = 0x1010,
71 PTB5 = 0x1014,
72 PTB6 = 0x1018,
73 PTB7 = 0x101c,
74 PTB8 = 0x1020,
75 PTB9 = 0x1024,
76 PTB10 = 0x1028,
77 PTB11 = 0x102c,
78 PTB12 = 0x1030,
79 PTB13 = 0x1034,
80 PTB14 = 0x1038,
81 PTB15 = 0x103c,
82 PTB16 = 0x1040,
83 PTB17 = 0x1044,
84 PTB18 = 0x1048,
85 PTB19 = 0x104c,
86 PTB20 = 0x1050,
87 PTB21 = 0x1054,
88 PTB22 = 0x1058,
89 PTB23 = 0x105c,
90 PTB24 = 0x1060,
91 PTB25 = 0x1064,
92 PTB26 = 0x1068,
93 PTB27 = 0x106c,
94 PTB28 = 0x1070,
95 PTB29 = 0x1074,
96 PTB30 = 0x1078,
97 PTB31 = 0x107c,
98 PTC0 = 0x2000,
99 PTC1 = 0x2004,
100 PTC2 = 0x2008,
101 PTC3 = 0x200c,
102 PTC4 = 0x2010,
103 PTC5 = 0x2014,
104 PTC6 = 0x2018,
105 PTC7 = 0x201c,
106 PTC8 = 0x2020,
107 PTC9 = 0x2024,
108 PTC10 = 0x2028,
109 PTC11 = 0x202c,
110 PTC12 = 0x2030,
111 PTC13 = 0x2034,
112 PTC14 = 0x2038,
113 PTC15 = 0x203c,
114 PTC16 = 0x2040,
115 PTC17 = 0x2044,
116 PTC18 = 0x2048,
117 PTC19 = 0x204c,
118 PTC20 = 0x2050,
119 PTC21 = 0x2054,
120 PTC22 = 0x2058,
121 PTC23 = 0x205c,
122 PTC24 = 0x2060,
123 PTC25 = 0x2064,
124 PTC26 = 0x2068,
125 PTC27 = 0x206c,
126 PTC28 = 0x2070,
127 PTC29 = 0x2074,
128 PTC30 = 0x2078,
129 PTC31 = 0x207c,
130 PTD0 = 0x3000,
131 PTD1 = 0x3004,
132 PTD2 = 0x3008,
133 PTD3 = 0x300c,
134 PTD4 = 0x3010,
135 PTD5 = 0x3014,
136 PTD6 = 0x3018,
137 PTD7 = 0x301c,
138 PTD8 = 0x3020,
139 PTD9 = 0x3024,
140 PTD10 = 0x3028,
141 PTD11 = 0x302c,
142 PTD12 = 0x3030,
143 PTD13 = 0x3034,
144 PTD14 = 0x3038,
145 PTD15 = 0x303c,
146 PTD16 = 0x3040,
147 PTD17 = 0x3044,
148 PTD18 = 0x3048,
149 PTD19 = 0x304c,
150 PTD20 = 0x3050,
151 PTD21 = 0x3054,
152 PTD22 = 0x3058,
153 PTD23 = 0x305c,
154 PTD24 = 0x3060,
155 PTD25 = 0x3064,
156 PTD26 = 0x3068,
157 PTD27 = 0x306c,
158 PTD28 = 0x3070,
159 PTD29 = 0x3074,
160 PTD30 = 0x3078,
161 PTD31 = 0x307c,
162 PTE0 = 0x4000,
163 PTE1 = 0x4004,
164 PTE2 = 0x4008,
165 PTE3 = 0x400c,
166 PTE4 = 0x4010,
167 PTE5 = 0x4014,
168 PTE6 = 0x4018,
169 PTE7 = 0x401c,
170 PTE8 = 0x4020,
171 PTE9 = 0x4024,
172 PTE10 = 0x4028,
173 PTE11 = 0x402c,
174 PTE12 = 0x4030,
175 PTE13 = 0x4034,
176 PTE14 = 0x4038,
177 PTE15 = 0x403c,
178 PTE16 = 0x4040,
179 PTE17 = 0x4044,
180 PTE18 = 0x4048,
181 PTE19 = 0x404c,
182 PTE20 = 0x4050,
183 PTE21 = 0x4054,
184 PTE22 = 0x4058,
185 PTE23 = 0x405c,
186 PTE24 = 0x4060,
187 PTE25 = 0x4064,
188 PTE26 = 0x4068,
189 PTE27 = 0x406c,
190 PTE28 = 0x4070,
191 PTE29 = 0x4074,
192 PTE30 = 0x4078,
193 PTE31 = 0x407c,
194
195 LED_RED = PTC5, // set these to the only led on board
196 LED_GREEN = PTC5, //
197 LED_BLUE = PTC5, //
198
199 // mbed original LED naming
200 LED1 = LED_RED,
201 LED2 = LED_GREEN,
202 LED3 = LED_BLUE,
203 LED4 = LED_BLUE,
204
205 // USB Pins
206 USBTX = PTB17,
207 USBRX = PTB16,
208
209 // DAC Pins
210 DAC0_OUT = 0xFEFE, /* DAC does not have Pin Name in RM */
211
212 // Teensy3.1 Headers
213 D0 = PTB16,
214 D1 = PTB17,
215 D2 = PTD0,
216 D3 = PTA12,
217 D4 = PTA13,
218 D5 = PTD7,
219 D6 = PTD4,
220 D7 = PTD2,
221 D8 = PTD3,
222 D9 = PTC3,
223 D10 = PTC4,
224 D11 = PTC6,
225 D12 = PTC7,
226 D13 = PTC5,
227 D14 = PTD1,
228 D15 = PTC0,
229 D16 = PTB0,
230 D17 = PTB1,
231 D18 = PTB3,
232 D19 = PTB2,
233 D20 = PTD5,
234 D21 = PTD6,
235 D22 = PTC1,
236 D23 = PTC2,
237 D24 = PTA5,
238 D25 = PTB19,
239 D26 = PTE1,
240 D27 = PTC9,
241 D28 = PTC8,
242 D29 = PTC10,
243 D30 = PTC11,
244 D31 = PTE0,
245 D32 = PTB18,
246 D33 = PTA4,
247
248 A0 = PTD1,
249 A1 = PTC0,
250 A2 = PTB0,
251 A3 = PTB1,
252 A4 = PTB3,
253 A5 = PTB2,
254 A6 = PTD5,
255 A7 = PTD6,
256 A8 = PTC1,
257 A9 = PTC2,
258 A15 = PTE1,
259 A16 = PTC9,
260 A17 = PTC8,
261 A18 = PTC10,
262 A19 = PTC11,
263 A20 = PTE0,
264
265 I2C_SCL = PTB3,
266 I2C_SDA = PTB2,
267
268 SPI_SCK = PTC5, // sclk
269 SPI_DOUT = PTC6, // mosi
270 SPI_DIN = PTC7, // miso
271 SPI_CS = PTC4, // ssel
272
273 SERIAL_TX = PTB17,
274 SERIAL_RX = PTB16,
275
276 PWM = PTA12,
277 PWM1 = PTA13,
278 PWM2 = PTD7,
279 PWM3 = PTD4,
280 PWM4 = PTC3,
281 PWM5 = PTC4,
282 PWM6 = PTD5,
283 PWM7 = PTD6,
284 PWM8 = PTC1,
285 PWM9 = PTC2,
286 PWM10 = PTB19,
287 PWM11 = PTB18,
288
289 DAC = DAC0_OUT,
290
291 TSI_ELEC0 = PTC1,
292 TSI_ELEC1 = PTC2,
293
294 // Not connected
295 NC = (int)0xFFFFFFFF
296 } PinName;
297
298
299 typedef enum {
300 PullNone = 0,
301 PullDown = 2,
302 PullUp = 3,
303 PullDefault = PullUp
304 } PinMode;
305
306 #ifdef __cplusplus
307 }
308 #endif
309
310 #endif
Imprint / Impressum