]> git.donarmstrong.com Git - qmk_firmware.git/blob - tool/mbed/mbed-sdk/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11UXX/TARGET_OC_MBUINO/PinNames.h
Squashed 'tmk_core/' changes from 7967731..b9e0ea0
[qmk_firmware.git] / tool / mbed / mbed-sdk / libraries / mbed / targets / hal / TARGET_NXP / TARGET_LPC11UXX / TARGET_OC_MBUINO / 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     // LPC11U24 HVQFN33 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_15 = 47,
60     P1_19 = 51,
61
62     // Other mbed Pin Names
63     LED1 = P0_7,
64     LED2 = P0_8,
65     LED3 = P0_2,
66     LED4 = P0_20,
67     LED5 = P1_19,
68     LED6 = P0_17,
69     LED7 = P0_23,
70
71     USBTX = P0_19,
72     USBRX = P0_18,
73
74     I2C_SCL = P0_4,
75     I2C_SDA = P0_5,
76
77     // Not connected
78     NC = (int)0xFFFFFFFF,
79 } PinName;
80
81 typedef enum {
82     CHANNEL0 = FLEX_INT0_IRQn,
83     CHANNEL1 = FLEX_INT1_IRQn,
84     CHANNEL2 = FLEX_INT2_IRQn,
85     CHANNEL3 = FLEX_INT3_IRQn,
86     CHANNEL4 = FLEX_INT4_IRQn,
87     CHANNEL5 = FLEX_INT5_IRQn,
88     CHANNEL6 = FLEX_INT6_IRQn,
89     CHANNEL7 = FLEX_INT7_IRQn
90 } Channel;
91
92 typedef enum {
93     PullUp = 2,
94     PullDown = 1,
95     PullNone = 0,
96     Repeater = 3,
97     OpenDrain = 4,
98     PullDefault = PullDown
99 } PinMode;
100
101 #ifdef __cplusplus
102 }
103 #endif
104
105 #endif