...

Dependents:   2doejemplo Labo_TRSE_Drone

Fork of mbed by mbed official

Committer:
bogdanm
Date:
Mon Aug 19 13:34:54 2013 +0300
Revision:
66:9c8f0e3462fb
Parent:
64:e3affc9e7238
New mbed library build with support for LPC1114.

Built from github tag 'mbed_lib_rev66'

Who changed what in which revision?

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