Minsu Lee / mbed-src

Dependents:   WizFi250_AP_HelloWorld

Fork of mbed-src by DongEun Koak

Committer:
emilmont
Date:
Fri Jun 14 17:49:17 2013 +0100
Revision:
10:3bc89ef62ce7
Unify mbed library sources

Who changed what in which revision?

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