]> git.gir.st - tmk_keyboard.git/blob - tool/mbed/mbed-sdk/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC81X/TARGET_LPC812/PinNames.h
Squashed 'tmk_core/' changes from 7967731..b9e0ea0
[tmk_keyboard.git] / tool / mbed / mbed-sdk / libraries / mbed / targets / hal / TARGET_NXP / TARGET_LPC81X / TARGET_LPC812 / 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 P0_6 = 6,
38 P0_7 = 7,
39 P0_8 = 8,
40 P0_9 = 9,
41 P0_10 = 10,
42 P0_11 = 11,
43 P0_12 = 12,
44 P0_13 = 13,
45 P0_14 = 14,
46 P0_15 = 15,
47 P0_16 = 16,
48 P0_17 = 17,
49
50 D0 = P0_0,
51 D1 = P0_4,
52 D2 = P0_6,
53 D3 = P0_8,
54 D4 = P0_9,
55
56 D7 = P0_7,
57 D8 = P0_17,
58 D9 = P0_16,
59 D10 = P0_13,
60 D11 = P0_14,
61 D12 = P0_15,
62 D13 = P0_12,
63 D14 = P0_10,
64 D15 = P0_11,
65
66 A4 = P0_10,
67 A5 = P0_11,
68
69 // LPC800-MAX board
70 LED_RED = P0_7,
71 LED_GREEN = P0_17,
72 LED_BLUE = P0_16,
73
74 // mbed original LED naming
75 LED1 = LED_BLUE,
76 LED2 = LED_GREEN,
77 LED3 = LED_RED,
78 LED4 = LED_RED,
79
80 // Serial to USB pins
81 USBTX = P0_6,
82 USBRX = P0_1,
83
84 // Not connected
85 NC = (int)0xFFFFFFFF,
86 } PinName;
87
88 typedef enum {
89 PullUp = 2,
90 PullDown = 1,
91 PullNone = 0,
92 Repeater = 3,
93 OpenDrain = 4,
94 PullDefault = PullDown
95 } PinMode;
96
97 #define STDIO_UART_TX USBTX
98 #define STDIO_UART_RX USBRX
99
100 typedef struct {
101 unsigned char n;
102 unsigned char offset;
103 } SWM_Map;
104
105 #ifdef __cplusplus
106 }
107 #endif
108
109 #endif
Imprint / Impressum