The official Mbed 2 C/C++ SDK provides the software platform and libraries to build your applications.
Dependents: hello SerialTestv11 SerialTestv12 Sierpinski ... more
mbed 2
This is the mbed 2 library. If you'd like to learn about Mbed OS please see the mbed-os docs.
TARGET_XADOW_M0/TOOLCHAIN_IAR/PinNames.h@172:65be27845400, 2019-02-20 (annotated)
- Committer:
- AnnaBridge
- Date:
- Wed Feb 20 20:53:29 2019 +0000
- Revision:
- 172:65be27845400
- Parent:
- 171:3a7713b1edbc
mbed library release version 165
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
AnnaBridge | 171:3a7713b1edbc | 1 | /* mbed Microcontroller Library |
AnnaBridge | 171:3a7713b1edbc | 2 | * Copyright (c) 2006-2014 ARM Limited |
AnnaBridge | 171:3a7713b1edbc | 3 | * |
AnnaBridge | 171:3a7713b1edbc | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
AnnaBridge | 171:3a7713b1edbc | 5 | * you may not use this file except in compliance with the License. |
AnnaBridge | 171:3a7713b1edbc | 6 | * You may obtain a copy of the License at |
AnnaBridge | 171:3a7713b1edbc | 7 | * |
AnnaBridge | 171:3a7713b1edbc | 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
AnnaBridge | 171:3a7713b1edbc | 9 | * |
AnnaBridge | 171:3a7713b1edbc | 10 | * Unless required by applicable law or agreed to in writing, software |
AnnaBridge | 171:3a7713b1edbc | 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
AnnaBridge | 171:3a7713b1edbc | 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
AnnaBridge | 171:3a7713b1edbc | 13 | * See the License for the specific language governing permissions and |
AnnaBridge | 171:3a7713b1edbc | 14 | * limitations under the License. |
AnnaBridge | 171:3a7713b1edbc | 15 | */ |
AnnaBridge | 171:3a7713b1edbc | 16 | #ifndef MBED_PINNAMES_H |
AnnaBridge | 171:3a7713b1edbc | 17 | #define MBED_PINNAMES_H |
AnnaBridge | 171:3a7713b1edbc | 18 | |
AnnaBridge | 171:3a7713b1edbc | 19 | #include "cmsis.h" |
AnnaBridge | 171:3a7713b1edbc | 20 | |
AnnaBridge | 171:3a7713b1edbc | 21 | #ifdef __cplusplus |
AnnaBridge | 171:3a7713b1edbc | 22 | extern "C" { |
AnnaBridge | 171:3a7713b1edbc | 23 | #endif |
AnnaBridge | 171:3a7713b1edbc | 24 | |
AnnaBridge | 171:3a7713b1edbc | 25 | typedef enum { |
AnnaBridge | 171:3a7713b1edbc | 26 | PIN_INPUT, |
AnnaBridge | 171:3a7713b1edbc | 27 | PIN_OUTPUT |
AnnaBridge | 171:3a7713b1edbc | 28 | } PinDirection; |
AnnaBridge | 171:3a7713b1edbc | 29 | |
AnnaBridge | 171:3a7713b1edbc | 30 | #define PORT_SHIFT 5 |
AnnaBridge | 171:3a7713b1edbc | 31 | |
AnnaBridge | 171:3a7713b1edbc | 32 | typedef enum { |
AnnaBridge | 171:3a7713b1edbc | 33 | // LPC11U Pin Names |
AnnaBridge | 171:3a7713b1edbc | 34 | P0_0 = 0, |
AnnaBridge | 171:3a7713b1edbc | 35 | P0_1 = 1, |
AnnaBridge | 171:3a7713b1edbc | 36 | P0_2 = 2, |
AnnaBridge | 171:3a7713b1edbc | 37 | P0_3 = 3, |
AnnaBridge | 171:3a7713b1edbc | 38 | P0_4 = 4, |
AnnaBridge | 171:3a7713b1edbc | 39 | P0_5 = 5, |
AnnaBridge | 171:3a7713b1edbc | 40 | P0_6 = 6, |
AnnaBridge | 171:3a7713b1edbc | 41 | P0_7 = 7, |
AnnaBridge | 171:3a7713b1edbc | 42 | P0_8 = 8, |
AnnaBridge | 171:3a7713b1edbc | 43 | P0_9 = 9, |
AnnaBridge | 171:3a7713b1edbc | 44 | P0_10 = 10, |
AnnaBridge | 171:3a7713b1edbc | 45 | P0_11 = 11, |
AnnaBridge | 171:3a7713b1edbc | 46 | P0_12 = 12, |
AnnaBridge | 171:3a7713b1edbc | 47 | P0_13 = 13, |
AnnaBridge | 171:3a7713b1edbc | 48 | P0_14 = 14, |
AnnaBridge | 171:3a7713b1edbc | 49 | P0_15 = 15, |
AnnaBridge | 171:3a7713b1edbc | 50 | P0_16 = 16, |
AnnaBridge | 171:3a7713b1edbc | 51 | P0_17 = 17, |
AnnaBridge | 171:3a7713b1edbc | 52 | P0_18 = 18, |
AnnaBridge | 171:3a7713b1edbc | 53 | P0_19 = 19, |
AnnaBridge | 171:3a7713b1edbc | 54 | P0_20 = 20, |
AnnaBridge | 171:3a7713b1edbc | 55 | P0_21 = 21, |
AnnaBridge | 171:3a7713b1edbc | 56 | P0_22 = 22, |
AnnaBridge | 171:3a7713b1edbc | 57 | P0_23 = 23, |
AnnaBridge | 171:3a7713b1edbc | 58 | P0_24 = 24, |
AnnaBridge | 171:3a7713b1edbc | 59 | P0_25 = 25, |
AnnaBridge | 171:3a7713b1edbc | 60 | P0_26 = 26, |
AnnaBridge | 171:3a7713b1edbc | 61 | P0_27 = 27, |
AnnaBridge | 171:3a7713b1edbc | 62 | |
AnnaBridge | 171:3a7713b1edbc | 63 | P1_0 = 32, |
AnnaBridge | 171:3a7713b1edbc | 64 | P1_1 = 33, |
AnnaBridge | 171:3a7713b1edbc | 65 | P1_2 = 34, |
AnnaBridge | 171:3a7713b1edbc | 66 | P1_3 = 35, |
AnnaBridge | 171:3a7713b1edbc | 67 | P1_4 = 36, |
AnnaBridge | 171:3a7713b1edbc | 68 | P1_5 = 37, |
AnnaBridge | 171:3a7713b1edbc | 69 | P1_6 = 38, |
AnnaBridge | 171:3a7713b1edbc | 70 | P1_7 = 39, |
AnnaBridge | 171:3a7713b1edbc | 71 | P1_8 = 40, |
AnnaBridge | 171:3a7713b1edbc | 72 | P1_9 = 41, |
AnnaBridge | 171:3a7713b1edbc | 73 | P1_10 = 42, |
AnnaBridge | 171:3a7713b1edbc | 74 | P1_11 = 43, |
AnnaBridge | 171:3a7713b1edbc | 75 | P1_12 = 44, |
AnnaBridge | 171:3a7713b1edbc | 76 | P1_13 = 45, |
AnnaBridge | 171:3a7713b1edbc | 77 | P1_14 = 46, |
AnnaBridge | 171:3a7713b1edbc | 78 | P1_15 = 47, |
AnnaBridge | 171:3a7713b1edbc | 79 | P1_16 = 48, |
AnnaBridge | 171:3a7713b1edbc | 80 | P1_17 = 49, |
AnnaBridge | 171:3a7713b1edbc | 81 | P1_18 = 50, |
AnnaBridge | 171:3a7713b1edbc | 82 | P1_19 = 51, |
AnnaBridge | 171:3a7713b1edbc | 83 | P1_20 = 52, |
AnnaBridge | 171:3a7713b1edbc | 84 | P1_21 = 53, |
AnnaBridge | 171:3a7713b1edbc | 85 | P1_22 = 54, |
AnnaBridge | 171:3a7713b1edbc | 86 | P1_23 = 55, |
AnnaBridge | 171:3a7713b1edbc | 87 | P1_24 = 56, |
AnnaBridge | 171:3a7713b1edbc | 88 | P1_25 = 57, |
AnnaBridge | 171:3a7713b1edbc | 89 | P1_26 = 58, |
AnnaBridge | 171:3a7713b1edbc | 90 | P1_27 = 59, |
AnnaBridge | 171:3a7713b1edbc | 91 | P1_28 = 60, |
AnnaBridge | 171:3a7713b1edbc | 92 | P1_29 = 61, |
AnnaBridge | 171:3a7713b1edbc | 93 | |
AnnaBridge | 171:3a7713b1edbc | 94 | P1_31 = 63, |
AnnaBridge | 171:3a7713b1edbc | 95 | |
AnnaBridge | 171:3a7713b1edbc | 96 | // mbed DIP Pin Names |
AnnaBridge | 171:3a7713b1edbc | 97 | // CN1-1 (GND) |
AnnaBridge | 171:3a7713b1edbc | 98 | // CN1-2 (EXTPOWER) |
AnnaBridge | 171:3a7713b1edbc | 99 | // CN1-3 (NC) |
AnnaBridge | 171:3a7713b1edbc | 100 | p4 = P0_0, // CN1-4 |
AnnaBridge | 171:3a7713b1edbc | 101 | p5 = P0_9, // CN1-5 |
AnnaBridge | 171:3a7713b1edbc | 102 | p6 = P0_8, // CN1-6 |
AnnaBridge | 171:3a7713b1edbc | 103 | p7 = P0_10, // CN1-7 |
AnnaBridge | 171:3a7713b1edbc | 104 | p8 = P0_7, // CN1-8 |
AnnaBridge | 171:3a7713b1edbc | 105 | p9 = P0_19, // CN1-9 |
AnnaBridge | 171:3a7713b1edbc | 106 | p10 = P0_18, // CN1-10 |
AnnaBridge | 171:3a7713b1edbc | 107 | p11 = P0_21, // CN1-11 |
AnnaBridge | 171:3a7713b1edbc | 108 | p12 = P0_22, // CN1-12 |
AnnaBridge | 171:3a7713b1edbc | 109 | p13 = P1_15, // CN1-13 |
AnnaBridge | 171:3a7713b1edbc | 110 | p14 = P0_6, // CN1-14 |
AnnaBridge | 171:3a7713b1edbc | 111 | p15 = P0_11, // CN1-15 |
AnnaBridge | 171:3a7713b1edbc | 112 | p16 = P0_12, // CN1-16 |
AnnaBridge | 171:3a7713b1edbc | 113 | p17 = P0_13, // CN1-17 |
AnnaBridge | 171:3a7713b1edbc | 114 | p18 = P0_14, // CN1-18 |
AnnaBridge | 171:3a7713b1edbc | 115 | p19 = P0_15, // CN1-19 |
AnnaBridge | 171:3a7713b1edbc | 116 | p20 = P0_16, // CN1-20 |
AnnaBridge | 171:3a7713b1edbc | 117 | |
AnnaBridge | 171:3a7713b1edbc | 118 | p21 = P0_14, // CN2-20 |
AnnaBridge | 171:3a7713b1edbc | 119 | p22 = P0_2, // CN2-19 |
AnnaBridge | 171:3a7713b1edbc | 120 | p23 = P0_23, // CN2-18 |
AnnaBridge | 171:3a7713b1edbc | 121 | p24 = P0_17, // CN2-17 |
AnnaBridge | 171:3a7713b1edbc | 122 | p25 = P0_20, // CN2-16 |
AnnaBridge | 171:3a7713b1edbc | 123 | p26 = P1_15, // CN2-15 |
AnnaBridge | 171:3a7713b1edbc | 124 | p27 = P0_4, // CN2-14 |
AnnaBridge | 171:3a7713b1edbc | 125 | p28 = P0_5, // CN2-13 |
AnnaBridge | 171:3a7713b1edbc | 126 | p29 = P1_19, // CN2-12 |
AnnaBridge | 171:3a7713b1edbc | 127 | p30 = P0_1, // CN2-11 |
AnnaBridge | 171:3a7713b1edbc | 128 | // CN2-10 (D+USB) |
AnnaBridge | 171:3a7713b1edbc | 129 | // CN2-9 (D-USB) |
AnnaBridge | 171:3a7713b1edbc | 130 | p33 = P0_3, // CN2-8 (USB-VBUS) |
AnnaBridge | 171:3a7713b1edbc | 131 | // CN2-7 (NC) |
AnnaBridge | 171:3a7713b1edbc | 132 | // CN2-6 (NC) |
AnnaBridge | 171:3a7713b1edbc | 133 | // CN2-5 (NC) |
AnnaBridge | 171:3a7713b1edbc | 134 | // CN2-4 (NC) |
AnnaBridge | 171:3a7713b1edbc | 135 | // CN2-3 (NC) |
AnnaBridge | 171:3a7713b1edbc | 136 | // CN2-2 (VDD) |
AnnaBridge | 171:3a7713b1edbc | 137 | // CN2-1 (VDD) |
AnnaBridge | 171:3a7713b1edbc | 138 | |
AnnaBridge | 171:3a7713b1edbc | 139 | // Other mbed Pin Names |
AnnaBridge | 171:3a7713b1edbc | 140 | LED1 = P0_20, |
AnnaBridge | 171:3a7713b1edbc | 141 | LED2 = P0_23, |
AnnaBridge | 171:3a7713b1edbc | 142 | LED3 = P0_20, |
AnnaBridge | 171:3a7713b1edbc | 143 | LED4 = P0_23, |
AnnaBridge | 171:3a7713b1edbc | 144 | |
AnnaBridge | 171:3a7713b1edbc | 145 | UART_TX = P0_19, |
AnnaBridge | 171:3a7713b1edbc | 146 | UART_RX = P0_18, |
AnnaBridge | 171:3a7713b1edbc | 147 | |
AnnaBridge | 171:3a7713b1edbc | 148 | I2C_SCL = P0_4, |
AnnaBridge | 171:3a7713b1edbc | 149 | I2C_SDA = P0_5, |
AnnaBridge | 171:3a7713b1edbc | 150 | |
AnnaBridge | 171:3a7713b1edbc | 151 | // Not connected |
AnnaBridge | 171:3a7713b1edbc | 152 | NC = (int)0xFFFFFFFF, |
AnnaBridge | 171:3a7713b1edbc | 153 | |
AnnaBridge | 171:3a7713b1edbc | 154 | // Standard but not supported pins |
AnnaBridge | 171:3a7713b1edbc | 155 | USBTX = NC, |
AnnaBridge | 171:3a7713b1edbc | 156 | USBRX = NC, |
AnnaBridge | 171:3a7713b1edbc | 157 | |
AnnaBridge | 171:3a7713b1edbc | 158 | } PinName; |
AnnaBridge | 171:3a7713b1edbc | 159 | |
AnnaBridge | 171:3a7713b1edbc | 160 | typedef enum { |
AnnaBridge | 171:3a7713b1edbc | 161 | CHANNEL0 = FLEX_INT0_IRQn, |
AnnaBridge | 171:3a7713b1edbc | 162 | CHANNEL1 = FLEX_INT1_IRQn, |
AnnaBridge | 171:3a7713b1edbc | 163 | CHANNEL2 = FLEX_INT2_IRQn, |
AnnaBridge | 171:3a7713b1edbc | 164 | CHANNEL3 = FLEX_INT3_IRQn, |
AnnaBridge | 171:3a7713b1edbc | 165 | CHANNEL4 = FLEX_INT4_IRQn, |
AnnaBridge | 171:3a7713b1edbc | 166 | CHANNEL5 = FLEX_INT5_IRQn, |
AnnaBridge | 171:3a7713b1edbc | 167 | CHANNEL6 = FLEX_INT6_IRQn, |
AnnaBridge | 171:3a7713b1edbc | 168 | CHANNEL7 = FLEX_INT7_IRQn |
AnnaBridge | 171:3a7713b1edbc | 169 | } Channel; |
AnnaBridge | 171:3a7713b1edbc | 170 | |
AnnaBridge | 171:3a7713b1edbc | 171 | typedef enum { |
AnnaBridge | 171:3a7713b1edbc | 172 | PullUp = 2, |
AnnaBridge | 171:3a7713b1edbc | 173 | PullDown = 1, |
AnnaBridge | 171:3a7713b1edbc | 174 | PullNone = 0, |
AnnaBridge | 171:3a7713b1edbc | 175 | Repeater = 3, |
AnnaBridge | 171:3a7713b1edbc | 176 | OpenDrain = 4, |
AnnaBridge | 171:3a7713b1edbc | 177 | PullDefault = PullDown |
AnnaBridge | 171:3a7713b1edbc | 178 | } PinMode; |
AnnaBridge | 171:3a7713b1edbc | 179 | |
AnnaBridge | 171:3a7713b1edbc | 180 | #ifdef __cplusplus |
AnnaBridge | 171:3a7713b1edbc | 181 | } |
AnnaBridge | 171:3a7713b1edbc | 182 | #endif |
AnnaBridge | 171:3a7713b1edbc | 183 | |
AnnaBridge | 171:3a7713b1edbc | 184 | #endif |