mbed SDK library sources
Fork of mbed-src by
Development branch of the mbed library sources. This library is kept in synch with the latest changes from the mbed SDK and it is not guaranteed to work.
If you are looking for a stable and tested release, please import one of the official mbed library releases:
Import librarymbed
The official Mbed 2 C/C++ SDK provides the software platform and libraries to build your applications.
targets/hal/TARGET_NXP/TARGET_LPC11XX/PinNames.h@19:398f4c622e1b, 2013-08-19 (annotated)
- Committer:
- bogdanm
- Date:
- Mon Aug 19 18:17:02 2013 +0300
- Revision:
- 19:398f4c622e1b
Sync with official mbed library release 66
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
bogdanm | 19:398f4c622e1b | 1 | /* mbed Microcontroller Library |
bogdanm | 19:398f4c622e1b | 2 | * Copyright (c) 2006-2013 ARM Limited |
bogdanm | 19:398f4c622e1b | 3 | * |
bogdanm | 19:398f4c622e1b | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
bogdanm | 19:398f4c622e1b | 5 | * you may not use this file except in compliance with the License. |
bogdanm | 19:398f4c622e1b | 6 | * You may obtain a copy of the License at |
bogdanm | 19:398f4c622e1b | 7 | * |
bogdanm | 19:398f4c622e1b | 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
bogdanm | 19:398f4c622e1b | 9 | * |
bogdanm | 19:398f4c622e1b | 10 | * Unless required by applicable law or agreed to in writing, software |
bogdanm | 19:398f4c622e1b | 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
bogdanm | 19:398f4c622e1b | 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
bogdanm | 19:398f4c622e1b | 13 | * See the License for the specific language governing permissions and |
bogdanm | 19:398f4c622e1b | 14 | * limitations under the License. |
bogdanm | 19:398f4c622e1b | 15 | */ |
bogdanm | 19:398f4c622e1b | 16 | #ifndef MBED_PINNAMES_H |
bogdanm | 19:398f4c622e1b | 17 | #define MBED_PINNAMES_H |
bogdanm | 19:398f4c622e1b | 18 | |
bogdanm | 19:398f4c622e1b | 19 | #include "cmsis.h" |
bogdanm | 19:398f4c622e1b | 20 | |
bogdanm | 19:398f4c622e1b | 21 | #ifdef __cplusplus |
bogdanm | 19:398f4c622e1b | 22 | extern "C" { |
bogdanm | 19:398f4c622e1b | 23 | #endif |
bogdanm | 19:398f4c622e1b | 24 | |
bogdanm | 19:398f4c622e1b | 25 | typedef enum { |
bogdanm | 19:398f4c622e1b | 26 | PIN_INPUT, |
bogdanm | 19:398f4c622e1b | 27 | PIN_OUTPUT |
bogdanm | 19:398f4c622e1b | 28 | } PinDirection; |
bogdanm | 19:398f4c622e1b | 29 | |
bogdanm | 19:398f4c622e1b | 30 | #define PORT_SHIFT 12 |
bogdanm | 19:398f4c622e1b | 31 | #define PIN_SHIFT 8 |
bogdanm | 19:398f4c622e1b | 32 | |
bogdanm | 19:398f4c622e1b | 33 | typedef enum { |
bogdanm | 19:398f4c622e1b | 34 | // LPC1114 Pin Names (PORT[15:12] + PIN[11:8] + IOCON offset[7:0]) |
bogdanm | 19:398f4c622e1b | 35 | |
bogdanm | 19:398f4c622e1b | 36 | P0_0 = (0 << PORT_SHIFT) | (0 << PIN_SHIFT) | 0x0c, |
bogdanm | 19:398f4c622e1b | 37 | P0_1 = (0 << PORT_SHIFT) | (1 << PIN_SHIFT) | 0x10, |
bogdanm | 19:398f4c622e1b | 38 | P0_2 = (0 << PORT_SHIFT) | (2 << PIN_SHIFT) | 0x1c, |
bogdanm | 19:398f4c622e1b | 39 | P0_3 = (0 << PORT_SHIFT) | (3 << PIN_SHIFT) | 0x2c, |
bogdanm | 19:398f4c622e1b | 40 | P0_4 = (0 << PORT_SHIFT) | (4 << PIN_SHIFT) | 0x30, |
bogdanm | 19:398f4c622e1b | 41 | P0_5 = (0 << PORT_SHIFT) | (5 << PIN_SHIFT) | 0x34, |
bogdanm | 19:398f4c622e1b | 42 | P0_6 = (0 << PORT_SHIFT) | (6 << PIN_SHIFT) | 0x4c, |
bogdanm | 19:398f4c622e1b | 43 | P0_7 = (0 << PORT_SHIFT) | (7 << PIN_SHIFT) | 0x50, |
bogdanm | 19:398f4c622e1b | 44 | P0_8 = (0 << PORT_SHIFT) | (8 << PIN_SHIFT) | 0x60, |
bogdanm | 19:398f4c622e1b | 45 | P0_9 = (0 << PORT_SHIFT) | (9 << PIN_SHIFT) | 0x64, |
bogdanm | 19:398f4c622e1b | 46 | P0_11 = (0 << PORT_SHIFT) | (11 << PIN_SHIFT) | 0x74, |
bogdanm | 19:398f4c622e1b | 47 | |
bogdanm | 19:398f4c622e1b | 48 | P1_0 = (1 << PORT_SHIFT) | (0 << PIN_SHIFT) | 0x78, |
bogdanm | 19:398f4c622e1b | 49 | P1_1 = (1 << PORT_SHIFT) | (1 << PIN_SHIFT) | 0x7c, |
bogdanm | 19:398f4c622e1b | 50 | P1_2 = (1 << PORT_SHIFT) | (2 << PIN_SHIFT) | 0x80, |
bogdanm | 19:398f4c622e1b | 51 | P1_4 = (1 << PORT_SHIFT) | (4 << PIN_SHIFT) | 0x94, |
bogdanm | 19:398f4c622e1b | 52 | P1_5 = (1 << PORT_SHIFT) | (5 << PIN_SHIFT) | 0xa0, |
bogdanm | 19:398f4c622e1b | 53 | P1_6 = (1 << PORT_SHIFT) | (6 << PIN_SHIFT) | 0xa4, |
bogdanm | 19:398f4c622e1b | 54 | P1_7 = (1 << PORT_SHIFT) | (7 << PIN_SHIFT) | 0xa8, |
bogdanm | 19:398f4c622e1b | 55 | P1_8 = (1 << PORT_SHIFT) | (8 << PIN_SHIFT) | 0x14, |
bogdanm | 19:398f4c622e1b | 56 | P1_9 = (1 << PORT_SHIFT) | (9 << PIN_SHIFT) | 0x38, |
bogdanm | 19:398f4c622e1b | 57 | P1_10 = (1 << PORT_SHIFT) | (10 << PIN_SHIFT) | 0x6c, |
bogdanm | 19:398f4c622e1b | 58 | P1_11 = (1 << PORT_SHIFT) | (11 << PIN_SHIFT) | 0x98, |
bogdanm | 19:398f4c622e1b | 59 | |
bogdanm | 19:398f4c622e1b | 60 | P2_0 = (2 << PORT_SHIFT) | (0 << PIN_SHIFT) | 0x08, |
bogdanm | 19:398f4c622e1b | 61 | P2_1 = (2 << PORT_SHIFT) | (1 << PIN_SHIFT) | 0x28, |
bogdanm | 19:398f4c622e1b | 62 | P2_2 = (2 << PORT_SHIFT) | (2 << PIN_SHIFT) | 0x5c, |
bogdanm | 19:398f4c622e1b | 63 | P2_3 = (2 << PORT_SHIFT) | (3 << PIN_SHIFT) | 0x8c, |
bogdanm | 19:398f4c622e1b | 64 | P2_4 = (2 << PORT_SHIFT) | (4 << PIN_SHIFT) | 0x40, |
bogdanm | 19:398f4c622e1b | 65 | P2_5 = (2 << PORT_SHIFT) | (5 << PIN_SHIFT) | 0x44, |
bogdanm | 19:398f4c622e1b | 66 | P2_6 = (2 << PORT_SHIFT) | (6 << PIN_SHIFT) | 0x00, |
bogdanm | 19:398f4c622e1b | 67 | P2_7 = (2 << PORT_SHIFT) | (7 << PIN_SHIFT) | 0x20, |
bogdanm | 19:398f4c622e1b | 68 | P2_8 = (2 << PORT_SHIFT) | (8 << PIN_SHIFT) | 0x24, |
bogdanm | 19:398f4c622e1b | 69 | P2_9 = (2 << PORT_SHIFT) | (9 << PIN_SHIFT) | 0x54, |
bogdanm | 19:398f4c622e1b | 70 | P2_10 = (2 << PORT_SHIFT) | (10 << PIN_SHIFT) | 0x58, |
bogdanm | 19:398f4c622e1b | 71 | P2_11 = (2 << PORT_SHIFT) | (11 << PIN_SHIFT) | 0x70, |
bogdanm | 19:398f4c622e1b | 72 | |
bogdanm | 19:398f4c622e1b | 73 | P3_0 = (3 << PORT_SHIFT) | (0 << PIN_SHIFT) | 0x84, |
bogdanm | 19:398f4c622e1b | 74 | P3_1 = (3 << PORT_SHIFT) | (1 << PIN_SHIFT) | 0x88, |
bogdanm | 19:398f4c622e1b | 75 | P3_2 = (3 << PORT_SHIFT) | (2 << PIN_SHIFT) | 0x9c, |
bogdanm | 19:398f4c622e1b | 76 | P3_3 = (3 << PORT_SHIFT) | (3 << PIN_SHIFT) | 0xac, |
bogdanm | 19:398f4c622e1b | 77 | P3_4 = (3 << PORT_SHIFT) | (4 << PIN_SHIFT) | 0x3c, |
bogdanm | 19:398f4c622e1b | 78 | P3_5 = (3 << PORT_SHIFT) | (5 << PIN_SHIFT) | 0x48, |
bogdanm | 19:398f4c622e1b | 79 | |
bogdanm | 19:398f4c622e1b | 80 | // mbed DIP Pin Names (CQ board) |
bogdanm | 19:398f4c622e1b | 81 | p4 = P0_0, |
bogdanm | 19:398f4c622e1b | 82 | p5 = P0_9, |
bogdanm | 19:398f4c622e1b | 83 | p6 = P0_8, |
bogdanm | 19:398f4c622e1b | 84 | p7 = P0_6, |
bogdanm | 19:398f4c622e1b | 85 | p8 = P1_5, |
bogdanm | 19:398f4c622e1b | 86 | p9 = P1_7, |
bogdanm | 19:398f4c622e1b | 87 | p10 = P1_6, |
bogdanm | 19:398f4c622e1b | 88 | p11 = P0_7, |
bogdanm | 19:398f4c622e1b | 89 | p12 = P1_0, |
bogdanm | 19:398f4c622e1b | 90 | p13 = P1_1, |
bogdanm | 19:398f4c622e1b | 91 | p14 = P1_2, |
bogdanm | 19:398f4c622e1b | 92 | p15 = P0_11, |
bogdanm | 19:398f4c622e1b | 93 | p16 = P1_0, |
bogdanm | 19:398f4c622e1b | 94 | p17 = P1_1, |
bogdanm | 19:398f4c622e1b | 95 | p18 = P1_2, |
bogdanm | 19:398f4c622e1b | 96 | p20 = P1_4, |
bogdanm | 19:398f4c622e1b | 97 | p22 = P0_2, |
bogdanm | 19:398f4c622e1b | 98 | p23 = P0_11, |
bogdanm | 19:398f4c622e1b | 99 | p24 = P0_2, |
bogdanm | 19:398f4c622e1b | 100 | p25 = P1_8, |
bogdanm | 19:398f4c622e1b | 101 | p26 = P1_9, |
bogdanm | 19:398f4c622e1b | 102 | p27 = P0_4, |
bogdanm | 19:398f4c622e1b | 103 | p28 = P0_5, |
bogdanm | 19:398f4c622e1b | 104 | p29 = P0_3, |
bogdanm | 19:398f4c622e1b | 105 | p30 = P0_1, |
bogdanm | 19:398f4c622e1b | 106 | |
bogdanm | 19:398f4c622e1b | 107 | // Other mbed Pin Names |
bogdanm | 19:398f4c622e1b | 108 | LED1 = P1_5, |
bogdanm | 19:398f4c622e1b | 109 | LED2 = P0_7, |
bogdanm | 19:398f4c622e1b | 110 | LED3 = P1_5, |
bogdanm | 19:398f4c622e1b | 111 | LED4 = P0_7, |
bogdanm | 19:398f4c622e1b | 112 | |
bogdanm | 19:398f4c622e1b | 113 | USBTX = P1_7, |
bogdanm | 19:398f4c622e1b | 114 | USBRX = P1_6, |
bogdanm | 19:398f4c622e1b | 115 | |
bogdanm | 19:398f4c622e1b | 116 | // mbed DIP Pin Names (LPCXpresso LPC1114) |
bogdanm | 19:398f4c622e1b | 117 | xp4 = P0_0, |
bogdanm | 19:398f4c622e1b | 118 | xp5 = P0_9, |
bogdanm | 19:398f4c622e1b | 119 | xp6 = P0_8, |
bogdanm | 19:398f4c622e1b | 120 | xp7 = P2_11, |
bogdanm | 19:398f4c622e1b | 121 | xp8 = P0_2, |
bogdanm | 19:398f4c622e1b | 122 | xp9 = P1_7, |
bogdanm | 19:398f4c622e1b | 123 | xp10 = P1_6, |
bogdanm | 19:398f4c622e1b | 124 | xp11 = P0_7, |
bogdanm | 19:398f4c622e1b | 125 | xp12 = P2_0, |
bogdanm | 19:398f4c622e1b | 126 | xp13 = P2_1, |
bogdanm | 19:398f4c622e1b | 127 | xp14 = P2_2, |
bogdanm | 19:398f4c622e1b | 128 | xp15 = P0_11, |
bogdanm | 19:398f4c622e1b | 129 | xp16 = P1_0, |
bogdanm | 19:398f4c622e1b | 130 | xp17 = P1_1, |
bogdanm | 19:398f4c622e1b | 131 | xp18 = P1_2, |
bogdanm | 19:398f4c622e1b | 132 | xp20 = P1_4, |
bogdanm | 19:398f4c622e1b | 133 | xp21 = P1_5, |
bogdanm | 19:398f4c622e1b | 134 | xp22 = P1_8, |
bogdanm | 19:398f4c622e1b | 135 | xp23 = P0_6, |
bogdanm | 19:398f4c622e1b | 136 | xp25 = P3_0, |
bogdanm | 19:398f4c622e1b | 137 | xp26 = P3_1, |
bogdanm | 19:398f4c622e1b | 138 | xp27 = P3_2, |
bogdanm | 19:398f4c622e1b | 139 | |
bogdanm | 19:398f4c622e1b | 140 | xp29 = P3_3, |
bogdanm | 19:398f4c622e1b | 141 | xp30 = P2_10, |
bogdanm | 19:398f4c622e1b | 142 | xp31 = P2_9, |
bogdanm | 19:398f4c622e1b | 143 | xp32 = P2_8, |
bogdanm | 19:398f4c622e1b | 144 | xp33 = P2_7, |
bogdanm | 19:398f4c622e1b | 145 | xp34 = P2_6, |
bogdanm | 19:398f4c622e1b | 146 | xp35 = P2_5, |
bogdanm | 19:398f4c622e1b | 147 | xp36 = P2_4, |
bogdanm | 19:398f4c622e1b | 148 | xp37 = P2_3, |
bogdanm | 19:398f4c622e1b | 149 | xp38 = P1_11, |
bogdanm | 19:398f4c622e1b | 150 | xp39 = P1_10, |
bogdanm | 19:398f4c622e1b | 151 | xp40 = P1_9, |
bogdanm | 19:398f4c622e1b | 152 | xp41 = P0_4, |
bogdanm | 19:398f4c622e1b | 153 | xp42 = P0_5, |
bogdanm | 19:398f4c622e1b | 154 | xp43 = P0_3, |
bogdanm | 19:398f4c622e1b | 155 | xp44 = P0_1, |
bogdanm | 19:398f4c622e1b | 156 | |
bogdanm | 19:398f4c622e1b | 157 | // Other mbed Pin Names |
bogdanm | 19:398f4c622e1b | 158 | xLED1 = P0_7, |
bogdanm | 19:398f4c622e1b | 159 | |
bogdanm | 19:398f4c622e1b | 160 | // DIP Package Names |
bogdanm | 19:398f4c622e1b | 161 | |
bogdanm | 19:398f4c622e1b | 162 | dp1 = P0_8, |
bogdanm | 19:398f4c622e1b | 163 | dp2 = P0_9, |
bogdanm | 19:398f4c622e1b | 164 | dp4 = P0_11, |
bogdanm | 19:398f4c622e1b | 165 | dp5 = P0_5, |
bogdanm | 19:398f4c622e1b | 166 | dp6 = P0_6, |
bogdanm | 19:398f4c622e1b | 167 | dp9 = P1_0, |
bogdanm | 19:398f4c622e1b | 168 | dp10 = P1_1, |
bogdanm | 19:398f4c622e1b | 169 | dp11 = P1_2, |
bogdanm | 19:398f4c622e1b | 170 | dp13 = P1_4, |
bogdanm | 19:398f4c622e1b | 171 | dp14 = P1_5, |
bogdanm | 19:398f4c622e1b | 172 | dp15 = P1_6, |
bogdanm | 19:398f4c622e1b | 173 | dp16 = P1_7, |
bogdanm | 19:398f4c622e1b | 174 | dp17 = P1_8, |
bogdanm | 19:398f4c622e1b | 175 | dp18 = P1_9, |
bogdanm | 19:398f4c622e1b | 176 | dp23 = P0_0, |
bogdanm | 19:398f4c622e1b | 177 | dp24 = P0_1, |
bogdanm | 19:398f4c622e1b | 178 | dp25 = P0_2, |
bogdanm | 19:398f4c622e1b | 179 | dp26 = P0_3, |
bogdanm | 19:398f4c622e1b | 180 | dp27 = P0_4, |
bogdanm | 19:398f4c622e1b | 181 | dp28 = P0_7, |
bogdanm | 19:398f4c622e1b | 182 | |
bogdanm | 19:398f4c622e1b | 183 | dip1 = P0_8, |
bogdanm | 19:398f4c622e1b | 184 | dip2 = P0_9, |
bogdanm | 19:398f4c622e1b | 185 | dip4 = P0_11, |
bogdanm | 19:398f4c622e1b | 186 | dip5 = P0_5, |
bogdanm | 19:398f4c622e1b | 187 | dip6 = P0_6, |
bogdanm | 19:398f4c622e1b | 188 | dip9 = P1_0, |
bogdanm | 19:398f4c622e1b | 189 | dip10 = P1_1, |
bogdanm | 19:398f4c622e1b | 190 | dip11 = P1_2, |
bogdanm | 19:398f4c622e1b | 191 | dip13 = P1_4, |
bogdanm | 19:398f4c622e1b | 192 | dip14 = P1_5, |
bogdanm | 19:398f4c622e1b | 193 | dip15 = P1_6, |
bogdanm | 19:398f4c622e1b | 194 | dip16 = P1_7, |
bogdanm | 19:398f4c622e1b | 195 | dip17 = P1_8, |
bogdanm | 19:398f4c622e1b | 196 | dip18 = P1_9, |
bogdanm | 19:398f4c622e1b | 197 | dip23 = P0_0, |
bogdanm | 19:398f4c622e1b | 198 | dip24 = P0_1, |
bogdanm | 19:398f4c622e1b | 199 | dip25 = P0_2, |
bogdanm | 19:398f4c622e1b | 200 | dip26 = P0_3, |
bogdanm | 19:398f4c622e1b | 201 | dip27 = P0_4, |
bogdanm | 19:398f4c622e1b | 202 | dip28 = P0_7, |
bogdanm | 19:398f4c622e1b | 203 | |
bogdanm | 19:398f4c622e1b | 204 | |
bogdanm | 19:398f4c622e1b | 205 | |
bogdanm | 19:398f4c622e1b | 206 | // Not connected |
bogdanm | 19:398f4c622e1b | 207 | NC = (int)0xFFFFFFFF, |
bogdanm | 19:398f4c622e1b | 208 | } PinName; |
bogdanm | 19:398f4c622e1b | 209 | |
bogdanm | 19:398f4c622e1b | 210 | typedef enum { |
bogdanm | 19:398f4c622e1b | 211 | CHANNEL0 = WAKEUP0_IRQn, |
bogdanm | 19:398f4c622e1b | 212 | CHANNEL1 = WAKEUP1_IRQn, |
bogdanm | 19:398f4c622e1b | 213 | CHANNEL2 = WAKEUP2_IRQn, |
bogdanm | 19:398f4c622e1b | 214 | CHANNEL3 = WAKEUP3_IRQn, |
bogdanm | 19:398f4c622e1b | 215 | CHANNEL4 = WAKEUP4_IRQn, |
bogdanm | 19:398f4c622e1b | 216 | CHANNEL5 = WAKEUP5_IRQn, |
bogdanm | 19:398f4c622e1b | 217 | CHANNEL6 = WAKEUP6_IRQn, |
bogdanm | 19:398f4c622e1b | 218 | CHANNEL7 = WAKEUP7_IRQn |
bogdanm | 19:398f4c622e1b | 219 | } Channel; |
bogdanm | 19:398f4c622e1b | 220 | |
bogdanm | 19:398f4c622e1b | 221 | typedef enum { |
bogdanm | 19:398f4c622e1b | 222 | PullUp = 2, |
bogdanm | 19:398f4c622e1b | 223 | PullDown = 1, |
bogdanm | 19:398f4c622e1b | 224 | PullNone = 0, |
bogdanm | 19:398f4c622e1b | 225 | Repeater = 3, |
bogdanm | 19:398f4c622e1b | 226 | OpenDrain = 4 |
bogdanm | 19:398f4c622e1b | 227 | } PinMode; |
bogdanm | 19:398f4c622e1b | 228 | |
bogdanm | 19:398f4c622e1b | 229 | #ifdef __cplusplus |
bogdanm | 19:398f4c622e1b | 230 | } |
bogdanm | 19:398f4c622e1b | 231 | #endif |
bogdanm | 19:398f4c622e1b | 232 | |
bogdanm | 19:398f4c622e1b | 233 | #endif |