]> git.gir.st - tmk_keyboard.git/blob - tool/mbed/mbed-sdk/libraries/mbed/targets/hal/TARGET_Freescale/TARGET_KLXX/TARGET_KL05Z/PinNames.h
Squashed 'tmk_core/' changes from 7967731..b9e0ea0
[tmk_keyboard.git] / tool / mbed / mbed-sdk / libraries / mbed / targets / hal / TARGET_Freescale / TARGET_KLXX / TARGET_KL05Z / PinNames.h
1 /* mbed Microcontroller Library
2 * Copyright (c) 2006-2013 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 PTB0 = 0x1000,
55 PTB1 = 0x1004,
56 PTB2 = 0x1008,
57 PTB3 = 0x100c,
58 PTB4 = 0x1010,
59 PTB5 = 0x1014,
60 PTB6 = 0x1018,
61 PTB7 = 0x101c,
62 PTB8 = 0x1020,
63 PTB9 = 0x1024,
64 PTB10 = 0x1028,
65 PTB11 = 0x102c,
66 PTB12 = 0x1030,
67 PTB13 = 0x1034,
68 PTB14 = 0x1038,
69 PTB15 = 0x103c,
70 PTB16 = 0x1040,
71 PTB17 = 0x1044,
72 PTB18 = 0x1048,
73 PTB19 = 0x104c,
74 PTB20 = 0x1050,
75
76 LED_RED = PTB8,
77 LED_GREEN = PTB9,
78 LED_BLUE = PTB10,
79
80 // mbed original LED naming
81 LED1 = LED_RED,
82 LED2 = LED_GREEN,
83 LED3 = LED_BLUE,
84 LED4 = LED_BLUE,
85
86 // USB Pins
87 USBTX = PTB1,
88 USBRX = PTB2,
89
90 // Arduino Headers
91 D0 = PTB2,
92 D1 = PTB1,
93 D2 = PTA11,
94 D3 = PTB5,
95 D4 = PTA10,
96 D5 = PTA12,
97 D6 = PTB6,
98 D7 = PTB7,
99 D8 = PTB10,
100 D9 = PTB11,
101 D10 = PTA5,
102 D11 = PTA7,
103 D12 = PTA6,
104 D13 = PTB0,
105 D14 = PTB4,
106 D15 = PTB3,
107
108 A0 = PTB8,
109 A1 = PTB9,
110 A2 = PTA8,
111 A3 = PTA0,
112 A4 = PTA9,
113 A5 = PTB13,
114
115 I2C_SCL = D15,
116 I2C_SDA = D14,
117
118 TSI_ELEC0 = PTA13,
119 TSI_ELEC1 = PTB12,
120
121 // Not connected
122 NC = (int)0xFFFFFFFF
123 } PinName;
124
125 /* PullDown not available for KL05 */
126 typedef enum {
127 PullNone = 0,
128 PullUp = 2,
129 PullDefault = PullUp
130 } PinMode;
131
132 #ifdef __cplusplus
133 }
134 #endif
135
136 #endif
Imprint / Impressum