]> git.donarmstrong.com Git - qmk_firmware.git/blob - tmk_core/tool/mbed/mbed-sdk/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11UXX/TARGET_APPNEARME_MICRONFCBOARD/PinNames.h
Merge commit '1fe4406f374291ab2e86e95a97341fd9c475fcb8'
[qmk_firmware.git] / tmk_core / tool / mbed / mbed-sdk / libraries / mbed / targets / hal / TARGET_NXP / TARGET_LPC11UXX / TARGET_APPNEARME_MICRONFCBOARD / 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 #define PORT_SHIFT  5
31
32 typedef enum {
33     // LPC11U 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     P0_24 = 24,
59     P0_25 = 25,
60     P0_26 = 26,
61     P0_27 = 27,
62
63     P1_0 = 32,
64     P1_1 = 33,
65     P1_2 = 34,
66     P1_3 = 35,
67     P1_4 = 36,
68     P1_5 = 37,
69     P1_6 = 38,
70     P1_7 = 39,
71     P1_8 = 40,
72     P1_9 = 41,
73     P1_10 = 42,
74     P1_11 = 43,
75     P1_12 = 44,
76     P1_13 = 45,
77     P1_14 = 46,
78     P1_15 = 47,
79     P1_16 = 48,
80     P1_17 = 49,
81     P1_18 = 50,
82     P1_19 = 51,
83     P1_20 = 52,
84     P1_21 = 53,
85     P1_22 = 54,
86     P1_23 = 55,
87     P1_24 = 56,
88     P1_25 = 57,
89     P1_26 = 58,
90     P1_27 = 59,
91     P1_28 = 60,
92     P1_29 = 61,
93
94     P1_31 = 63,
95     
96     // MicroNFCBoard pin names
97     M_RST = P0_0,
98     M_BOOT = P0_1,
99     M_RXD = P0_18,
100     M_TXD = P0_19,
101     M_SCL = P0_4,
102     M_SDA = P0_5,
103     M_D0 = P0_20,
104     
105     M_A0 = P0_16,
106     M_A1 = P0_15,
107     M_A2 = P0_14,
108     M_A3 = P0_13,
109     M_SCK = P0_10,
110     M_MOSI = P0_9,
111     M_MISO = P0_8,
112     M_NCS = P0_2,
113     M_IRQ = P0_7,
114
115     // MicroNFCBoard pin numbers
116     p4 = M_RST,
117     p5 = M_BOOT,
118     p6 = M_RXD,
119     p7 = M_TXD,
120     p8 = M_SCL,
121     p9 = M_SDA,
122     p10 = M_D0,
123     
124     p11 = M_IRQ,
125     p12 = M_NCS,
126     p13 = M_MISO,
127     p14 = M_MOSI,
128     p15 = M_SCK,
129     p16 = M_A3,
130     p17 = M_A2,
131     p18 = M_A1,
132     p19 = M_A0,
133     
134     // Other Pin Names
135     LED1 = P0_11,
136     LED2 = P0_12,
137     
138     // Alias to have correct blue lights of death pattern
139     LED3 = LED2,
140     LED4 = LED1,
141
142     UART_TX = M_TXD,
143     UART_RX = M_RXD,
144
145     // Not connected
146     NC = (int)0xFFFFFFFF,
147
148     // Standard but not supported pins
149     USBTX = NC,
150     USBRX = NC,
151
152 } PinName;
153
154 typedef enum {
155     CHANNEL0 = FLEX_INT0_IRQn,
156     CHANNEL1 = FLEX_INT1_IRQn,
157     CHANNEL2 = FLEX_INT2_IRQn,
158     CHANNEL3 = FLEX_INT3_IRQn,
159     CHANNEL4 = FLEX_INT4_IRQn,
160     CHANNEL5 = FLEX_INT5_IRQn,
161     CHANNEL6 = FLEX_INT6_IRQn,
162     CHANNEL7 = FLEX_INT7_IRQn
163 } Channel;
164
165 typedef enum {
166     PullUp = 2,
167     PullDown = 1,
168     PullNone = 0,
169     Repeater = 3,
170     OpenDrain = 4,
171     PullDefault = PullDown
172 } PinMode;
173
174 #ifdef __cplusplus
175 }
176 #endif
177
178 #endif