mbed library sources

Fork of mbed-src by mbed official

Committer:
mbed_official
Date:
Mon Mar 10 11:30:07 2014 +0000
Revision:
113:65a335a675de
Parent:
20:4263a77256ae
Synchronized with git revision 423ddcb86e83e2e0d599ca7106d436eb3c47e6dd

Full URL: https://github.com/mbedmicro/mbed/commit/423ddcb86e83e2e0d599ca7106d436eb3c47e6dd/

proposed change of gpio_api (new update pull request)

Who changed what in which revision?

UserRevisionLine numberNew contents of line
bogdanm 20:4263a77256ae 1 /* mbed Microcontroller Library
bogdanm 20:4263a77256ae 2 * Copyright (c) 2006-2013 ARM Limited
bogdanm 20:4263a77256ae 3 *
bogdanm 20:4263a77256ae 4 * Licensed under the Apache License, Version 2.0 (the "License");
bogdanm 20:4263a77256ae 5 * you may not use this file except in compliance with the License.
bogdanm 20:4263a77256ae 6 * You may obtain a copy of the License at
bogdanm 20:4263a77256ae 7 *
bogdanm 20:4263a77256ae 8 * http://www.apache.org/licenses/LICENSE-2.0
bogdanm 20:4263a77256ae 9 *
bogdanm 20:4263a77256ae 10 * Unless required by applicable law or agreed to in writing, software
bogdanm 20:4263a77256ae 11 * distributed under the License is distributed on an "AS IS" BASIS,
bogdanm 20:4263a77256ae 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
bogdanm 20:4263a77256ae 13 * See the License for the specific language governing permissions and
bogdanm 20:4263a77256ae 14 * limitations under the License.
bogdanm 20:4263a77256ae 15 */
bogdanm 20:4263a77256ae 16 #ifndef MBED_PINNAMES_H
bogdanm 20:4263a77256ae 17 #define MBED_PINNAMES_H
bogdanm 20:4263a77256ae 18
bogdanm 20:4263a77256ae 19 #include "cmsis.h"
bogdanm 20:4263a77256ae 20
bogdanm 20:4263a77256ae 21 #ifdef __cplusplus
bogdanm 20:4263a77256ae 22 extern "C" {
bogdanm 20:4263a77256ae 23 #endif
bogdanm 20:4263a77256ae 24
bogdanm 20:4263a77256ae 25 typedef enum {
bogdanm 20:4263a77256ae 26 PIN_INPUT,
bogdanm 20:4263a77256ae 27 PIN_OUTPUT
bogdanm 20:4263a77256ae 28 } PinDirection;
bogdanm 20:4263a77256ae 29
bogdanm 20:4263a77256ae 30 #define PORT_SHIFT 5
bogdanm 20:4263a77256ae 31 #define NO_GPIO 15
bogdanm 20:4263a77256ae 32
bogdanm 20:4263a77256ae 33 // On the LPC43xx the MCU pin name and the GPIO pin name are not the same.
bogdanm 20:4263a77256ae 34 // Encode SCU and GPIO offsets as a pin identifier
bogdanm 20:4263a77256ae 35 #define MBED_PIN(group, num, port, pin) ((SCU_OFF(group,num) << 16) + GPIO_OFF(port,pin))
bogdanm 20:4263a77256ae 36
bogdanm 20:4263a77256ae 37 // Decode pin identifier into register, port and pin values
bogdanm 20:4263a77256ae 38 #define MBED_SCU_REG(MBED_PIN) (LPC_SCU_BASE + (MBED_PIN >> 16))
bogdanm 20:4263a77256ae 39 #define MBED_GPIO_REG(MBED_PIN) (LPC_GPIO_PORT_BASE + 0x2000 + ((MBED_PIN >> (PORT_SHIFT - 2)) & 0x0000003C))
bogdanm 20:4263a77256ae 40 #define MBED_GPIO_PORT(MBED_PIN) ((MBED_PIN >> PORT_SHIFT) & 0x0000000F)
bogdanm 20:4263a77256ae 41 #define MBED_GPIO_PIN(MBED_PIN) (MBED_PIN & 0x0000001F)
bogdanm 20:4263a77256ae 42
bogdanm 20:4263a77256ae 43 typedef enum {
bogdanm 20:4263a77256ae 44 // LPC43xx Pin Names
bogdanm 20:4263a77256ae 45 // All pins defined. Package determines which are available.
bogdanm 20:4263a77256ae 46 // LBGA256 TFBGA180 TFBGA100 LQFP208 LQFP144
bogdanm 20:4263a77256ae 47 // GPIO0 [15:0] [15:0] [15:6] [15:0] [15:0]
bogdanm 20:4263a77256ae 48 // [4:0]
bogdanm 20:4263a77256ae 49 // GPIO1 [15:0] [15:0] [15:0] [15:0] [15:0]
bogdanm 20:4263a77256ae 50 // GPIO2 [15:0] [15:0] [15:0] [15:0]
bogdanm 20:4263a77256ae 51 // GPIO3 [15:0] [15:0] [7] [15:0] [15:0]
bogdanm 20:4263a77256ae 52 // [5:3]
bogdanm 20:4263a77256ae 53 // [1:0]
bogdanm 20:4263a77256ae 54 // GPIO4 [15:0] [15:0] [15:0] [11]
bogdanm 20:4263a77256ae 55 // GPIO5 [26:0] [26:0] [11:0] [25:0] [18]
bogdanm 20:4263a77256ae 56 // [16:0]
bogdanm 20:4263a77256ae 57 // GPIO6 [30:0] [30:28] [30:20]
bogdanm 20:4263a77256ae 58 // [26:25] [5:0]
bogdanm 20:4263a77256ae 59 // GPIO7 [25:0] [4:0] [25:23]
bogdanm 20:4263a77256ae 60 // [21:17]
bogdanm 20:4263a77256ae 61 // --- --- --- --- ---
bogdanm 20:4263a77256ae 62 // Total 164 117 49 131 83
bogdanm 20:4263a77256ae 63
bogdanm 20:4263a77256ae 64 // Groups 0x00 - 0x0F : Digital pins
bogdanm 20:4263a77256ae 65 // * Digital pins support up to 8 functions
bogdanm 20:4263a77256ae 66 // Use func=0 for GPIO0-GPIO4, func=4 for GPIO5-GPIO7
bogdanm 20:4263a77256ae 67 // * High-drive pins default to 4 mA but can support 8, 14, 20 mA
bogdanm 20:4263a77256ae 68 P0_0 = MBED_PIN(0x00, 0, 0, 0), // GPIO0[0]
bogdanm 20:4263a77256ae 69 P0_1 = MBED_PIN(0x00, 1, 0, 1), // GPIO0[1]
bogdanm 20:4263a77256ae 70
bogdanm 20:4263a77256ae 71 P1_0 = MBED_PIN(0x01, 0, 0, 4), // GPIO0[4]
bogdanm 20:4263a77256ae 72 P1_1 = MBED_PIN(0x01, 1, 0, 8), // GPIO0[8]
bogdanm 20:4263a77256ae 73 P1_2 = MBED_PIN(0x01, 2, 0, 9), // GPIO0[9]
bogdanm 20:4263a77256ae 74 P1_3 = MBED_PIN(0x01, 3, 0, 10), // GPIO0[10]
bogdanm 20:4263a77256ae 75 P1_4 = MBED_PIN(0x01, 4, 0, 11), // GPIO0[11]
bogdanm 20:4263a77256ae 76 P1_5 = MBED_PIN(0x01, 5, 1, 8), // GPIO1[8]
bogdanm 20:4263a77256ae 77 P1_6 = MBED_PIN(0x01, 6, 1, 9), // GPIO1[9]
bogdanm 20:4263a77256ae 78 P1_7 = MBED_PIN(0x01, 7, 1, 0), // GPIO1[0]
bogdanm 20:4263a77256ae 79 P1_8 = MBED_PIN(0x01, 8, 1, 1), // GPIO1[1]
bogdanm 20:4263a77256ae 80 P1_9 = MBED_PIN(0x01, 9, 1, 2), // GPIO1[2]
bogdanm 20:4263a77256ae 81 P1_10 = MBED_PIN(0x01, 10, 1, 3), // GPIO1[3]
bogdanm 20:4263a77256ae 82 P1_11 = MBED_PIN(0x01, 11, 1, 4), // GPIO1[4]
bogdanm 20:4263a77256ae 83 P1_12 = MBED_PIN(0x01, 12, 1, 5), // GPIO1[5]
bogdanm 20:4263a77256ae 84 P1_13 = MBED_PIN(0x01, 13, 1, 6), // GPIO1[6]
bogdanm 20:4263a77256ae 85 P1_14 = MBED_PIN(0x01, 14, 1, 7), // GPIO1[7]
bogdanm 20:4263a77256ae 86 P1_15 = MBED_PIN(0x01, 15, 0, 2), // GPIO0[2]
bogdanm 20:4263a77256ae 87 P1_16 = MBED_PIN(0x01, 16, 0, 3), // GPIO0[3]
bogdanm 20:4263a77256ae 88 P1_17 = MBED_PIN(0x01, 17, 0, 12), // GPIO0[12] high-drive
bogdanm 20:4263a77256ae 89 P1_18 = MBED_PIN(0x01, 18, 0, 13), // GPIO0[13]
bogdanm 20:4263a77256ae 90 P1_19 = MBED_PIN(0x01, 19, NO_GPIO, 0),
bogdanm 20:4263a77256ae 91 P1_20 = MBED_PIN(0x01, 20, 0, 15), // GPIO0[15]
bogdanm 20:4263a77256ae 92
bogdanm 20:4263a77256ae 93 P2_0 = MBED_PIN(0x02, 0, 5, 0), // GPIO5[0]
bogdanm 20:4263a77256ae 94 P2_1 = MBED_PIN(0x02, 1, 5, 1), // GPIO5[1]
bogdanm 20:4263a77256ae 95 P2_2 = MBED_PIN(0x02, 2, 5, 2), // GPIO5[2]
bogdanm 20:4263a77256ae 96 P2_3 = MBED_PIN(0x02, 3, 5, 3), // GPIO5[3] high-drive
bogdanm 20:4263a77256ae 97 P2_4 = MBED_PIN(0x02, 4, 5, 4), // GPIO5[4] high-drive
bogdanm 20:4263a77256ae 98 P2_5 = MBED_PIN(0x02, 5, 5, 5), // GPIO5[5] high-drive
bogdanm 20:4263a77256ae 99 P2_6 = MBED_PIN(0x02, 6, 5, 6), // GPIO5[6]
bogdanm 20:4263a77256ae 100 P2_7 = MBED_PIN(0x02, 7, 0, 7), // GPIO0[7]
bogdanm 20:4263a77256ae 101 P2_8 = MBED_PIN(0x02, 8, 5, 7), // GPIO5[7]
bogdanm 20:4263a77256ae 102 P2_9 = MBED_PIN(0x02, 9, 1, 10), // GPIO1[10]
bogdanm 20:4263a77256ae 103 P2_10 = MBED_PIN(0x02, 10, 0, 14), // GPIO0[14]
bogdanm 20:4263a77256ae 104 P2_11 = MBED_PIN(0x02, 11, 1, 11), // GPIO1[11]
bogdanm 20:4263a77256ae 105 P2_12 = MBED_PIN(0x02, 12, 1, 12), // GPIO1[12]
bogdanm 20:4263a77256ae 106 P2_13 = MBED_PIN(0x02, 13, 1, 13), // GPIO1[13]
bogdanm 20:4263a77256ae 107
bogdanm 20:4263a77256ae 108 P3_0 = MBED_PIN(0x03, 0, NO_GPIO, 0),
bogdanm 20:4263a77256ae 109 P3_1 = MBED_PIN(0x03, 1, 5, 8), // GPIO5[8]
bogdanm 20:4263a77256ae 110 P3_2 = MBED_PIN(0x03, 2, 5, 9), // GPIO5[9]
bogdanm 20:4263a77256ae 111 P3_3 = MBED_PIN(0x03, 3, NO_GPIO, 0),
bogdanm 20:4263a77256ae 112 P3_4 = MBED_PIN(0x03, 4, 1, 14), // GPIO1[14]
bogdanm 20:4263a77256ae 113 P3_5 = MBED_PIN(0x03, 5, 1, 15), // GPIO1[15]
bogdanm 20:4263a77256ae 114 P3_6 = MBED_PIN(0x03, 6, 0, 6), // GPIO0[6]
bogdanm 20:4263a77256ae 115 P3_7 = MBED_PIN(0x03, 7, 5, 10), // GPIO5[10]
bogdanm 20:4263a77256ae 116 P3_8 = MBED_PIN(0x03, 8, 5, 11), // GPIO5[11]
bogdanm 20:4263a77256ae 117
bogdanm 20:4263a77256ae 118 P4_0 = MBED_PIN(0x04, 0, 2, 0), // GPIO2[0]
bogdanm 20:4263a77256ae 119 P4_1 = MBED_PIN(0x04, 1, 2, 1), // GPIO2[1]
bogdanm 20:4263a77256ae 120 P4_2 = MBED_PIN(0x04, 2, 2, 2), // GPIO2[2]
bogdanm 20:4263a77256ae 121 P4_3 = MBED_PIN(0x04, 3, 2, 3), // GPIO2[3]
bogdanm 20:4263a77256ae 122 P4_4 = MBED_PIN(0x04, 4, 2, 4), // GPIO2[4]
bogdanm 20:4263a77256ae 123 P4_5 = MBED_PIN(0x04, 5, 2, 5), // GPIO2[5]
bogdanm 20:4263a77256ae 124 P4_6 = MBED_PIN(0x04, 6, 2, 6), // GPIO2[6]
bogdanm 20:4263a77256ae 125 P4_7 = MBED_PIN(0x04, 7, NO_GPIO, 0),
bogdanm 20:4263a77256ae 126 P4_8 = MBED_PIN(0x04, 8, 5, 12), // GPIO5[12]
bogdanm 20:4263a77256ae 127 P4_9 = MBED_PIN(0x04, 9, 5, 13), // GPIO5[13]
bogdanm 20:4263a77256ae 128 P4_10 = MBED_PIN(0x04, 10, 5, 14), // GPIO5[14]
bogdanm 20:4263a77256ae 129
bogdanm 20:4263a77256ae 130 P5_0 = MBED_PIN(0x05, 0, 2, 9), // GPIO2[9]
bogdanm 20:4263a77256ae 131 P5_1 = MBED_PIN(0x05, 1, 2, 10), // GPIO2[10]
bogdanm 20:4263a77256ae 132 P5_2 = MBED_PIN(0x05, 2, 2, 11), // GPIO2[11]
bogdanm 20:4263a77256ae 133 P5_3 = MBED_PIN(0x05, 3, 2, 12), // GPIO2[12]
bogdanm 20:4263a77256ae 134 P5_4 = MBED_PIN(0x05, 4, 2, 13), // GPIO2[13]
bogdanm 20:4263a77256ae 135 P5_5 = MBED_PIN(0x05, 5, 2, 14), // GPIO2[14]
bogdanm 20:4263a77256ae 136 P5_6 = MBED_PIN(0x05, 6, 2, 15), // GPIO2[15]
bogdanm 20:4263a77256ae 137 P5_7 = MBED_PIN(0x05, 7, 2, 7), // GPIO2[7]
bogdanm 20:4263a77256ae 138
bogdanm 20:4263a77256ae 139 P6_0 = MBED_PIN(0x06, 0, NO_GPIO, 0),
bogdanm 20:4263a77256ae 140 P6_1 = MBED_PIN(0x06, 1, 3, 0), // GPIO3[0]
bogdanm 20:4263a77256ae 141 P6_2 = MBED_PIN(0x06, 2, 3, 1), // GPIO3[1]
bogdanm 20:4263a77256ae 142 P6_3 = MBED_PIN(0x06, 3, 3, 2), // GPIO3[2]
bogdanm 20:4263a77256ae 143 P6_4 = MBED_PIN(0x06, 4, 3, 3), // GPIO3[3]
bogdanm 20:4263a77256ae 144 P6_5 = MBED_PIN(0x06, 5, 3, 4), // GPIO3[4]
bogdanm 20:4263a77256ae 145 P6_6 = MBED_PIN(0x06, 6, 0, 5), // GPIO0[5]
bogdanm 20:4263a77256ae 146 P6_7 = MBED_PIN(0x06, 7, 5, 15), // GPIO5[15]
bogdanm 20:4263a77256ae 147 P6_8 = MBED_PIN(0x06, 8, 5, 16), // GPIO5[16]
bogdanm 20:4263a77256ae 148 P6_9 = MBED_PIN(0x06, 9, 3, 5), // GPIO3[5]
bogdanm 20:4263a77256ae 149 P6_10 = MBED_PIN(0x06, 10, 3, 6), // GPIO3[6]
bogdanm 20:4263a77256ae 150 P6_11 = MBED_PIN(0x06, 11, 3, 7), // GPIO3[7]
bogdanm 20:4263a77256ae 151 P6_12 = MBED_PIN(0x06, 12, 2, 8), // GPIO2[8]
bogdanm 20:4263a77256ae 152
bogdanm 20:4263a77256ae 153 P7_0 = MBED_PIN(0x07, 0, 3, 8), // GPIO3[8]
bogdanm 20:4263a77256ae 154 P7_1 = MBED_PIN(0x07, 1, 3, 9), // GPIO3[9]
bogdanm 20:4263a77256ae 155 P7_2 = MBED_PIN(0x07, 2, 3, 10), // GPIO3[10]
bogdanm 20:4263a77256ae 156 P7_3 = MBED_PIN(0x07, 3, 3, 11), // GPIO3[11]
bogdanm 20:4263a77256ae 157 P7_4 = MBED_PIN(0x07, 4, 3, 12), // GPIO3[12]
bogdanm 20:4263a77256ae 158 P7_5 = MBED_PIN(0x07, 5, 3, 13), // GPIO3[13]
bogdanm 20:4263a77256ae 159 P7_6 = MBED_PIN(0x07, 6, 3, 14), // GPIO3[14]
bogdanm 20:4263a77256ae 160 P7_7 = MBED_PIN(0x07, 7, 3, 15), // GPIO3[15]
bogdanm 20:4263a77256ae 161
bogdanm 20:4263a77256ae 162 P8_0 = MBED_PIN(0x08, 8, 4, 0), // GPIO4[0] high-drive
bogdanm 20:4263a77256ae 163 P8_1 = MBED_PIN(0x09, 0, 4, 1), // GPIO4[1] high-drive
bogdanm 20:4263a77256ae 164 P8_2 = MBED_PIN(0x09, 1, 4, 2), // GPIO4[2] high-drive
bogdanm 20:4263a77256ae 165 P8_3 = MBED_PIN(0x09, 2, 4, 3), // GPIO4[3]
bogdanm 20:4263a77256ae 166 P8_4 = MBED_PIN(0x08, 4, 4, 4), // GPIO4[4]
bogdanm 20:4263a77256ae 167 P8_5 = MBED_PIN(0x08, 5, 4, 5), // GPIO4[5]
bogdanm 20:4263a77256ae 168 P8_6 = MBED_PIN(0x08, 6, 4, 6), // GPIO4[6]
bogdanm 20:4263a77256ae 169 P8_7 = MBED_PIN(0x08, 7, 4, 7), // GPIO4[7]
bogdanm 20:4263a77256ae 170 P8_8 = MBED_PIN(0x08, 8, NO_GPIO, 0),
bogdanm 20:4263a77256ae 171
bogdanm 20:4263a77256ae 172 P9_0 = MBED_PIN(0x09, 0, 4, 12), // GPIO4[12]
bogdanm 20:4263a77256ae 173 P9_1 = MBED_PIN(0x09, 1, 4, 13), // GPIO4[13]
bogdanm 20:4263a77256ae 174 P9_2 = MBED_PIN(0x09, 2, 4, 14), // GPIO4[14]
bogdanm 20:4263a77256ae 175 P9_3 = MBED_PIN(0x09, 3, 4, 15), // GPIO4[15]
bogdanm 20:4263a77256ae 176 P9_4 = MBED_PIN(0x09, 4, 5, 17), // GPIO5[17]
bogdanm 20:4263a77256ae 177 P9_5 = MBED_PIN(0x09, 5, 5, 18), // GPIO5[18]
bogdanm 20:4263a77256ae 178 P9_6 = MBED_PIN(0x09, 6, 4, 11), // GPIO4[11]
bogdanm 20:4263a77256ae 179
bogdanm 20:4263a77256ae 180 PA_0 = MBED_PIN(0x0A, 0, NO_GPIO, 0),
bogdanm 20:4263a77256ae 181 PA_1 = MBED_PIN(0x0A, 1, 4, 8), // GPIO4[8] high-drive
bogdanm 20:4263a77256ae 182 PA_2 = MBED_PIN(0x0A, 2, 4, 9), // GPIO4[9] high-drive
bogdanm 20:4263a77256ae 183 PA_3 = MBED_PIN(0x0A, 3, 4, 10), // GPIO4[10] high-drive
bogdanm 20:4263a77256ae 184 PA_4 = MBED_PIN(0x0A, 4, 5, 19), // GPIO5[19]
bogdanm 20:4263a77256ae 185
bogdanm 20:4263a77256ae 186 PB_0 = MBED_PIN(0x0B, 0, 5, 20), // GPIO5[20]
bogdanm 20:4263a77256ae 187 PB_1 = MBED_PIN(0x0B, 1, 5, 21), // GPIO5[21]
bogdanm 20:4263a77256ae 188 PB_2 = MBED_PIN(0x0B, 2, 5, 22), // GPIO5[22]
bogdanm 20:4263a77256ae 189 PB_3 = MBED_PIN(0x0B, 3, 5, 23), // GPIO5[23]
bogdanm 20:4263a77256ae 190 PB_4 = MBED_PIN(0x0B, 4, 5, 24), // GPIO5[24]
bogdanm 20:4263a77256ae 191 PB_5 = MBED_PIN(0x0B, 5, 5, 25), // GPIO5[25]
bogdanm 20:4263a77256ae 192 PB_6 = MBED_PIN(0x0B, 6, 5, 26), // GPIO5[26]
bogdanm 20:4263a77256ae 193
bogdanm 20:4263a77256ae 194 PC_0 = MBED_PIN(0x0C, 0, NO_GPIO, 0),
bogdanm 20:4263a77256ae 195 PC_1 = MBED_PIN(0x0C, 1, 6, 0), // GPIO6[0]
bogdanm 20:4263a77256ae 196 PC_2 = MBED_PIN(0x0C, 2, 6, 1), // GPIO6[1]
bogdanm 20:4263a77256ae 197 PC_3 = MBED_PIN(0x0C, 3, 6, 2), // GPIO6[2]
bogdanm 20:4263a77256ae 198 PC_4 = MBED_PIN(0x0C, 4, 6, 3), // GPIO6[3]
bogdanm 20:4263a77256ae 199 PC_5 = MBED_PIN(0x0C, 5, 6, 4), // GPIO6[4]
bogdanm 20:4263a77256ae 200 PC_6 = MBED_PIN(0x0C, 6, 6, 5), // GPIO6[5]
bogdanm 20:4263a77256ae 201 PC_7 = MBED_PIN(0x0C, 7, 6, 6), // GPIO6[6]
bogdanm 20:4263a77256ae 202 PC_8 = MBED_PIN(0x0C, 8, 6, 7), // GPIO6[7]
bogdanm 20:4263a77256ae 203 PC_9 = MBED_PIN(0x0C, 9, 6, 8), // GPIO6[8]
bogdanm 20:4263a77256ae 204 PC_10 = MBED_PIN(0x0C, 10, 6, 9), // GPIO6[9]
bogdanm 20:4263a77256ae 205 PC_11 = MBED_PIN(0x0C, 11, 6, 10), // GPIO6[10]
bogdanm 20:4263a77256ae 206 PC_12 = MBED_PIN(0x0C, 12, 6, 11), // GPIO6[11]
bogdanm 20:4263a77256ae 207 PC_13 = MBED_PIN(0x0C, 13, 6, 12), // GPIO6[12]
bogdanm 20:4263a77256ae 208 PC_14 = MBED_PIN(0x0C, 14, 6, 13), // GPIO6[13]
bogdanm 20:4263a77256ae 209
bogdanm 20:4263a77256ae 210 PD_0 = MBED_PIN(0x0D, 0, 6, 14), // GPIO6[14]
bogdanm 20:4263a77256ae 211 PD_1 = MBED_PIN(0x0D, 1, 6, 15), // GPIO6[15]
bogdanm 20:4263a77256ae 212 PD_2 = MBED_PIN(0x0D, 2, 6, 16), // GPIO6[16]
bogdanm 20:4263a77256ae 213 PD_3 = MBED_PIN(0x0D, 3, 6, 17), // GPIO6[17]
bogdanm 20:4263a77256ae 214 PD_4 = MBED_PIN(0x0D, 4, 6, 18), // GPIO6[18]
bogdanm 20:4263a77256ae 215 PD_5 = MBED_PIN(0x0D, 5, 6, 19), // GPIO6[19]
bogdanm 20:4263a77256ae 216 PD_6 = MBED_PIN(0x0D, 6, 6, 20), // GPIO6[20]
bogdanm 20:4263a77256ae 217 PD_7 = MBED_PIN(0x0D, 7, 6, 21), // GPIO6[21]
bogdanm 20:4263a77256ae 218 PD_8 = MBED_PIN(0x0D, 8, 6, 22), // GPIO6[22]
bogdanm 20:4263a77256ae 219 PD_9 = MBED_PIN(0x0D, 9, 6, 23), // GPIO6[23]
bogdanm 20:4263a77256ae 220 PD_10 = MBED_PIN(0x0D, 10, 6, 24), // GPIO6[24]
bogdanm 20:4263a77256ae 221 PD_11 = MBED_PIN(0x0D, 11, 6, 25), // GPIO6[25]
bogdanm 20:4263a77256ae 222 PD_12 = MBED_PIN(0x0D, 12, 6, 26), // GPIO6[26]
bogdanm 20:4263a77256ae 223 PD_13 = MBED_PIN(0x0D, 13, 6, 27), // GPIO6[27]
bogdanm 20:4263a77256ae 224 PD_14 = MBED_PIN(0x0D, 14, 6, 28), // GPIO6[28]
bogdanm 20:4263a77256ae 225 PD_15 = MBED_PIN(0x0D, 15, 6, 29), // GPIO6[29]
bogdanm 20:4263a77256ae 226 PD_16 = MBED_PIN(0x0D, 16, 6, 30), // GPIO6[30]
bogdanm 20:4263a77256ae 227
bogdanm 20:4263a77256ae 228 PE_0 = MBED_PIN(0x0E, 0, 7, 0), // GPIO7[0]
bogdanm 20:4263a77256ae 229 PE_1 = MBED_PIN(0x0E, 1, 7, 1), // GPIO7[1]
bogdanm 20:4263a77256ae 230 PE_2 = MBED_PIN(0x0E, 2, 7, 2), // GPIO7[2]
bogdanm 20:4263a77256ae 231 PE_3 = MBED_PIN(0x0E, 3, 7, 3), // GPIO7[3]
bogdanm 20:4263a77256ae 232 PE_4 = MBED_PIN(0x0E, 4, 7, 4), // GPIO7[4]
bogdanm 20:4263a77256ae 233 PE_5 = MBED_PIN(0x0E, 5, 7, 5), // GPIO7[5]
bogdanm 20:4263a77256ae 234 PE_6 = MBED_PIN(0x0E, 6, 7, 6), // GPIO7[6]
bogdanm 20:4263a77256ae 235 PE_7 = MBED_PIN(0x0E, 7, 7, 7), // GPIO7[7]
bogdanm 20:4263a77256ae 236 PE_8 = MBED_PIN(0x0E, 8, 7, 8), // GPIO7[8]
bogdanm 20:4263a77256ae 237 PE_9 = MBED_PIN(0x0E, 9, 7, 9), // GPIO7[9]
bogdanm 20:4263a77256ae 238 PE_10 = MBED_PIN(0x0E, 10, 7, 10), // GPIO7[10]
bogdanm 20:4263a77256ae 239 PE_11 = MBED_PIN(0x0E, 11, 7, 11), // GPIO7[11]
bogdanm 20:4263a77256ae 240 PE_12 = MBED_PIN(0x0E, 12, 7, 12), // GPIO7[12]
bogdanm 20:4263a77256ae 241 PE_13 = MBED_PIN(0x0E, 13, 7, 13), // GPIO7[13]
bogdanm 20:4263a77256ae 242 PE_14 = MBED_PIN(0x0E, 14, 7, 14), // GPIO7[14]
bogdanm 20:4263a77256ae 243 PE_15 = MBED_PIN(0x0E, 15, 7, 15), // GPIO7[15]
bogdanm 20:4263a77256ae 244
bogdanm 20:4263a77256ae 245 PF_0 = MBED_PIN(0x0F, 0, NO_GPIO, 0),
bogdanm 20:4263a77256ae 246 PF_1 = MBED_PIN(0x0F, 1, 7, 16), // GPIO7[16]
bogdanm 20:4263a77256ae 247 PF_2 = MBED_PIN(0x0F, 2, 7, 17), // GPIO7[17]
bogdanm 20:4263a77256ae 248 PF_3 = MBED_PIN(0x0F, 3, 7, 18), // GPIO7[18]
bogdanm 20:4263a77256ae 249 PF_4 = MBED_PIN(0x0F, 4, NO_GPIO, 0),
bogdanm 20:4263a77256ae 250 PF_5 = MBED_PIN(0x0F, 5, 7, 19), // GPIO7[19]
bogdanm 20:4263a77256ae 251 PF_6 = MBED_PIN(0x0F, 6, 7, 20), // GPIO7[20]
bogdanm 20:4263a77256ae 252 PF_7 = MBED_PIN(0x0F, 7, 7, 21), // GPIO7[21]
bogdanm 20:4263a77256ae 253 PF_8 = MBED_PIN(0x0F, 8, 7, 22), // GPIO7[22]
bogdanm 20:4263a77256ae 254 PF_9 = MBED_PIN(0x0F, 9, 7, 23), // GPIO7[23]
bogdanm 20:4263a77256ae 255 PF_10 = MBED_PIN(0x0F, 10, 7, 24), // GPIO7[24]
bogdanm 20:4263a77256ae 256 PF_11 = MBED_PIN(0x0F, 11, 7, 25), // GPIO7[25]
bogdanm 20:4263a77256ae 257
bogdanm 20:4263a77256ae 258 // GPIO pins from MCU pins
bogdanm 20:4263a77256ae 259 GPIO0_0 = P0_0,
bogdanm 20:4263a77256ae 260 GPIO0_1 = P0_1 ,
bogdanm 20:4263a77256ae 261 GPIO0_2 = P1_15,
bogdanm 20:4263a77256ae 262 GPIO0_3 = P1_16,
bogdanm 20:4263a77256ae 263 GPIO0_4 = P1_0,
bogdanm 20:4263a77256ae 264 GPIO0_5 = P6_6,
bogdanm 20:4263a77256ae 265 GPIO0_6 = P3_6,
bogdanm 20:4263a77256ae 266 GPIO0_7 = P2_7,
bogdanm 20:4263a77256ae 267 GPIO0_8 = P1_1,
bogdanm 20:4263a77256ae 268 GPIO0_9 = P1_2,
bogdanm 20:4263a77256ae 269 GPIO0_10 = P1_3,
bogdanm 20:4263a77256ae 270 GPIO0_11 = P1_4,
bogdanm 20:4263a77256ae 271 GPIO0_12 = P1_17,
bogdanm 20:4263a77256ae 272 GPIO0_13 = P1_18,
bogdanm 20:4263a77256ae 273 GPIO0_14 = P2_10,
bogdanm 20:4263a77256ae 274 GPIO0_15 = P1_20,
bogdanm 20:4263a77256ae 275
bogdanm 20:4263a77256ae 276 GPIO1_0 = P1_7,
bogdanm 20:4263a77256ae 277 GPIO1_1 = P1_8,
bogdanm 20:4263a77256ae 278 GPIO1_2 = P1_9,
bogdanm 20:4263a77256ae 279 GPIO1_3 = P1_10,
bogdanm 20:4263a77256ae 280 GPIO1_4 = P1_11,
bogdanm 20:4263a77256ae 281 GPIO1_5 = P1_12,
bogdanm 20:4263a77256ae 282 GPIO1_6 = P1_13,
bogdanm 20:4263a77256ae 283 GPIO1_7 = P1_14,
bogdanm 20:4263a77256ae 284 GPIO1_8 = P1_5,
bogdanm 20:4263a77256ae 285 GPIO1_9 = P1_6,
bogdanm 20:4263a77256ae 286 GPIO1_10 = P2_9,
bogdanm 20:4263a77256ae 287 GPIO1_11 = P2_11,
bogdanm 20:4263a77256ae 288 GPIO1_12 = P2_12,
bogdanm 20:4263a77256ae 289 GPIO1_13 = P2_13,
bogdanm 20:4263a77256ae 290 GPIO1_14 = P3_4,
bogdanm 20:4263a77256ae 291 GPIO1_15 = P3_5,
bogdanm 20:4263a77256ae 292
bogdanm 20:4263a77256ae 293 GPIO2_0 = P4_0,
bogdanm 20:4263a77256ae 294 GPIO2_1 = P4_1,
bogdanm 20:4263a77256ae 295 GPIO2_2 = P4_2,
bogdanm 20:4263a77256ae 296 GPIO2_3 = P4_3,
bogdanm 20:4263a77256ae 297 GPIO2_4 = P4_4,
bogdanm 20:4263a77256ae 298 GPIO2_5 = P4_5,
bogdanm 20:4263a77256ae 299 GPIO2_6 = P4_6,
bogdanm 20:4263a77256ae 300 GPIO2_7 = P5_7,
bogdanm 20:4263a77256ae 301 GPIO2_8 = P6_12,
bogdanm 20:4263a77256ae 302 GPIO2_9 = P5_0,
bogdanm 20:4263a77256ae 303 GPIO2_10 = P5_1,
bogdanm 20:4263a77256ae 304 GPIO2_11 = P5_2,
bogdanm 20:4263a77256ae 305 GPIO2_12 = P5_3,
bogdanm 20:4263a77256ae 306 GPIO2_13 = P5_4,
bogdanm 20:4263a77256ae 307 GPIO2_14 = P5_5,
bogdanm 20:4263a77256ae 308 GPIO2_15 = P5_6,
bogdanm 20:4263a77256ae 309
bogdanm 20:4263a77256ae 310 GPIO3_0 = P6_1,
bogdanm 20:4263a77256ae 311 GPIO3_1 = P6_2,
bogdanm 20:4263a77256ae 312 GPIO3_2 = P6_3,
bogdanm 20:4263a77256ae 313 GPIO3_3 = P6_4,
bogdanm 20:4263a77256ae 314 GPIO3_4 = P6_5,
bogdanm 20:4263a77256ae 315 GPIO3_5 = P6_9,
bogdanm 20:4263a77256ae 316 GPIO3_6 = P6_10,
bogdanm 20:4263a77256ae 317 GPIO3_7 = P6_11,
bogdanm 20:4263a77256ae 318 GPIO3_8 = P7_0,
bogdanm 20:4263a77256ae 319 GPIO3_9 = P7_1,
bogdanm 20:4263a77256ae 320 GPIO3_10 = P7_2,
bogdanm 20:4263a77256ae 321 GPIO3_11 = P7_3,
bogdanm 20:4263a77256ae 322 GPIO3_12 = P7_4,
bogdanm 20:4263a77256ae 323 GPIO3_13 = P7_5,
bogdanm 20:4263a77256ae 324 GPIO3_14 = P7_6,
bogdanm 20:4263a77256ae 325 GPIO3_15 = P7_7,
bogdanm 20:4263a77256ae 326
bogdanm 20:4263a77256ae 327 GPIO4_0 = P8_0,
bogdanm 20:4263a77256ae 328 GPIO4_1 = P8_1,
bogdanm 20:4263a77256ae 329 GPIO4_2 = P8_2,
bogdanm 20:4263a77256ae 330 GPIO4_3 = P8_3,
bogdanm 20:4263a77256ae 331 GPIO4_4 = P8_4,
bogdanm 20:4263a77256ae 332 GPIO4_5 = P8_5,
bogdanm 20:4263a77256ae 333 GPIO4_6 = P8_6,
bogdanm 20:4263a77256ae 334 GPIO4_7 = P8_7,
bogdanm 20:4263a77256ae 335 GPIO4_8 = PA_1,
bogdanm 20:4263a77256ae 336 GPIO4_9 = PA_2,
bogdanm 20:4263a77256ae 337 GPIO4_10 = PA_3,
bogdanm 20:4263a77256ae 338 GPIO4_11 = P9_6,
bogdanm 20:4263a77256ae 339 GPIO4_12 = P9_0,
bogdanm 20:4263a77256ae 340 GPIO4_13 = P9_1,
bogdanm 20:4263a77256ae 341 GPIO4_14 = P9_2,
bogdanm 20:4263a77256ae 342 GPIO4_15 = P9_3,
bogdanm 20:4263a77256ae 343
bogdanm 20:4263a77256ae 344 GPIO5_0 = P2_0,
bogdanm 20:4263a77256ae 345 GPIO5_1 = P2_1,
bogdanm 20:4263a77256ae 346 GPIO5_2 = P2_2,
bogdanm 20:4263a77256ae 347 GPIO5_3 = P2_3,
bogdanm 20:4263a77256ae 348 GPIO5_4 = P2_4,
bogdanm 20:4263a77256ae 349 GPIO5_5 = P2_5,
bogdanm 20:4263a77256ae 350 GPIO5_6 = P2_6,
bogdanm 20:4263a77256ae 351 GPIO5_7 = P2_8,
bogdanm 20:4263a77256ae 352 GPIO5_8 = P3_1,
bogdanm 20:4263a77256ae 353 GPIO5_9 = P3_2,
bogdanm 20:4263a77256ae 354 GPIO5_10 = P3_7,
bogdanm 20:4263a77256ae 355 GPIO5_11 = P3_8,
bogdanm 20:4263a77256ae 356 GPIO5_12 = P4_8,
bogdanm 20:4263a77256ae 357 GPIO5_13 = P4_9,
bogdanm 20:4263a77256ae 358 GPIO5_14 = P4_10,
bogdanm 20:4263a77256ae 359 GPIO5_15 = P6_7,
bogdanm 20:4263a77256ae 360 GPIO5_16 = P6_8,
bogdanm 20:4263a77256ae 361 GPIO5_17 = P9_4,
bogdanm 20:4263a77256ae 362 GPIO5_18 = P9_5,
bogdanm 20:4263a77256ae 363 GPIO5_19 = PA_4,
bogdanm 20:4263a77256ae 364 GPIO5_20 = PB_0,
bogdanm 20:4263a77256ae 365 GPIO5_21 = PB_1,
bogdanm 20:4263a77256ae 366 GPIO5_22 = PB_2,
bogdanm 20:4263a77256ae 367 GPIO5_23 = PB_3,
bogdanm 20:4263a77256ae 368 GPIO5_24 = PB_4,
bogdanm 20:4263a77256ae 369 GPIO5_25 = PB_5,
bogdanm 20:4263a77256ae 370 GPIO5_26 = PB_6,
bogdanm 20:4263a77256ae 371
bogdanm 20:4263a77256ae 372 GPIO6_0 = PC_1,
bogdanm 20:4263a77256ae 373 GPIO6_1 = PC_2,
bogdanm 20:4263a77256ae 374 GPIO6_2 = PC_3,
bogdanm 20:4263a77256ae 375 GPIO6_3 = PC_4,
bogdanm 20:4263a77256ae 376 GPIO6_4 = PC_5,
bogdanm 20:4263a77256ae 377 GPIO6_5 = PC_6,
bogdanm 20:4263a77256ae 378 GPIO6_6 = PC_7,
bogdanm 20:4263a77256ae 379 GPIO6_7 = PC_8,
bogdanm 20:4263a77256ae 380 GPIO6_8 = PC_9,
bogdanm 20:4263a77256ae 381 GPIO6_9 = PC_10,
bogdanm 20:4263a77256ae 382 GPIO6_10 = PC_11,
bogdanm 20:4263a77256ae 383 GPIO6_11 = PC_12,
bogdanm 20:4263a77256ae 384 GPIO6_12 = PC_13,
bogdanm 20:4263a77256ae 385 GPIO6_13 = PC_14,
bogdanm 20:4263a77256ae 386 GPIO6_14 = PD_0,
bogdanm 20:4263a77256ae 387 GPIO6_15 = PD_1,
bogdanm 20:4263a77256ae 388 GPIO6_16 = PD_2,
bogdanm 20:4263a77256ae 389 GPIO6_17 = PD_3,
bogdanm 20:4263a77256ae 390 GPIO6_18 = PD_4,
bogdanm 20:4263a77256ae 391 GPIO6_19 = PD_5,
bogdanm 20:4263a77256ae 392 GPIO6_20 = PD_6,
bogdanm 20:4263a77256ae 393 GPIO6_21 = PD_7,
bogdanm 20:4263a77256ae 394 GPIO6_22 = PD_8,
bogdanm 20:4263a77256ae 395 GPIO6_23 = PD_9,
bogdanm 20:4263a77256ae 396 GPIO6_24 = PD_10,
bogdanm 20:4263a77256ae 397 GPIO6_25 = PD_11,
bogdanm 20:4263a77256ae 398 GPIO6_26 = PD_12,
bogdanm 20:4263a77256ae 399 GPIO6_27 = PD_13,
bogdanm 20:4263a77256ae 400 GPIO6_28 = PD_14,
bogdanm 20:4263a77256ae 401 GPIO6_29 = PD_15,
bogdanm 20:4263a77256ae 402 GPIO6_30 = PD_16,
bogdanm 20:4263a77256ae 403
bogdanm 20:4263a77256ae 404 GPIO7_0 = PE_0,
bogdanm 20:4263a77256ae 405 GPIO7_1 = PE_1,
bogdanm 20:4263a77256ae 406 GPIO7_2 = PE_2,
bogdanm 20:4263a77256ae 407 GPIO7_3 = PE_3,
bogdanm 20:4263a77256ae 408 GPIO7_4 = PE_4,
bogdanm 20:4263a77256ae 409 GPIO7_5 = PE_5,
bogdanm 20:4263a77256ae 410 GPIO7_6 = PE_5,
bogdanm 20:4263a77256ae 411 GPIO7_7 = PE_7,
bogdanm 20:4263a77256ae 412 GPIO7_8 = PE_8,
bogdanm 20:4263a77256ae 413 GPIO7_9 = PE_9,
bogdanm 20:4263a77256ae 414 GPIO7_10 = PE_10,
bogdanm 20:4263a77256ae 415 GPIO7_11 = PE_11,
bogdanm 20:4263a77256ae 416 GPIO7_12 = PE_12,
bogdanm 20:4263a77256ae 417 GPIO7_13 = PE_13,
bogdanm 20:4263a77256ae 418 GPIO7_14 = PE_14,
bogdanm 20:4263a77256ae 419 GPIO7_15 = PE_15,
bogdanm 20:4263a77256ae 420 GPIO7_16 = PF_1,
bogdanm 20:4263a77256ae 421 GPIO7_17 = PF_2,
bogdanm 20:4263a77256ae 422 GPIO7_18 = PF_3,
bogdanm 20:4263a77256ae 423 GPIO7_19 = PF_5,
bogdanm 20:4263a77256ae 424 GPIO7_20 = PF_6,
bogdanm 20:4263a77256ae 425 GPIO7_21 = PF_7,
bogdanm 20:4263a77256ae 426 GPIO7_22 = PF_8,
bogdanm 20:4263a77256ae 427 GPIO7_23 = PF_9,
bogdanm 20:4263a77256ae 428 GPIO7_24 = PF_10,
bogdanm 20:4263a77256ae 429 GPIO7_25 = PF_11,
bogdanm 20:4263a77256ae 430
bogdanm 20:4263a77256ae 431 // Map mbed pin names to LPC43xx board signals
bogdanm 20:4263a77256ae 432
bogdanm 20:4263a77256ae 433 // Group 0x18 : CLKn pins
bogdanm 20:4263a77256ae 434 SFP_CLK0 = MBED_PIN(0x18, 0, 0, 0),
bogdanm 20:4263a77256ae 435 SFP_CLK1 = MBED_PIN(0x18, 1, 0, 0),
bogdanm 20:4263a77256ae 436 SFP_CLK2 = MBED_PIN(0x18, 2, 0, 0),
bogdanm 20:4263a77256ae 437 SFP_CLK3 = MBED_PIN(0x18, 3, 0, 0),
bogdanm 20:4263a77256ae 438
bogdanm 20:4263a77256ae 439 // Group 0x19 : USB1, I2C0, ADC0, ADC1
bogdanm 20:4263a77256ae 440 SFP_USB1 = MBED_PIN(0x19, 0, 0, 0),
bogdanm 20:4263a77256ae 441 SFP_I2C0 = MBED_PIN(0x19, 1, 0, 0),
bogdanm 20:4263a77256ae 442 SFP_AIO0 = MBED_PIN(0x19, 2, 0, 0), // ADC0 function select register
bogdanm 20:4263a77256ae 443 SFP_AIO1 = MBED_PIN(0x19, 3, 0, 0), // ADC1 function select register
bogdanm 20:4263a77256ae 444 SFP_AIO2 = MBED_PIN(0x19, 4, 0, 0), // Analog function select register
bogdanm 20:4263a77256ae 445
bogdanm 20:4263a77256ae 446 SFP_EMCD = MBED_PIN(0x1A, 0, 0, 0), // EMC clock delay register
bogdanm 20:4263a77256ae 447
bogdanm 20:4263a77256ae 448 SFP_INS0 = MBED_PIN(0x1C, 0, 0, 0), // Interrupt select for pin interrupts 0 to 3
bogdanm 20:4263a77256ae 449 SFP_INS1 = MBED_PIN(0x1C, 1, 0, 0), // Interrupt select for pin interrupts 4 to 7
bogdanm 20:4263a77256ae 450
bogdanm 20:4263a77256ae 451 #define MBED_ADC_NUM(MBED_PIN) ((MBED_PIN >> 5) & 0x0000000F)
bogdanm 20:4263a77256ae 452 #define MBED_ADC_CHAN(MBED_PIN) (MBED_PIN & 0x0000001F)
bogdanm 20:4263a77256ae 453
bogdanm 20:4263a77256ae 454 // Use pseudo-pin ID also for ADCs, although with special handling
bogdanm 20:4263a77256ae 455 SFP_ADC0_0 = MBED_PIN(0x19, 2, 0, 0), // ADC0_0
bogdanm 20:4263a77256ae 456 SFP_ADC0_1 = MBED_PIN(0x19, 2, 0, 1), // ADC0_1
bogdanm 20:4263a77256ae 457 SFP_ADC0_2 = MBED_PIN(0x19, 2, 0, 2), // ADC0_2
bogdanm 20:4263a77256ae 458 SFP_ADC0_3 = MBED_PIN(0x19, 2, 0, 3), // ADC0_3
bogdanm 20:4263a77256ae 459 SFP_ADC0_4 = MBED_PIN(0x19, 2, 0, 4), // ADC0_4
bogdanm 20:4263a77256ae 460 SFP_ADC0_5 = MBED_PIN(0x19, 2, 0, 5), // ADC0_5
bogdanm 20:4263a77256ae 461 SFP_ADC0_6 = MBED_PIN(0x19, 2, 0, 6), // ADC0_6
bogdanm 20:4263a77256ae 462
bogdanm 20:4263a77256ae 463 SFP_ADC1_0 = MBED_PIN(0x19, 3, 1, 0), // ADC1_0
bogdanm 20:4263a77256ae 464 SFP_ADC1_1 = MBED_PIN(0x19, 3, 1, 1), // ADC1_1
bogdanm 20:4263a77256ae 465 SFP_ADC1_2 = MBED_PIN(0x19, 3, 1, 2), // ADC1_2
bogdanm 20:4263a77256ae 466 SFP_ADC1_3 = MBED_PIN(0x19, 3, 1, 3), // ADC1_3
bogdanm 20:4263a77256ae 467 SFP_ADC1_4 = MBED_PIN(0x19, 3, 1, 4), // ADC1_4
bogdanm 20:4263a77256ae 468 SFP_ADC1_5 = MBED_PIN(0x19, 3, 1, 5), // ADC1_5
bogdanm 20:4263a77256ae 469 SFP_ADC1_6 = MBED_PIN(0x19, 3, 1, 6), // ADC1_6
bogdanm 20:4263a77256ae 470 SFP_ADC1_7 = MBED_PIN(0x19, 3, 1, 7), // ADC1_7
bogdanm 20:4263a77256ae 471
bogdanm 20:4263a77256ae 472 // ---------- Micromint Bambino 200 ----------
bogdanm 20:4263a77256ae 473 // LQFP144
bogdanm 20:4263a77256ae 474 // NOTE: Pins marked (*) only available on 200E
bogdanm 20:4263a77256ae 475 p5 = P1_2, // SPI0 mosi
bogdanm 20:4263a77256ae 476 p6 = P1_1, // SPI0 miso
bogdanm 20:4263a77256ae 477 p7 = P3_0, // SPI0 sck
bogdanm 20:4263a77256ae 478 p8 = P4_5,
bogdanm 20:4263a77256ae 479 p9 = P6_4, // Serial0 tx, I2C0 sda
bogdanm 20:4263a77256ae 480 p10 = P6_5, // Serial0 rx, I2C0 scl
bogdanm 20:4263a77256ae 481 p11 = P1_4, // SPI1 mosi (*)
bogdanm 20:4263a77256ae 482 p12 = P1_3, // SPI1 miso (*)
bogdanm 20:4263a77256ae 483 p13 = PF_4, // Serial1 tx, SPI1 sck (*)
bogdanm 20:4263a77256ae 484 p14 = P1_14, // Serial1 rx
bogdanm 20:4263a77256ae 485 p15 = P4_3, // ADC0
bogdanm 20:4263a77256ae 486 p16 = P4_1, // ADC1
bogdanm 20:4263a77256ae 487 p17 = P7_4, // ADC2
bogdanm 20:4263a77256ae 488 p18 = SFP_ADC0_0, // ADC3, DAC0
bogdanm 20:4263a77256ae 489 p19 = P7_5, // ADC4
bogdanm 20:4263a77256ae 490 p20 = P7_7, // ADC5
bogdanm 20:4263a77256ae 491 p21 = P4_0, // PWM0
bogdanm 20:4263a77256ae 492 p22 = P5_5, // PWM1
bogdanm 20:4263a77256ae 493 p23 = P5_7, // PWM2
bogdanm 20:4263a77256ae 494 p24 = P4_8, // PWM3
bogdanm 20:4263a77256ae 495 p25 = P4_9, // PWM4
bogdanm 20:4263a77256ae 496 p26 = P4_10, // PWM5
bogdanm 20:4263a77256ae 497 p27 = P2_4, // I2C1 scl, Serial2 rx
bogdanm 20:4263a77256ae 498 p28 = P2_3, // I2C1 sda, Serial2 tx
bogdanm 20:4263a77256ae 499 p29 = P3_2, // CAN0 td
bogdanm 20:4263a77256ae 500 p30 = P3_1, // CAN0 rx
bogdanm 20:4263a77256ae 501
bogdanm 20:4263a77256ae 502 // User interfaces: LEDs, buttons
bogdanm 20:4263a77256ae 503 LED_YELLOW = P6_11,
bogdanm 20:4263a77256ae 504 LED_GREEN = P2_5,
bogdanm 20:4263a77256ae 505 LED_RED = LED_YELLOW,
bogdanm 20:4263a77256ae 506 LED_BLUE = LED_GREEN,
bogdanm 20:4263a77256ae 507
bogdanm 20:4263a77256ae 508 LED1 = LED_YELLOW,
bogdanm 20:4263a77256ae 509 LED2 = LED_GREEN,
bogdanm 20:4263a77256ae 510 LED3 = LED_GREEN,
bogdanm 20:4263a77256ae 511 LED4 = LED_GREEN,
bogdanm 20:4263a77256ae 512
bogdanm 20:4263a77256ae 513 BTN1 = P2_7,
bogdanm 20:4263a77256ae 514
bogdanm 20:4263a77256ae 515 // Serial pins
bogdanm 20:4263a77256ae 516 UART0_TX = P6_4,
bogdanm 20:4263a77256ae 517 UART0_RX = P6_5,
bogdanm 20:4263a77256ae 518 UART1_TX = P5_6,
bogdanm 20:4263a77256ae 519 UART1_RX = P1_14,
bogdanm 20:4263a77256ae 520 UART2_TX = P2_10,
bogdanm 20:4263a77256ae 521 UART2_RX = P2_11,
bogdanm 20:4263a77256ae 522 UART3_TX = P2_3,
bogdanm 20:4263a77256ae 523 UART3_RX = P2_4,
bogdanm 20:4263a77256ae 524
bogdanm 20:4263a77256ae 525 // Analog pins
bogdanm 20:4263a77256ae 526 P_ADC0_0 = P4_3,
bogdanm 20:4263a77256ae 527 P_ADC0_1 = P4_1,
bogdanm 20:4263a77256ae 528 P_ADC1_0 = SFP_ADC0_0,
bogdanm 20:4263a77256ae 529 P_ADC0_4 = P7_4,
bogdanm 20:4263a77256ae 530 P_ADC0_3 = P7_5,
bogdanm 20:4263a77256ae 531 P_ADC1_6 = P7_7,
bogdanm 20:4263a77256ae 532
bogdanm 20:4263a77256ae 533 P_ADC0 = P_ADC0_0,
bogdanm 20:4263a77256ae 534 P_ADC1 = P_ADC0_1,
bogdanm 20:4263a77256ae 535 P_ADC2 = P_ADC1_0,
bogdanm 20:4263a77256ae 536 P_ADC3 = P_ADC0_4,
bogdanm 20:4263a77256ae 537 P_ADC4 = P_ADC0_3,
bogdanm 20:4263a77256ae 538 P_ADC5 = P_ADC1_6,
bogdanm 20:4263a77256ae 539
bogdanm 20:4263a77256ae 540 P_DAC0 = P4_4,
bogdanm 20:4263a77256ae 541
bogdanm 20:4263a77256ae 542 // USB pins
bogdanm 20:4263a77256ae 543 //P_USB0_TX = SFP_USB1,
bogdanm 20:4263a77256ae 544 //P_USB0_RX = SFP_USB1,
bogdanm 20:4263a77256ae 545
bogdanm 20:4263a77256ae 546 USBTX = UART0_TX,
bogdanm 20:4263a77256ae 547 USBRX = UART0_RX,
bogdanm 20:4263a77256ae 548 // ---------- End of Micromint Bambino 200 ----------
bogdanm 20:4263a77256ae 549
bogdanm 20:4263a77256ae 550 // Not connected
bogdanm 20:4263a77256ae 551 NC = (int)0xFFFFFFFF
bogdanm 20:4263a77256ae 552 } PinName;
bogdanm 20:4263a77256ae 553
bogdanm 20:4263a77256ae 554 typedef enum {
bogdanm 20:4263a77256ae 555 PullUp = 0,
bogdanm 20:4263a77256ae 556 PullDown = 3,
bogdanm 20:4263a77256ae 557 PullNone = 2,
bogdanm 20:4263a77256ae 558 Repeater = 1,
mbed_official 113:65a335a675de 559 OpenDrain = 4,
mbed_official 113:65a335a675de 560 PullDefault = PullDown
bogdanm 20:4263a77256ae 561 } PinMode;
bogdanm 20:4263a77256ae 562
bogdanm 20:4263a77256ae 563 #ifdef __cplusplus
bogdanm 20:4263a77256ae 564 }
bogdanm 20:4263a77256ae 565 #endif
bogdanm 20:4263a77256ae 566
bogdanm 20:4263a77256ae 567 #endif