mbed library sources
Fork of mbed-src by
targets/hal/TARGET_NXP/TARGET_LPC13XX/PinNames.h@514:5e2f3330d475, 2015-04-14 (annotated)
- Committer:
- mbed_official
- Date:
- Tue Apr 14 22:15:07 2015 +0100
- Revision:
- 514:5e2f3330d475
- Parent:
- 402:09075a3b15e3
Synchronized with git revision 2198e68f76d9cfdf86b572faa943cda5b66af6b9
Full URL: https://github.com/mbedmicro/mbed/commit/2198e68f76d9cfdf86b572faa943cda5b66af6b9/
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
bogdanm | 13:0645d8841f51 | 1 | /* mbed Microcontroller Library |
bogdanm | 13:0645d8841f51 | 2 | * Copyright (c) 2006-2013 ARM Limited |
bogdanm | 13:0645d8841f51 | 3 | * |
bogdanm | 13:0645d8841f51 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
bogdanm | 13:0645d8841f51 | 5 | * you may not use this file except in compliance with the License. |
bogdanm | 13:0645d8841f51 | 6 | * You may obtain a copy of the License at |
bogdanm | 13:0645d8841f51 | 7 | * |
bogdanm | 13:0645d8841f51 | 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
bogdanm | 13:0645d8841f51 | 9 | * |
bogdanm | 13:0645d8841f51 | 10 | * Unless required by applicable law or agreed to in writing, software |
bogdanm | 13:0645d8841f51 | 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
bogdanm | 13:0645d8841f51 | 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
bogdanm | 13:0645d8841f51 | 13 | * See the License for the specific language governing permissions and |
bogdanm | 13:0645d8841f51 | 14 | * limitations under the License. |
bogdanm | 13:0645d8841f51 | 15 | */ |
bogdanm | 13:0645d8841f51 | 16 | #ifndef MBED_PINNAMES_H |
bogdanm | 13:0645d8841f51 | 17 | #define MBED_PINNAMES_H |
bogdanm | 13:0645d8841f51 | 18 | |
bogdanm | 13:0645d8841f51 | 19 | #include "cmsis.h" |
bogdanm | 13:0645d8841f51 | 20 | |
bogdanm | 13:0645d8841f51 | 21 | #ifdef __cplusplus |
bogdanm | 13:0645d8841f51 | 22 | extern "C" { |
bogdanm | 13:0645d8841f51 | 23 | #endif |
bogdanm | 13:0645d8841f51 | 24 | |
bogdanm | 13:0645d8841f51 | 25 | typedef enum { |
bogdanm | 13:0645d8841f51 | 26 | PIN_INPUT, |
bogdanm | 13:0645d8841f51 | 27 | PIN_OUTPUT |
bogdanm | 13:0645d8841f51 | 28 | } PinDirection; |
bogdanm | 13:0645d8841f51 | 29 | |
bogdanm | 13:0645d8841f51 | 30 | #define PORT_SHIFT 5 |
bogdanm | 13:0645d8841f51 | 31 | |
bogdanm | 13:0645d8841f51 | 32 | typedef enum { |
bogdanm | 13:0645d8841f51 | 33 | // LPC1347 Pin Names |
bogdanm | 13:0645d8841f51 | 34 | P0_0 = 0, |
bogdanm | 13:0645d8841f51 | 35 | P0_1 = 1, |
bogdanm | 13:0645d8841f51 | 36 | P0_2 = 2, |
bogdanm | 13:0645d8841f51 | 37 | P0_3 = 3, |
bogdanm | 13:0645d8841f51 | 38 | P0_4 = 4, |
bogdanm | 13:0645d8841f51 | 39 | P0_5 = 5, |
bogdanm | 13:0645d8841f51 | 40 | P0_6 = 6, |
bogdanm | 13:0645d8841f51 | 41 | P0_7 = 7, |
bogdanm | 13:0645d8841f51 | 42 | P0_8 = 8, |
bogdanm | 13:0645d8841f51 | 43 | P0_9 = 9, |
bogdanm | 13:0645d8841f51 | 44 | P0_10 = 10, |
bogdanm | 13:0645d8841f51 | 45 | P0_11 = 11, |
bogdanm | 13:0645d8841f51 | 46 | P0_12 = 12, |
bogdanm | 13:0645d8841f51 | 47 | P0_13 = 13, |
bogdanm | 13:0645d8841f51 | 48 | P0_14 = 14, |
bogdanm | 13:0645d8841f51 | 49 | P0_15 = 15, |
bogdanm | 13:0645d8841f51 | 50 | P0_16 = 16, |
bogdanm | 13:0645d8841f51 | 51 | P0_17 = 17, |
bogdanm | 13:0645d8841f51 | 52 | P0_18 = 18, |
bogdanm | 13:0645d8841f51 | 53 | P0_19 = 19, |
bogdanm | 13:0645d8841f51 | 54 | P0_20 = 20, |
bogdanm | 13:0645d8841f51 | 55 | P0_21 = 21, |
bogdanm | 13:0645d8841f51 | 56 | P0_22 = 22, |
bogdanm | 13:0645d8841f51 | 57 | P0_23 = 23, |
bogdanm | 13:0645d8841f51 | 58 | |
bogdanm | 13:0645d8841f51 | 59 | P1_13 = 45, |
bogdanm | 13:0645d8841f51 | 60 | P1_14 = 46, |
bogdanm | 13:0645d8841f51 | 61 | P1_15 = 47, |
bogdanm | 13:0645d8841f51 | 62 | P1_16 = 48, |
bogdanm | 13:0645d8841f51 | 63 | |
bogdanm | 13:0645d8841f51 | 64 | P1_19 = 51, |
bogdanm | 13:0645d8841f51 | 65 | P1_20 = 52, |
bogdanm | 13:0645d8841f51 | 66 | P1_21 = 53, |
bogdanm | 13:0645d8841f51 | 67 | P1_22 = 54, |
bogdanm | 13:0645d8841f51 | 68 | P1_23 = 55, |
bogdanm | 13:0645d8841f51 | 69 | P1_24 = 56, |
bogdanm | 13:0645d8841f51 | 70 | P1_25 = 57, |
bogdanm | 13:0645d8841f51 | 71 | P1_26 = 58, |
bogdanm | 13:0645d8841f51 | 72 | P1_27 = 59, |
bogdanm | 13:0645d8841f51 | 73 | P1_28 = 60, |
bogdanm | 13:0645d8841f51 | 74 | P1_29 = 61, |
bogdanm | 13:0645d8841f51 | 75 | |
bogdanm | 13:0645d8841f51 | 76 | P1_31 = 63, |
bogdanm | 13:0645d8841f51 | 77 | |
bogdanm | 13:0645d8841f51 | 78 | // DIP Pin Names |
bogdanm | 13:0645d8841f51 | 79 | p1 = P0_0, |
bogdanm | 13:0645d8841f51 | 80 | p2 = P0_11, |
bogdanm | 13:0645d8841f51 | 81 | p3 = P0_12, |
bogdanm | 13:0645d8841f51 | 82 | p4 = P0_13, |
bogdanm | 13:0645d8841f51 | 83 | p5 = P0_14, |
bogdanm | 13:0645d8841f51 | 84 | p6 = P1_31, |
bogdanm | 13:0645d8841f51 | 85 | p8 = P0_16, |
bogdanm | 13:0645d8841f51 | 86 | p9 = P0_22, |
bogdanm | 13:0645d8841f51 | 87 | p10 = P0_23, |
bogdanm | 13:0645d8841f51 | 88 | p13 = P1_29, |
bogdanm | 13:0645d8841f51 | 89 | p14 = P1_21, |
bogdanm | 13:0645d8841f51 | 90 | p15 = P0_8, |
bogdanm | 13:0645d8841f51 | 91 | p16 = P0_9, |
bogdanm | 13:0645d8841f51 | 92 | p17 = P1_24, |
bogdanm | 13:0645d8841f51 | 93 | p18 = P0_4, |
bogdanm | 13:0645d8841f51 | 94 | p19 = P1_13, |
bogdanm | 13:0645d8841f51 | 95 | p20 = P1_14, |
bogdanm | 13:0645d8841f51 | 96 | p21 = P1_22, |
bogdanm | 13:0645d8841f51 | 97 | p22 = P0_17, |
bogdanm | 13:0645d8841f51 | 98 | p23 = P0_5, |
bogdanm | 13:0645d8841f51 | 99 | p24 = P0_21, |
bogdanm | 13:0645d8841f51 | 100 | p25 = P0_19, |
bogdanm | 13:0645d8841f51 | 101 | p26 = P0_18, |
bogdanm | 13:0645d8841f51 | 102 | p27 = P1_15, |
bogdanm | 13:0645d8841f51 | 103 | p28 = P1_16, |
bogdanm | 13:0645d8841f51 | 104 | p29 = P1_25, |
bogdanm | 13:0645d8841f51 | 105 | p30 = P1_19, |
bogdanm | 13:0645d8841f51 | 106 | p33 = P0_20, |
bogdanm | 13:0645d8841f51 | 107 | p34 = P0_2, |
bogdanm | 13:0645d8841f51 | 108 | p35 = P1_26, |
bogdanm | 13:0645d8841f51 | 109 | p36 = P1_27, |
bogdanm | 13:0645d8841f51 | 110 | p37 = P1_20, |
bogdanm | 13:0645d8841f51 | 111 | p38 = P1_23, |
bogdanm | 13:0645d8841f51 | 112 | p39 = P0_7, |
bogdanm | 13:0645d8841f51 | 113 | p40 = P1_28, |
bogdanm | 13:0645d8841f51 | 114 | |
bogdanm | 13:0645d8841f51 | 115 | UART_TX = P0_19, |
bogdanm | 13:0645d8841f51 | 116 | UART_RX = P0_18, |
bogdanm | 13:0645d8841f51 | 117 | |
bogdanm | 13:0645d8841f51 | 118 | // Not connected |
bogdanm | 13:0645d8841f51 | 119 | NC = (int)0xFFFFFFFF, |
bogdanm | 13:0645d8841f51 | 120 | |
bogdanm | 13:0645d8841f51 | 121 | LED1 = p21, |
bogdanm | 13:0645d8841f51 | 122 | LED2 = p21, |
bogdanm | 13:0645d8841f51 | 123 | LED3 = p21, |
mbed_official | 402:09075a3b15e3 | 124 | LED4 = p21, |
mbed_official | 402:09075a3b15e3 | 125 | |
mbed_official | 402:09075a3b15e3 | 126 | // Standard but not supported pins |
mbed_official | 402:09075a3b15e3 | 127 | USBTX = NC, |
mbed_official | 402:09075a3b15e3 | 128 | USBRX = NC, |
mbed_official | 402:09075a3b15e3 | 129 | |
bogdanm | 13:0645d8841f51 | 130 | } PinName; |
bogdanm | 13:0645d8841f51 | 131 | |
bogdanm | 13:0645d8841f51 | 132 | typedef enum { |
bogdanm | 13:0645d8841f51 | 133 | CHANNEL0 = PIN_INT0_IRQn, |
bogdanm | 13:0645d8841f51 | 134 | CHANNEL1 = PIN_INT1_IRQn, |
bogdanm | 13:0645d8841f51 | 135 | CHANNEL2 = PIN_INT2_IRQn, |
bogdanm | 13:0645d8841f51 | 136 | CHANNEL3 = PIN_INT3_IRQn, |
bogdanm | 13:0645d8841f51 | 137 | CHANNEL4 = PIN_INT4_IRQn, |
bogdanm | 13:0645d8841f51 | 138 | CHANNEL5 = PIN_INT5_IRQn, |
bogdanm | 13:0645d8841f51 | 139 | CHANNEL6 = PIN_INT6_IRQn, |
bogdanm | 13:0645d8841f51 | 140 | CHANNEL7 = PIN_INT7_IRQn |
bogdanm | 13:0645d8841f51 | 141 | } Channel; |
bogdanm | 13:0645d8841f51 | 142 | |
bogdanm | 13:0645d8841f51 | 143 | typedef enum { |
bogdanm | 13:0645d8841f51 | 144 | PullUp = 2, |
bogdanm | 13:0645d8841f51 | 145 | PullDown = 1, |
bogdanm | 13:0645d8841f51 | 146 | PullNone = 0, |
bogdanm | 13:0645d8841f51 | 147 | Repeater = 3, |
mbed_official | 113:65a335a675de | 148 | OpenDrain = 4, |
mbed_official | 113:65a335a675de | 149 | PullDefault = PullDown |
bogdanm | 13:0645d8841f51 | 150 | } PinMode; |
bogdanm | 13:0645d8841f51 | 151 | |
bogdanm | 13:0645d8841f51 | 152 | #ifdef __cplusplus |
bogdanm | 13:0645d8841f51 | 153 | } |
bogdanm | 13:0645d8841f51 | 154 | #endif |
bogdanm | 13:0645d8841f51 | 155 | |
bogdanm | 13:0645d8841f51 | 156 | #endif |