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