]> git.donarmstrong.com Git - qmk_firmware.git/blob - tool/mbed/mbed-sdk/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC13XX/PinNames.h
Squashed 'tmk_core/' changes from 7967731..b9e0ea0
[qmk_firmware.git] / tool / mbed / mbed-sdk / libraries / mbed / targets / hal / TARGET_NXP / TARGET_LPC13XX / 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 #define PORT_SHIFT  5
31
32 typedef enum {
33     // LPC1347 Pin Names
34     P0_0 = 0,
35     P0_1 = 1,
36     P0_2 = 2,
37     P0_3 = 3,
38     P0_4 = 4,
39     P0_5 = 5,
40     P0_6 = 6,
41     P0_7 = 7,
42     P0_8 = 8,
43     P0_9 = 9,
44     P0_10 = 10,
45     P0_11 = 11,
46     P0_12 = 12,
47     P0_13 = 13,
48     P0_14 = 14,
49     P0_15 = 15,
50     P0_16 = 16,
51     P0_17 = 17,
52     P0_18 = 18,
53     P0_19 = 19,
54     P0_20 = 20,
55     P0_21 = 21,
56     P0_22 = 22,
57     P0_23 = 23,
58
59     P1_13 = 45,
60     P1_14 = 46,
61     P1_15 = 47,
62     P1_16 = 48,
63
64     P1_19 = 51,
65     P1_20 = 52,
66     P1_21 = 53,
67     P1_22 = 54,
68     P1_23 = 55,
69     P1_24 = 56,
70     P1_25 = 57,
71     P1_26 = 58,
72     P1_27 = 59,
73     P1_28 = 60,
74     P1_29 = 61,
75
76     P1_31 = 63,
77
78     // DIP Pin Names
79     p1  = P0_0,
80     p2  = P0_11,
81     p3  = P0_12,
82     p4  = P0_13,
83     p5  = P0_14,
84     p6  = P1_31,
85     p8  = P0_16,
86     p9  = P0_22,
87     p10 = P0_23,
88     p13 = P1_29,
89     p14 = P1_21,
90     p15 = P0_8,
91     p16 = P0_9,
92     p17 = P1_24,
93     p18 = P0_4,
94     p19 = P1_13,
95     p20 = P1_14,
96     p21 = P1_22,
97     p22 = P0_17,
98     p23 = P0_5,
99     p24 = P0_21,
100     p25 = P0_19,
101     p26 = P0_18,
102     p27 = P1_15,
103     p28 = P1_16,
104     p29 = P1_25,
105     p30 = P1_19,
106     p33 = P0_20,
107     p34 = P0_2,
108     p35 = P1_26,
109     p36 = P1_27,
110     p37 = P1_20,
111     p38 = P1_23,
112     p39 = P0_7,
113     p40 = P1_28,
114
115     UART_TX = P0_19,
116     UART_RX = P0_18,
117
118     // Not connected
119     NC = (int)0xFFFFFFFF,
120
121     LED1 = p21,
122     LED2 = p21,
123     LED3 = p21,
124     LED4 = p21,
125
126     // Standard but not supported pins
127     USBTX = NC,
128     USBRX = NC,
129
130 } PinName;
131
132 typedef enum {
133     CHANNEL0 = PIN_INT0_IRQn,
134     CHANNEL1 = PIN_INT1_IRQn,
135     CHANNEL2 = PIN_INT2_IRQn,
136     CHANNEL3 = PIN_INT3_IRQn,
137     CHANNEL4 = PIN_INT4_IRQn,
138     CHANNEL5 = PIN_INT5_IRQn,
139     CHANNEL6 = PIN_INT6_IRQn,
140     CHANNEL7 = PIN_INT7_IRQn
141 } Channel;
142
143 typedef enum {
144     PullUp = 2,
145     PullDown = 1,
146     PullNone = 0,
147     Repeater = 3,
148     OpenDrain = 4,
149     PullDefault = PullDown
150 } PinMode;
151
152 #ifdef __cplusplus
153 }
154 #endif
155
156 #endif