]> git.donarmstrong.com Git - qmk_firmware.git/blob - tool/mbed/mbed-sdk/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC81X/TARGET_LPC810/PinNames.h
Squashed 'tmk_core/' changes from 7967731..b9e0ea0
[qmk_firmware.git] / tool / mbed / mbed-sdk / libraries / mbed / targets / hal / TARGET_NXP / TARGET_LPC81X / TARGET_LPC810 / 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 typedef enum {
31     P0_0 = 0,
32     P0_1 = 1,
33     P0_2 = 2,
34     P0_3 = 3,
35     P0_4 = 4,
36     P0_5 = 5,
37     
38     dp1 = P0_5,
39     dp2 = P0_4,
40     dp3 = P0_3,
41     dp4 = P0_2,
42     dp5 = P0_1,
43     dp8 = P0_0,
44     
45     // mbed original LED naming
46     LED1 = P0_2,
47     LED2 = P0_2,
48     LED3 = P0_2,
49     LED4 = P0_2,
50     LED_RED = P0_2,
51     
52     // Serial to USB pins
53     USBTX = P0_4,
54     USBRX = P0_0,
55     
56     // Not connected
57     NC = (int)0xFFFFFFFF,
58 } PinName;
59
60 typedef enum {
61     PullUp = 2,
62     PullDown = 1,
63     PullNone = 0,
64     Repeater = 3,
65     OpenDrain = 4,
66     PullDefault = PullDown
67 } PinMode;
68
69 #define STDIO_UART_TX     USBTX
70 #define STDIO_UART_RX     USBRX
71
72 typedef struct {
73     unsigned char n;
74     unsigned char offset;
75 } SWM_Map;
76
77 #ifdef __cplusplus
78 }
79 #endif
80
81 #endif