Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
PinNames.h
00001 /* mbed Microcontroller Library 00002 * Copyright (c) 2006-2013 ARM Limited 00003 * 00004 * Permission is hereby granted, free of charge, to any person obtaining a copy 00005 * of this software and associated documentation files (the "Software"), to deal 00006 * in the Software without restriction, including without limitation the rights 00007 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 00008 * copies of the Software, and to permit persons to whom the Software is 00009 * furnished to do so, subject to the following conditions: 00010 * 00011 * The above copyright notice and this permission notice shall be included in 00012 * all copies or substantial portions of the Software. 00013 * 00014 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 00015 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 00016 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 00017 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 00018 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 00019 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 00020 * SOFTWARE. 00021 */ 00022 #ifndef MBED_PINNAMES_H 00023 #define MBED_PINNAMES_H 00024 00025 #include "cmsis.h" 00026 00027 #ifdef __cplusplus 00028 extern "C" { 00029 #endif 00030 00031 typedef enum { 00032 PIN_INPUT, 00033 PIN_OUTPUT 00034 } PinDirection; 00035 00036 #define PORT_SHIFT 5 00037 00038 typedef enum { 00039 // LPC Pin Names 00040 P0_0 = LPC_GPIO0_BASE, 00041 P0_1, P0_2, P0_3, P0_4, P0_5, P0_6, P0_7, P0_8, P0_9, P0_10, P0_11, P0_12, P0_13, P0_14, P0_15, P0_16, P0_17, P0_18, P0_19, P0_20, P0_21, P0_22, P0_23, P0_24, P0_25, P0_26, P0_27, P0_28, P0_29, P0_30, P0_31, 00042 P1_0, P1_1, P1_2, P1_3, P1_4, P1_5, P1_6, P1_7, P1_8, P1_9, P1_10, P1_11, P1_12, P1_13, P1_14, P1_15, P1_16, P1_17, P1_18, P1_19, P1_20, P1_21, P1_22, P1_23, P1_24, P1_25, P1_26, P1_27, P1_28, P1_29, P1_30, P1_31, 00043 P2_0, P2_1, P2_2, P2_3, P2_4, P2_5, P2_6, P2_7, P2_8, P2_9, P2_10, P2_11, P2_12, P2_13, P2_14, P2_15, P2_16, P2_17, P2_18, P2_19, P2_20, P2_21, P2_22, P2_23, P2_24, P2_25, P2_26, P2_27, P2_28, P2_29, P2_30, P2_31, 00044 P3_0, P3_1, P3_2, P3_3, P3_4, P3_5, P3_6, P3_7, P3_8, P3_9, P3_10, P3_11, P3_12, P3_13, P3_14, P3_15, P3_16, P3_17, P3_18, P3_19, P3_20, P3_21, P3_22, P3_23, P3_24, P3_25, P3_26, P3_27, P3_28, P3_29, P3_30, P3_31, 00045 P4_0, P4_1, P4_2, P4_3, P4_4, P4_5, P4_6, P4_7, P4_8, P4_9, P4_10, P4_11, P4_12, P4_13, P4_14, P4_15, P4_16, P4_17, P4_18, P4_19, P4_20, P4_21, P4_22, P4_23, P4_24, P4_25, P4_26, P4_27, P4_28, P4_29, P4_30, P4_31, 00046 00047 // mbed DIP Pin Names 00048 p5 = P0_9, 00049 p6 = P0_8, 00050 p7 = P0_7, 00051 p8 = P0_6, 00052 p9 = P0_0, 00053 p10 = P0_1, 00054 p11 = P0_18, 00055 p12 = P0_17, 00056 p13 = P0_15, 00057 p14 = P0_16, 00058 p15 = P0_23, 00059 p16 = P0_24, 00060 p17 = P0_25, 00061 p18 = P0_26, 00062 p19 = P1_30, 00063 p20 = P1_31, 00064 p21 = P2_5, 00065 p22 = P2_4, 00066 p23 = P2_3, 00067 p24 = P2_2, 00068 p25 = P2_1, 00069 p26 = P2_0, 00070 p27 = P0_11, 00071 p28 = P0_10, 00072 p29 = P0_5, 00073 p30 = P0_4, 00074 00075 // Other mbed Pin Names 00076 #ifdef MCB1700 00077 LED1 = P1_28, 00078 LED2 = P1_29, 00079 LED3 = P1_31, 00080 LED4 = P2_2, 00081 #else 00082 LED1 = P1_18, 00083 LED2 = P1_20, 00084 LED3 = P1_21, 00085 LED4 = P1_23, 00086 #endif 00087 USBTX = P0_2, 00088 USBRX = P0_3, 00089 00090 // Not connected 00091 NC = (int)0xFFFFFFFF 00092 } PinName; 00093 00094 typedef enum { 00095 PullUp = 0, 00096 PullDown = 3, 00097 PullNone = 2, 00098 OpenDrain = 4 00099 } PinMode; 00100 00101 // version of PINCON_TypeDef using register arrays 00102 typedef struct { 00103 __IO uint32_t PINSEL[11]; 00104 uint32_t RESERVED0[5]; 00105 __IO uint32_t PINMODE[10]; 00106 __IO uint32_t PINMODE_OD[5]; 00107 } PINCONARRAY_TypeDef; 00108 00109 #define PINCONARRAY ((PINCONARRAY_TypeDef *)LPC_PINCON_BASE) 00110 00111 #ifdef __cplusplus 00112 } 00113 #endif 00114 00115 #endif 00116
Generated on Wed Jul 13 2022 02:59:11 by
