...

Dependents:   2doejemplo Labo_TRSE_Drone

Fork of mbed by mbed official

Committer:
bogdanm
Date:
Mon Aug 05 12:28:09 2013 +0300
Revision:
64:e3affc9e7238
Parent:
LPC11U24/PinNames.h@59:0883845fe643
Child:
66:9c8f0e3462fb
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
emilmont 44:24d45a770a51 1 /* mbed Microcontroller Library
emilmont 54:71b101360fb9 2 * Copyright (c) 2006-2013 ARM Limited
emilmont 44:24d45a770a51 3 *
emilmont 59:0883845fe643 4 * Licensed under the Apache License, Version 2.0 (the "License");
emilmont 59:0883845fe643 5 * you may not use this file except in compliance with the License.
emilmont 59:0883845fe643 6 * You may obtain a copy of the License at
emilmont 59:0883845fe643 7 *
emilmont 59:0883845fe643 8 * http://www.apache.org/licenses/LICENSE-2.0
emilmont 44:24d45a770a51 9 *
emilmont 59:0883845fe643 10 * Unless required by applicable law or agreed to in writing, software
emilmont 59:0883845fe643 11 * distributed under the License is distributed on an "AS IS" BASIS,
emilmont 59:0883845fe643 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
emilmont 59:0883845fe643 13 * See the License for the specific language governing permissions and
emilmont 59:0883845fe643 14 * limitations under the License.
emilmont 44:24d45a770a51 15 */
emilmont 44:24d45a770a51 16 #ifndef MBED_PINNAMES_H
emilmont 44:24d45a770a51 17 #define MBED_PINNAMES_H
emilmont 44:24d45a770a51 18
emilmont 44:24d45a770a51 19 #include "cmsis.h"
emilmont 44:24d45a770a51 20
emilmont 44:24d45a770a51 21 #ifdef __cplusplus
emilmont 44:24d45a770a51 22 extern "C" {
emilmont 44:24d45a770a51 23 #endif
emilmont 44:24d45a770a51 24
emilmont 44:24d45a770a51 25 typedef enum {
emilmont 44:24d45a770a51 26 PIN_INPUT,
emilmont 44:24d45a770a51 27 PIN_OUTPUT
emilmont 44:24d45a770a51 28 } PinDirection;
emilmont 44:24d45a770a51 29
emilmont 44:24d45a770a51 30 #define PORT_SHIFT 5
emilmont 44:24d45a770a51 31
emilmont 44:24d45a770a51 32 typedef enum {
emilmont 44:24d45a770a51 33 // LPC11U Pin Names
emilmont 44:24d45a770a51 34 P0_0 = 0,
emilmont 44:24d45a770a51 35 P0_1 = 1,
emilmont 44:24d45a770a51 36 P0_2 = 2,
emilmont 44:24d45a770a51 37 P0_3 = 3,
emilmont 44:24d45a770a51 38 P0_4 = 4,
emilmont 44:24d45a770a51 39 P0_5 = 5,
emilmont 44:24d45a770a51 40 P0_6 = 6,
emilmont 44:24d45a770a51 41 P0_7 = 7,
emilmont 44:24d45a770a51 42 P0_8 = 8,
emilmont 44:24d45a770a51 43 P0_9 = 9,
emilmont 44:24d45a770a51 44 P0_10 = 10,
emilmont 44:24d45a770a51 45 P0_11 = 11,
emilmont 44:24d45a770a51 46 P0_12 = 12,
emilmont 44:24d45a770a51 47 P0_13 = 13,
emilmont 44:24d45a770a51 48 P0_14 = 14,
emilmont 44:24d45a770a51 49 P0_15 = 15,
emilmont 44:24d45a770a51 50 P0_16 = 16,
emilmont 44:24d45a770a51 51 P0_17 = 17,
emilmont 44:24d45a770a51 52 P0_18 = 18,
emilmont 44:24d45a770a51 53 P0_19 = 19,
emilmont 44:24d45a770a51 54 P0_20 = 20,
emilmont 44:24d45a770a51 55 P0_21 = 21,
emilmont 44:24d45a770a51 56 P0_22 = 22,
emilmont 44:24d45a770a51 57 P0_23 = 23,
emilmont 44:24d45a770a51 58 P0_24 = 24,
emilmont 44:24d45a770a51 59 P0_25 = 25,
emilmont 44:24d45a770a51 60 P0_26 = 26,
emilmont 44:24d45a770a51 61 P0_27 = 27,
emilmont 44:24d45a770a51 62
emilmont 44:24d45a770a51 63 P1_0 = 32,
emilmont 44:24d45a770a51 64 P1_1 = 33,
emilmont 44:24d45a770a51 65 P1_2 = 34,
emilmont 44:24d45a770a51 66 P1_3 = 35,
emilmont 44:24d45a770a51 67 P1_4 = 36,
emilmont 44:24d45a770a51 68 P1_5 = 37,
emilmont 44:24d45a770a51 69 P1_6 = 38,
emilmont 44:24d45a770a51 70 P1_7 = 39,
emilmont 44:24d45a770a51 71 P1_8 = 40,
emilmont 44:24d45a770a51 72 P1_9 = 41,
emilmont 44:24d45a770a51 73 P1_10 = 42,
emilmont 44:24d45a770a51 74 P1_11 = 43,
emilmont 44:24d45a770a51 75 P1_12 = 44,
emilmont 44:24d45a770a51 76 P1_13 = 45,
emilmont 44:24d45a770a51 77 P1_14 = 46,
emilmont 44:24d45a770a51 78 P1_15 = 47,
emilmont 44:24d45a770a51 79 P1_16 = 48,
emilmont 44:24d45a770a51 80 P1_17 = 49,
emilmont 44:24d45a770a51 81 P1_18 = 50,
emilmont 44:24d45a770a51 82 P1_19 = 51,
emilmont 44:24d45a770a51 83 P1_20 = 52,
emilmont 44:24d45a770a51 84 P1_21 = 53,
emilmont 44:24d45a770a51 85 P1_22 = 54,
emilmont 44:24d45a770a51 86 P1_23 = 55,
emilmont 44:24d45a770a51 87 P1_24 = 56,
emilmont 44:24d45a770a51 88 P1_25 = 57,
emilmont 44:24d45a770a51 89 P1_26 = 58,
emilmont 44:24d45a770a51 90 P1_27 = 59,
emilmont 44:24d45a770a51 91 P1_28 = 60,
emilmont 44:24d45a770a51 92 P1_29 = 61,
emilmont 55:d722ed6a4237 93
emilmont 44:24d45a770a51 94 P1_31 = 63,
emilmont 55:d722ed6a4237 95
emilmont 44:24d45a770a51 96 // mbed DIP Pin Names
emilmont 44:24d45a770a51 97 p5 = P0_9,
emilmont 44:24d45a770a51 98 p6 = P0_8,
emilmont 44:24d45a770a51 99 p7 = P1_29,
emilmont 44:24d45a770a51 100 p8 = P0_2,
emilmont 44:24d45a770a51 101 p9 = P1_27,
emilmont 44:24d45a770a51 102 p10 = P1_26,
emilmont 44:24d45a770a51 103 p11 = P1_22,
emilmont 44:24d45a770a51 104 p12 = P1_21,
emilmont 44:24d45a770a51 105 p13 = P1_20,
emilmont 44:24d45a770a51 106 p14 = P1_23,
emilmont 44:24d45a770a51 107 p15 = P0_11,
emilmont 44:24d45a770a51 108 p16 = P0_12,
emilmont 44:24d45a770a51 109 p17 = P0_13,
emilmont 44:24d45a770a51 110 p18 = P0_14,
emilmont 44:24d45a770a51 111 p19 = P0_16,
emilmont 44:24d45a770a51 112 p20 = P0_22,
emilmont 44:24d45a770a51 113 p21 = P0_7,
emilmont 44:24d45a770a51 114 p22 = P0_17,
emilmont 44:24d45a770a51 115 p23 = P1_17,
emilmont 44:24d45a770a51 116 p24 = P1_18,
emilmont 44:24d45a770a51 117 p25 = P1_24,
emilmont 44:24d45a770a51 118 p26 = P1_25,
emilmont 44:24d45a770a51 119 p27 = P0_4,
emilmont 44:24d45a770a51 120 p28 = P0_5,
emilmont 44:24d45a770a51 121 p29 = P1_5,
emilmont 44:24d45a770a51 122 p30 = P1_2,
emilmont 55:d722ed6a4237 123
emilmont 44:24d45a770a51 124 p33 = P0_3,
emilmont 44:24d45a770a51 125 p34 = P1_15,
emilmont 44:24d45a770a51 126 p35 = P0_20,
emilmont 44:24d45a770a51 127 p36 = P0_21,
emilmont 55:d722ed6a4237 128
emilmont 44:24d45a770a51 129 // Other mbed Pin Names
emilmont 44:24d45a770a51 130 LED1 = P1_8,
emilmont 44:24d45a770a51 131 LED2 = P1_9,
emilmont 44:24d45a770a51 132 LED3 = P1_10,
emilmont 44:24d45a770a51 133 LED4 = P1_11,
emilmont 55:d722ed6a4237 134
emilmont 44:24d45a770a51 135 USBTX = P0_19,
emilmont 44:24d45a770a51 136 USBRX = P0_18,
emilmont 55:d722ed6a4237 137
emilmont 44:24d45a770a51 138 // Not connected
emilmont 44:24d45a770a51 139 NC = (int)0xFFFFFFFF,
emilmont 44:24d45a770a51 140 } PinName;
emilmont 44:24d45a770a51 141
emilmont 44:24d45a770a51 142 typedef enum {
emilmont 44:24d45a770a51 143 CHANNEL0 = FLEX_INT0_IRQn,
emilmont 44:24d45a770a51 144 CHANNEL1 = FLEX_INT1_IRQn,
emilmont 44:24d45a770a51 145 CHANNEL2 = FLEX_INT2_IRQn,
emilmont 44:24d45a770a51 146 CHANNEL3 = FLEX_INT3_IRQn,
emilmont 44:24d45a770a51 147 CHANNEL4 = FLEX_INT4_IRQn,
emilmont 44:24d45a770a51 148 CHANNEL5 = FLEX_INT5_IRQn,
emilmont 44:24d45a770a51 149 CHANNEL6 = FLEX_INT6_IRQn,
emilmont 44:24d45a770a51 150 CHANNEL7 = FLEX_INT7_IRQn
emilmont 44:24d45a770a51 151 } Channel;
emilmont 44:24d45a770a51 152
emilmont 44:24d45a770a51 153 typedef enum {
emilmont 44:24d45a770a51 154 PullUp = 2,
emilmont 44:24d45a770a51 155 PullDown = 1,
emilmont 44:24d45a770a51 156 PullNone = 0,
emilmont 44:24d45a770a51 157 Repeater = 3,
emilmont 44:24d45a770a51 158 OpenDrain = 4
emilmont 44:24d45a770a51 159 } PinMode;
emilmont 44:24d45a770a51 160
emilmont 44:24d45a770a51 161 #ifdef __cplusplus
emilmont 44:24d45a770a51 162 }
emilmont 44:24d45a770a51 163 #endif
emilmont 44:24d45a770a51 164
emilmont 44:24d45a770a51 165 #endif