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