]> git.donarmstrong.com Git - qmk_firmware.git/blob - tool/mbed/mbed-sdk/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC15XX/PinNames.h
Squashed 'tmk_core/' changes from 7967731..b9e0ea0
[qmk_firmware.git] / tool / mbed / mbed-sdk / libraries / mbed / targets / hal / TARGET_NXP / TARGET_LPC15XX / PinNames.h
1 /* mbed Microcontroller Library
2  * Copyright (c) 2006-2014 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 typedef enum {
31     // LPC Pin Names
32     P0_0 = 0,
33     P0_1, P0_2, P0_3, P0_4, P0_5, P0_6, P0_7, P0_8, P0_9, P0_10, P0_11, P0_12, P0_13, P0_14, P0_15, P0_16, P0_17, P0_18, P0_19, P0_20, P0_21, P0_22, P0_23, P0_24, P0_25, P0_26, P0_27, P0_28, P0_29, P0_30, P0_31,
34     P1_0, P1_1, P1_2, P1_3, P1_4, P1_5, P1_6, P1_7, P1_8, P1_9, P1_10, P1_11, P1_12, P1_13, P1_14, P1_15, P1_16, P1_17, P1_18, P1_19, P1_20, P1_21, P1_22, P1_23, P1_24, P1_25, P1_26, P1_27, P1_28, P1_29, P1_30, P1_31,
35     P2_0, P2_1, P2_2, P2_3, P2_4, P2_5, P2_6, P2_7, P2_8, P2_9, P2_10, P2_11, P2_12,
36     
37     LED_RED = P0_25,
38     LED_GREEN = P0_3,
39     LED_BLUE = P1_1,
40     
41     // mbed original LED naming
42     LED1 = LED_RED,
43     LED2 = LED_GREEN,
44     LED3 = LED_BLUE,
45     LED4 = LED_BLUE,
46     
47     // Serial to USB pins
48     USBTX = P0_18,
49     USBRX = P0_13,
50     
51     // Arduino Shield Receptacles Names
52     D0 = P0_13,
53     D1 = P0_18,
54     D2 = P0_29,
55     D3 = P0_9,
56     D4 = P0_10,
57     D5 = P0_16, // same port as D13
58     D6 = P1_3,
59     D7 = P0_0,
60     D8 = P0_24,
61     D9 = P1_0,
62     D10= P0_27,
63     D11= P0_28,
64     D12= P0_12,
65     D13= P0_16, // same port as D5
66     D14= P0_23,
67     D15= P0_22,
68
69     A0 = P0_8,
70     A1 = P0_7,
71     A2 = P0_6,
72     A3 = P0_5,
73     A4 = P0_23, // same port as SDA
74     A5 = P0_22, // same port as SCL
75     SDA= P0_23, // same port as A4
76     SCL= P0_22, // same port as A5
77     
78     // Not connected
79     NC = (int)0xFFFFFFFF,
80 } PinName;
81
82 typedef enum {
83     PullUp = 2,
84     PullDown = 1,
85     PullNone = 0,
86     Repeater = 3,
87     OpenDrain = 4,
88     PullDefault = PullDown
89 } PinMode;
90
91 #define STDIO_UART_TX     USBTX
92 #define STDIO_UART_RX     USBRX
93
94 typedef struct {
95     unsigned char n;
96     unsigned char offset;
97 } SWM_Map;
98
99 #ifdef __cplusplus
100 }
101 #endif
102
103 #endif