Fork of mbed-src by mbed official

Committer:
Shikaneo
Date:
Mon Aug 05 02:27:27 2013 +0000
Revision:
13:bd9ff402dd42
Parent:
10:3bc89ef62ce7
equipped timeout

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 5
emilmont 10:3bc89ef62ce7 31
emilmont 10:3bc89ef62ce7 32 typedef enum {
emilmont 10:3bc89ef62ce7 33 // LPC11U Pin Names
emilmont 10:3bc89ef62ce7 34 P0_0 = 0,
emilmont 10:3bc89ef62ce7 35 P0_1 = 1,
emilmont 10:3bc89ef62ce7 36 P0_2 = 2,
emilmont 10:3bc89ef62ce7 37 P0_3 = 3,
emilmont 10:3bc89ef62ce7 38 P0_4 = 4,
emilmont 10:3bc89ef62ce7 39 P0_5 = 5,
emilmont 10:3bc89ef62ce7 40 P0_6 = 6,
emilmont 10:3bc89ef62ce7 41 P0_7 = 7,
emilmont 10:3bc89ef62ce7 42 P0_8 = 8,
emilmont 10:3bc89ef62ce7 43 P0_9 = 9,
emilmont 10:3bc89ef62ce7 44 P0_10 = 10,
emilmont 10:3bc89ef62ce7 45 P0_11 = 11,
emilmont 10:3bc89ef62ce7 46 P0_12 = 12,
emilmont 10:3bc89ef62ce7 47 P0_13 = 13,
emilmont 10:3bc89ef62ce7 48 P0_14 = 14,
emilmont 10:3bc89ef62ce7 49 P0_15 = 15,
emilmont 10:3bc89ef62ce7 50 P0_16 = 16,
emilmont 10:3bc89ef62ce7 51 P0_17 = 17,
emilmont 10:3bc89ef62ce7 52 P0_18 = 18,
emilmont 10:3bc89ef62ce7 53 P0_19 = 19,
emilmont 10:3bc89ef62ce7 54 P0_20 = 20,
emilmont 10:3bc89ef62ce7 55 P0_21 = 21,
emilmont 10:3bc89ef62ce7 56 P0_22 = 22,
emilmont 10:3bc89ef62ce7 57 P0_23 = 23,
emilmont 10:3bc89ef62ce7 58 P0_24 = 24,
emilmont 10:3bc89ef62ce7 59 P0_25 = 25,
emilmont 10:3bc89ef62ce7 60 P0_26 = 26,
emilmont 10:3bc89ef62ce7 61 P0_27 = 27,
emilmont 10:3bc89ef62ce7 62
emilmont 10:3bc89ef62ce7 63 P1_0 = 32,
emilmont 10:3bc89ef62ce7 64 P1_1 = 33,
emilmont 10:3bc89ef62ce7 65 P1_2 = 34,
emilmont 10:3bc89ef62ce7 66 P1_3 = 35,
emilmont 10:3bc89ef62ce7 67 P1_4 = 36,
emilmont 10:3bc89ef62ce7 68 P1_5 = 37,
emilmont 10:3bc89ef62ce7 69 P1_6 = 38,
emilmont 10:3bc89ef62ce7 70 P1_7 = 39,
emilmont 10:3bc89ef62ce7 71 P1_8 = 40,
emilmont 10:3bc89ef62ce7 72 P1_9 = 41,
emilmont 10:3bc89ef62ce7 73 P1_10 = 42,
emilmont 10:3bc89ef62ce7 74 P1_11 = 43,
emilmont 10:3bc89ef62ce7 75 P1_12 = 44,
emilmont 10:3bc89ef62ce7 76 P1_13 = 45,
emilmont 10:3bc89ef62ce7 77 P1_14 = 46,
emilmont 10:3bc89ef62ce7 78 P1_15 = 47,
emilmont 10:3bc89ef62ce7 79 P1_16 = 48,
emilmont 10:3bc89ef62ce7 80 P1_17 = 49,
emilmont 10:3bc89ef62ce7 81 P1_18 = 50,
emilmont 10:3bc89ef62ce7 82 P1_19 = 51,
emilmont 10:3bc89ef62ce7 83 P1_20 = 52,
emilmont 10:3bc89ef62ce7 84 P1_21 = 53,
emilmont 10:3bc89ef62ce7 85 P1_22 = 54,
emilmont 10:3bc89ef62ce7 86 P1_23 = 55,
emilmont 10:3bc89ef62ce7 87 P1_24 = 56,
emilmont 10:3bc89ef62ce7 88 P1_25 = 57,
emilmont 10:3bc89ef62ce7 89 P1_26 = 58,
emilmont 10:3bc89ef62ce7 90 P1_27 = 59,
emilmont 10:3bc89ef62ce7 91 P1_28 = 60,
emilmont 10:3bc89ef62ce7 92 P1_29 = 61,
emilmont 10:3bc89ef62ce7 93
emilmont 10:3bc89ef62ce7 94 P1_31 = 63,
emilmont 10:3bc89ef62ce7 95
emilmont 10:3bc89ef62ce7 96 // mbed DIP Pin Names
emilmont 10:3bc89ef62ce7 97 p5 = P0_9,
emilmont 10:3bc89ef62ce7 98 p6 = P0_8,
emilmont 10:3bc89ef62ce7 99 p7 = P1_29,
emilmont 10:3bc89ef62ce7 100 p8 = P0_2,
emilmont 10:3bc89ef62ce7 101 p9 = P1_27,
emilmont 10:3bc89ef62ce7 102 p10 = P1_26,
emilmont 10:3bc89ef62ce7 103 p11 = P1_22,
emilmont 10:3bc89ef62ce7 104 p12 = P1_21,
emilmont 10:3bc89ef62ce7 105 p13 = P1_20,
emilmont 10:3bc89ef62ce7 106 p14 = P1_23,
emilmont 10:3bc89ef62ce7 107 p15 = P0_11,
emilmont 10:3bc89ef62ce7 108 p16 = P0_12,
emilmont 10:3bc89ef62ce7 109 p17 = P0_13,
emilmont 10:3bc89ef62ce7 110 p18 = P0_14,
emilmont 10:3bc89ef62ce7 111 p19 = P0_16,
emilmont 10:3bc89ef62ce7 112 p20 = P0_22,
emilmont 10:3bc89ef62ce7 113 p21 = P0_7,
emilmont 10:3bc89ef62ce7 114 p22 = P0_17,
emilmont 10:3bc89ef62ce7 115 p23 = P1_17,
emilmont 10:3bc89ef62ce7 116 p24 = P1_18,
emilmont 10:3bc89ef62ce7 117 p25 = P1_24,
emilmont 10:3bc89ef62ce7 118 p26 = P1_25,
emilmont 10:3bc89ef62ce7 119 p27 = P0_4,
emilmont 10:3bc89ef62ce7 120 p28 = P0_5,
emilmont 10:3bc89ef62ce7 121 p29 = P1_5,
emilmont 10:3bc89ef62ce7 122 p30 = P1_2,
emilmont 10:3bc89ef62ce7 123
emilmont 10:3bc89ef62ce7 124 p33 = P0_3,
emilmont 10:3bc89ef62ce7 125 p34 = P1_15,
emilmont 10:3bc89ef62ce7 126 p35 = P0_20,
emilmont 10:3bc89ef62ce7 127 p36 = P0_21,
emilmont 10:3bc89ef62ce7 128
emilmont 10:3bc89ef62ce7 129 // Other mbed Pin Names
emilmont 10:3bc89ef62ce7 130 LED1 = P1_8,
emilmont 10:3bc89ef62ce7 131 LED2 = P1_9,
emilmont 10:3bc89ef62ce7 132 LED3 = P1_10,
emilmont 10:3bc89ef62ce7 133 LED4 = P1_11,
emilmont 10:3bc89ef62ce7 134
emilmont 10:3bc89ef62ce7 135 USBTX = P0_19,
emilmont 10:3bc89ef62ce7 136 USBRX = P0_18,
emilmont 10:3bc89ef62ce7 137
emilmont 10:3bc89ef62ce7 138 // Not connected
emilmont 10:3bc89ef62ce7 139 NC = (int)0xFFFFFFFF,
emilmont 10:3bc89ef62ce7 140 } PinName;
emilmont 10:3bc89ef62ce7 141
emilmont 10:3bc89ef62ce7 142 typedef enum {
emilmont 10:3bc89ef62ce7 143 CHANNEL0 = FLEX_INT0_IRQn,
emilmont 10:3bc89ef62ce7 144 CHANNEL1 = FLEX_INT1_IRQn,
emilmont 10:3bc89ef62ce7 145 CHANNEL2 = FLEX_INT2_IRQn,
emilmont 10:3bc89ef62ce7 146 CHANNEL3 = FLEX_INT3_IRQn,
emilmont 10:3bc89ef62ce7 147 CHANNEL4 = FLEX_INT4_IRQn,
emilmont 10:3bc89ef62ce7 148 CHANNEL5 = FLEX_INT5_IRQn,
emilmont 10:3bc89ef62ce7 149 CHANNEL6 = FLEX_INT6_IRQn,
emilmont 10:3bc89ef62ce7 150 CHANNEL7 = FLEX_INT7_IRQn
emilmont 10:3bc89ef62ce7 151 } Channel;
emilmont 10:3bc89ef62ce7 152
emilmont 10:3bc89ef62ce7 153 typedef enum {
emilmont 10:3bc89ef62ce7 154 PullUp = 2,
emilmont 10:3bc89ef62ce7 155 PullDown = 1,
emilmont 10:3bc89ef62ce7 156 PullNone = 0,
emilmont 10:3bc89ef62ce7 157 Repeater = 3,
emilmont 10:3bc89ef62ce7 158 OpenDrain = 4
emilmont 10:3bc89ef62ce7 159 } PinMode;
emilmont 10:3bc89ef62ce7 160
emilmont 10:3bc89ef62ce7 161 #ifdef __cplusplus
emilmont 10:3bc89ef62ce7 162 }
emilmont 10:3bc89ef62ce7 163 #endif
emilmont 10:3bc89ef62ce7 164
emilmont 10:3bc89ef62ce7 165 #endif