The official Mbed 2 C/C++ SDK provides the software platform and libraries to build your applications.

Dependents:   hello SerialTestv11 SerialTestv12 Sierpinski ... more

mbed 2

This is the mbed 2 library. If you'd like to learn about Mbed OS please see the mbed-os docs.

Committer:
bogdanm
Date:
Mon Aug 05 12:28:09 2013 +0300
Revision:
64:e3affc9e7238
Child:
65:5798e58a58b1
New build system structure, new target (LPC1347), bug fixes (I2C read/write errors, LPC11U24 memory map and others)

Who changed what in which revision?

UserRevisionLine numberNew contents of line
bogdanm 64:e3affc9e7238 1 /* mbed Microcontroller Library
bogdanm 64:e3affc9e7238 2 * Copyright (c) 2006-2013 ARM Limited
bogdanm 64:e3affc9e7238 3 *
bogdanm 64:e3affc9e7238 4 * Licensed under the Apache License, Version 2.0 (the "License");
bogdanm 64:e3affc9e7238 5 * you may not use this file except in compliance with the License.
bogdanm 64:e3affc9e7238 6 * You may obtain a copy of the License at
bogdanm 64:e3affc9e7238 7 *
bogdanm 64:e3affc9e7238 8 * http://www.apache.org/licenses/LICENSE-2.0
bogdanm 64:e3affc9e7238 9 *
bogdanm 64:e3affc9e7238 10 * Unless required by applicable law or agreed to in writing, software
bogdanm 64:e3affc9e7238 11 * distributed under the License is distributed on an "AS IS" BASIS,
bogdanm 64:e3affc9e7238 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
bogdanm 64:e3affc9e7238 13 * See the License for the specific language governing permissions and
bogdanm 64:e3affc9e7238 14 * limitations under the License.
bogdanm 64:e3affc9e7238 15 */
bogdanm 64:e3affc9e7238 16 #ifndef MBED_PINNAMES_H
bogdanm 64:e3affc9e7238 17 #define MBED_PINNAMES_H
bogdanm 64:e3affc9e7238 18
bogdanm 64:e3affc9e7238 19 #include "cmsis.h"
bogdanm 64:e3affc9e7238 20
bogdanm 64:e3affc9e7238 21 #ifdef __cplusplus
bogdanm 64:e3affc9e7238 22 extern "C" {
bogdanm 64:e3affc9e7238 23 #endif
bogdanm 64:e3affc9e7238 24
bogdanm 64:e3affc9e7238 25 typedef enum {
bogdanm 64:e3affc9e7238 26 PIN_INPUT,
bogdanm 64:e3affc9e7238 27 PIN_OUTPUT
bogdanm 64:e3affc9e7238 28 } PinDirection;
bogdanm 64:e3affc9e7238 29
bogdanm 64:e3affc9e7238 30 #define PORT_SHIFT 12
bogdanm 64:e3affc9e7238 31
bogdanm 64:e3affc9e7238 32 typedef enum {
bogdanm 64:e3affc9e7238 33 PTA0 = 0x0,
bogdanm 64:e3affc9e7238 34 PTA1 = 0x4,
bogdanm 64:e3affc9e7238 35 PTA2 = 0x8,
bogdanm 64:e3affc9e7238 36 PTA3 = 0xc,
bogdanm 64:e3affc9e7238 37 PTA4 = 0x10,
bogdanm 64:e3affc9e7238 38 PTA5 = 0x14,
bogdanm 64:e3affc9e7238 39 PTA6 = 0x18,
bogdanm 64:e3affc9e7238 40 PTA7 = 0x1c,
bogdanm 64:e3affc9e7238 41 PTA8 = 0x20,
bogdanm 64:e3affc9e7238 42 PTA9 = 0x24,
bogdanm 64:e3affc9e7238 43 PTA10 = 0x28,
bogdanm 64:e3affc9e7238 44 PTA11 = 0x2c,
bogdanm 64:e3affc9e7238 45 PTA12 = 0x30,
bogdanm 64:e3affc9e7238 46 PTA13 = 0x34,
bogdanm 64:e3affc9e7238 47 PTA14 = 0x38,
bogdanm 64:e3affc9e7238 48 PTA15 = 0x3c,
bogdanm 64:e3affc9e7238 49 PTA16 = 0x40,
bogdanm 64:e3affc9e7238 50 PTA17 = 0x44,
bogdanm 64:e3affc9e7238 51 PTA18 = 0x48,
bogdanm 64:e3affc9e7238 52 PTA19 = 0x4c,
bogdanm 64:e3affc9e7238 53 PTA20 = 0x50,
bogdanm 64:e3affc9e7238 54 PTA21 = 0x54,
bogdanm 64:e3affc9e7238 55 PTA22 = 0x58,
bogdanm 64:e3affc9e7238 56 PTA23 = 0x5c,
bogdanm 64:e3affc9e7238 57 PTA24 = 0x60,
bogdanm 64:e3affc9e7238 58 PTA25 = 0x64,
bogdanm 64:e3affc9e7238 59 PTA26 = 0x68,
bogdanm 64:e3affc9e7238 60 PTA27 = 0x6c,
bogdanm 64:e3affc9e7238 61 PTA28 = 0x70,
bogdanm 64:e3affc9e7238 62 PTA29 = 0x74,
bogdanm 64:e3affc9e7238 63 PTA30 = 0x78,
bogdanm 64:e3affc9e7238 64 PTA31 = 0x7c,
bogdanm 64:e3affc9e7238 65 PTB0 = 0x1000,
bogdanm 64:e3affc9e7238 66 PTB1 = 0x1004,
bogdanm 64:e3affc9e7238 67 PTB2 = 0x1008,
bogdanm 64:e3affc9e7238 68 PTB3 = 0x100c,
bogdanm 64:e3affc9e7238 69 PTB4 = 0x1010,
bogdanm 64:e3affc9e7238 70 PTB5 = 0x1014,
bogdanm 64:e3affc9e7238 71 PTB6 = 0x1018,
bogdanm 64:e3affc9e7238 72 PTB7 = 0x101c,
bogdanm 64:e3affc9e7238 73 PTB8 = 0x1020,
bogdanm 64:e3affc9e7238 74 PTB9 = 0x1024,
bogdanm 64:e3affc9e7238 75 PTB10 = 0x1028,
bogdanm 64:e3affc9e7238 76 PTB11 = 0x102c,
bogdanm 64:e3affc9e7238 77 PTB12 = 0x1030,
bogdanm 64:e3affc9e7238 78 PTB13 = 0x1034,
bogdanm 64:e3affc9e7238 79 PTB14 = 0x1038,
bogdanm 64:e3affc9e7238 80 PTB15 = 0x103c,
bogdanm 64:e3affc9e7238 81 PTB16 = 0x1040,
bogdanm 64:e3affc9e7238 82 PTB17 = 0x1044,
bogdanm 64:e3affc9e7238 83 PTB18 = 0x1048,
bogdanm 64:e3affc9e7238 84 PTB19 = 0x104c,
bogdanm 64:e3affc9e7238 85 PTB20 = 0x1050,
bogdanm 64:e3affc9e7238 86 PTB21 = 0x1054,
bogdanm 64:e3affc9e7238 87 PTB22 = 0x1058,
bogdanm 64:e3affc9e7238 88 PTB23 = 0x105c,
bogdanm 64:e3affc9e7238 89 PTB24 = 0x1060,
bogdanm 64:e3affc9e7238 90 PTB25 = 0x1064,
bogdanm 64:e3affc9e7238 91 PTB26 = 0x1068,
bogdanm 64:e3affc9e7238 92 PTB27 = 0x106c,
bogdanm 64:e3affc9e7238 93 PTB28 = 0x1070,
bogdanm 64:e3affc9e7238 94 PTB29 = 0x1074,
bogdanm 64:e3affc9e7238 95 PTB30 = 0x1078,
bogdanm 64:e3affc9e7238 96 PTB31 = 0x107c,
bogdanm 64:e3affc9e7238 97 PTC0 = 0x2000,
bogdanm 64:e3affc9e7238 98 PTC1 = 0x2004,
bogdanm 64:e3affc9e7238 99 PTC2 = 0x2008,
bogdanm 64:e3affc9e7238 100 PTC3 = 0x200c,
bogdanm 64:e3affc9e7238 101 PTC4 = 0x2010,
bogdanm 64:e3affc9e7238 102 PTC5 = 0x2014,
bogdanm 64:e3affc9e7238 103 PTC6 = 0x2018,
bogdanm 64:e3affc9e7238 104 PTC7 = 0x201c,
bogdanm 64:e3affc9e7238 105 PTC8 = 0x2020,
bogdanm 64:e3affc9e7238 106 PTC9 = 0x2024,
bogdanm 64:e3affc9e7238 107 PTC10 = 0x2028,
bogdanm 64:e3affc9e7238 108 PTC11 = 0x202c,
bogdanm 64:e3affc9e7238 109 PTC12 = 0x2030,
bogdanm 64:e3affc9e7238 110 PTC13 = 0x2034,
bogdanm 64:e3affc9e7238 111 PTC14 = 0x2038,
bogdanm 64:e3affc9e7238 112 PTC15 = 0x203c,
bogdanm 64:e3affc9e7238 113 PTC16 = 0x2040,
bogdanm 64:e3affc9e7238 114 PTC17 = 0x2044,
bogdanm 64:e3affc9e7238 115 PTC18 = 0x2048,
bogdanm 64:e3affc9e7238 116 PTC19 = 0x204c,
bogdanm 64:e3affc9e7238 117 PTC20 = 0x2050,
bogdanm 64:e3affc9e7238 118 PTC21 = 0x2054,
bogdanm 64:e3affc9e7238 119 PTC22 = 0x2058,
bogdanm 64:e3affc9e7238 120 PTC23 = 0x205c,
bogdanm 64:e3affc9e7238 121 PTC24 = 0x2060,
bogdanm 64:e3affc9e7238 122 PTC25 = 0x2064,
bogdanm 64:e3affc9e7238 123 PTC26 = 0x2068,
bogdanm 64:e3affc9e7238 124 PTC27 = 0x206c,
bogdanm 64:e3affc9e7238 125 PTC28 = 0x2070,
bogdanm 64:e3affc9e7238 126 PTC29 = 0x2074,
bogdanm 64:e3affc9e7238 127 PTC30 = 0x2078,
bogdanm 64:e3affc9e7238 128 PTC31 = 0x207c,
bogdanm 64:e3affc9e7238 129 PTD0 = 0x3000,
bogdanm 64:e3affc9e7238 130 PTD1 = 0x3004,
bogdanm 64:e3affc9e7238 131 PTD2 = 0x3008,
bogdanm 64:e3affc9e7238 132 PTD3 = 0x300c,
bogdanm 64:e3affc9e7238 133 PTD4 = 0x3010,
bogdanm 64:e3affc9e7238 134 PTD5 = 0x3014,
bogdanm 64:e3affc9e7238 135 PTD6 = 0x3018,
bogdanm 64:e3affc9e7238 136 PTD7 = 0x301c,
bogdanm 64:e3affc9e7238 137 PTD8 = 0x3020,
bogdanm 64:e3affc9e7238 138 PTD9 = 0x3024,
bogdanm 64:e3affc9e7238 139 PTD10 = 0x3028,
bogdanm 64:e3affc9e7238 140 PTD11 = 0x302c,
bogdanm 64:e3affc9e7238 141 PTD12 = 0x3030,
bogdanm 64:e3affc9e7238 142 PTD13 = 0x3034,
bogdanm 64:e3affc9e7238 143 PTD14 = 0x3038,
bogdanm 64:e3affc9e7238 144 PTD15 = 0x303c,
bogdanm 64:e3affc9e7238 145 PTD16 = 0x3040,
bogdanm 64:e3affc9e7238 146 PTD17 = 0x3044,
bogdanm 64:e3affc9e7238 147 PTD18 = 0x3048,
bogdanm 64:e3affc9e7238 148 PTD19 = 0x304c,
bogdanm 64:e3affc9e7238 149 PTD20 = 0x3050,
bogdanm 64:e3affc9e7238 150 PTD21 = 0x3054,
bogdanm 64:e3affc9e7238 151 PTD22 = 0x3058,
bogdanm 64:e3affc9e7238 152 PTD23 = 0x305c,
bogdanm 64:e3affc9e7238 153 PTD24 = 0x3060,
bogdanm 64:e3affc9e7238 154 PTD25 = 0x3064,
bogdanm 64:e3affc9e7238 155 PTD26 = 0x3068,
bogdanm 64:e3affc9e7238 156 PTD27 = 0x306c,
bogdanm 64:e3affc9e7238 157 PTD28 = 0x3070,
bogdanm 64:e3affc9e7238 158 PTD29 = 0x3074,
bogdanm 64:e3affc9e7238 159 PTD30 = 0x3078,
bogdanm 64:e3affc9e7238 160 PTD31 = 0x307c,
bogdanm 64:e3affc9e7238 161 PTE0 = 0x4000,
bogdanm 64:e3affc9e7238 162 PTE1 = 0x4004,
bogdanm 64:e3affc9e7238 163 PTE2 = 0x4008,
bogdanm 64:e3affc9e7238 164 PTE3 = 0x400c,
bogdanm 64:e3affc9e7238 165 PTE4 = 0x4010,
bogdanm 64:e3affc9e7238 166 PTE5 = 0x4014,
bogdanm 64:e3affc9e7238 167 PTE6 = 0x4018,
bogdanm 64:e3affc9e7238 168 PTE7 = 0x401c,
bogdanm 64:e3affc9e7238 169 PTE8 = 0x4020,
bogdanm 64:e3affc9e7238 170 PTE9 = 0x4024,
bogdanm 64:e3affc9e7238 171 PTE10 = 0x4028,
bogdanm 64:e3affc9e7238 172 PTE11 = 0x402c,
bogdanm 64:e3affc9e7238 173 PTE12 = 0x4030,
bogdanm 64:e3affc9e7238 174 PTE13 = 0x4034,
bogdanm 64:e3affc9e7238 175 PTE14 = 0x4038,
bogdanm 64:e3affc9e7238 176 PTE15 = 0x403c,
bogdanm 64:e3affc9e7238 177 PTE16 = 0x4040,
bogdanm 64:e3affc9e7238 178 PTE17 = 0x4044,
bogdanm 64:e3affc9e7238 179 PTE18 = 0x4048,
bogdanm 64:e3affc9e7238 180 PTE19 = 0x404c,
bogdanm 64:e3affc9e7238 181 PTE20 = 0x4050,
bogdanm 64:e3affc9e7238 182 PTE21 = 0x4054,
bogdanm 64:e3affc9e7238 183 PTE22 = 0x4058,
bogdanm 64:e3affc9e7238 184 PTE23 = 0x405c,
bogdanm 64:e3affc9e7238 185 PTE24 = 0x4060,
bogdanm 64:e3affc9e7238 186 PTE25 = 0x4064,
bogdanm 64:e3affc9e7238 187 PTE26 = 0x4068,
bogdanm 64:e3affc9e7238 188 PTE27 = 0x406c,
bogdanm 64:e3affc9e7238 189 PTE28 = 0x4070,
bogdanm 64:e3affc9e7238 190 PTE29 = 0x4074,
bogdanm 64:e3affc9e7238 191 PTE30 = 0x4078,
bogdanm 64:e3affc9e7238 192 PTE31 = 0x407c,
bogdanm 64:e3affc9e7238 193
bogdanm 64:e3affc9e7238 194 LED_RED = PTB18,
bogdanm 64:e3affc9e7238 195 LED_GREEN = PTB19,
bogdanm 64:e3affc9e7238 196 LED_BLUE = PTD1,
bogdanm 64:e3affc9e7238 197
bogdanm 64:e3affc9e7238 198 // mbed original LED naming
bogdanm 64:e3affc9e7238 199 LED1 = LED_BLUE,
bogdanm 64:e3affc9e7238 200 LED2 = LED_GREEN,
bogdanm 64:e3affc9e7238 201 LED3 = LED_RED,
bogdanm 64:e3affc9e7238 202 LED4 = LED_RED,
bogdanm 64:e3affc9e7238 203
bogdanm 64:e3affc9e7238 204 // USB Pins
bogdanm 64:e3affc9e7238 205 USBTX = PTA2,
bogdanm 64:e3affc9e7238 206 USBRX = PTA1,
bogdanm 64:e3affc9e7238 207
bogdanm 64:e3affc9e7238 208 // Arduino Headers
bogdanm 64:e3affc9e7238 209 D0 = PTA1,
bogdanm 64:e3affc9e7238 210 D1 = PTA2,
bogdanm 64:e3affc9e7238 211 D2 = PTD4,
bogdanm 64:e3affc9e7238 212 D3 = PTA12,
bogdanm 64:e3affc9e7238 213 D4 = PTA4,
bogdanm 64:e3affc9e7238 214 D5 = PTA5,
bogdanm 64:e3affc9e7238 215 D6 = PTC8,
bogdanm 64:e3affc9e7238 216 D7 = PTC9,
bogdanm 64:e3affc9e7238 217 D8 = PTA13,
bogdanm 64:e3affc9e7238 218 D9 = PTD5,
bogdanm 64:e3affc9e7238 219 D10 = PTD0,
bogdanm 64:e3affc9e7238 220 D11 = PTD2,
bogdanm 64:e3affc9e7238 221 D12 = PTD3,
bogdanm 64:e3affc9e7238 222 D13 = PTD1,
bogdanm 64:e3affc9e7238 223 D14 = PTE0,
bogdanm 64:e3affc9e7238 224 D15 = PTE1,
bogdanm 64:e3affc9e7238 225
bogdanm 64:e3affc9e7238 226 A0 = PTB0,
bogdanm 64:e3affc9e7238 227 A1 = PTB1,
bogdanm 64:e3affc9e7238 228 A2 = PTB2,
bogdanm 64:e3affc9e7238 229 A3 = PTB3,
bogdanm 64:e3affc9e7238 230 A4 = PTC2,
bogdanm 64:e3affc9e7238 231 A5 = PTC1,
bogdanm 64:e3affc9e7238 232
bogdanm 64:e3affc9e7238 233 // Not connected
bogdanm 64:e3affc9e7238 234 NC = (int)0xFFFFFFFF
bogdanm 64:e3affc9e7238 235 } PinName;
bogdanm 64:e3affc9e7238 236
bogdanm 64:e3affc9e7238 237 /* PullDown not available for KL25 */
bogdanm 64:e3affc9e7238 238 typedef enum {
bogdanm 64:e3affc9e7238 239 PullNone = 0,
bogdanm 64:e3affc9e7238 240 PullUp = 2,
bogdanm 64:e3affc9e7238 241 } PinMode;
bogdanm 64:e3affc9e7238 242
bogdanm 64:e3affc9e7238 243 #ifdef __cplusplus
bogdanm 64:e3affc9e7238 244 }
bogdanm 64:e3affc9e7238 245 #endif
bogdanm 64:e3affc9e7238 246
bogdanm 64:e3affc9e7238 247 #endif