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.
Fork of command_AX12_petit_robot_v2 by
PinNames.h
00001 /* mbed Microcontroller Library - PinNames 00002 * Copyright (C) 2008-2011 ARM Limited. All rights reserved. 00003 * 00004 * Provides the mapping of mbed DIP and LPC Pin Names 00005 */ 00006 00007 #ifndef MBED_PINNAMES_H 00008 #define MBED_PINNAMES_H 00009 00010 #include "cmsis.h" 00011 00012 #ifdef __cplusplus 00013 extern "C" { 00014 #endif 00015 00016 #if defined(TARGET_LPC1768) || defined(TARGET_LPC2368) 00017 00018 enum PinName { 00019 00020 // LPC Pin Names 00021 P0_0 = LPC_GPIO0_BASE, P0_1, P0_2, P0_3, P0_4, P0_5, P0_6, P0_7 00022 , P0_8, P0_9, P0_10, P0_11, P0_12, P0_13, P0_14, P0_15 00023 , P0_16, P0_17, P0_18, P0_19, P0_20, P0_21, P0_22, P0_23 00024 , P0_24, P0_25, P0_26, P0_27, P0_28, P0_29, P0_30, P0_31 00025 , P1_0, P1_1, P1_2, P1_3, P1_4, P1_5, P1_6, P1_7 00026 , P1_8, P1_9, P1_10, P1_11, P1_12, P1_13, P1_14, P1_15 00027 , P1_16, P1_17, P1_18, P1_19, P1_20, P1_21, P1_22, P1_23 00028 , P1_24, P1_25, P1_26, P1_27, P1_28, P1_29, P1_30, P1_31 00029 , P2_0, P2_1, P2_2, P2_3, P2_4, P2_5, P2_6, P2_7 00030 , P2_8, P2_9, P2_10, P2_11, P2_12, P2_13, P2_14, P2_15 00031 , P2_16, P2_17, P2_18, P2_19, P2_20, P2_21, P2_22, P2_23 00032 , P2_24, P2_25, P2_26, P2_27, P2_28, P2_29, P2_30, P2_31 00033 , P3_0, P3_1, P3_2, P3_3, P3_4, P3_5, P3_6, P3_7 00034 , P3_8, P3_9, P3_10, P3_11, P3_12, P3_13, P3_14, P3_15 00035 , P3_16, P3_17, P3_18, P3_19, P3_20, P3_21, P3_22, P3_23 00036 , P3_24, P3_25, P3_26, P3_27, P3_28, P3_29, P3_30, P3_31 00037 , P4_0, P4_1, P4_2, P4_3, P4_4, P4_5, P4_6, P4_7 00038 , P4_8, P4_9, P4_10, P4_11, P4_12, P4_13, P4_14, P4_15 00039 , P4_16, P4_17, P4_18, P4_19, P4_20, P4_21, P4_22, P4_23 00040 , P4_24, P4_25, P4_26, P4_27, P4_28, P4_29, P4_30, P4_31 00041 00042 // mbed DIP Pin Names 00043 , p5 = P0_9 00044 , p6 = P0_8 00045 , p7 = P0_7 00046 , p8 = P0_6 00047 , p9 = P0_0 00048 , p10 = P0_1 00049 , p11 = P0_18 00050 , p12 = P0_17 00051 , p13 = P0_15 00052 , p14 = P0_16 00053 , p15 = P0_23 00054 , p16 = P0_24 00055 , p17 = P0_25 00056 , p18 = P0_26 00057 , p19 = P1_30 00058 , p20 = P1_31 00059 , p21 = P2_5 00060 , p22 = P2_4 00061 , p23 = P2_3 00062 , p24 = P2_2 00063 , p25 = P2_1 00064 , p26 = P2_0 00065 , p27 = P0_11 00066 , p28 = P0_10 00067 , p29 = P0_5 00068 , p30 = P0_4 00069 00070 // Other mbed Pin Names 00071 #ifdef MCB1700 00072 , LED1 = P1_28 00073 , LED2 = P1_29 00074 , LED3 = P1_31 00075 , LED4 = P2_2 00076 #else 00077 , LED1 = P1_18 00078 , LED2 = P1_20 00079 , LED3 = P1_21 00080 , LED4 = P1_23 00081 #endif 00082 , USBTX = P0_2 00083 , USBRX = P0_3 00084 00085 // Not connected 00086 , NC = (int)0xFFFFFFFF 00087 00088 }; 00089 typedef enum PinName PinName; 00090 00091 enum PinMode { 00092 PullUp = 0 00093 , PullDown = 3 00094 , PullNone = 2 00095 , OpenDrain = 4 00096 }; 00097 typedef enum PinMode PinMode; 00098 00099 // version of PINCON_TypeDef using register arrays 00100 typedef struct { 00101 __IO uint32_t PINSEL[11]; 00102 uint32_t RESERVED0[5]; 00103 __IO uint32_t PINMODE[10]; 00104 #ifndef TARGET_LPC2368 00105 // Open drain mode is not available on LPC2368 00106 __IO uint32_t PINMODE_OD[5]; 00107 #endif 00108 } PINCONARRAY_TypeDef; 00109 00110 #define PINCONARRAY ((PINCONARRAY_TypeDef *)LPC_PINCON_BASE) 00111 00112 00113 #elif defined(TARGET_LPC11U24) 00114 00115 enum PinName { 00116 00117 // LPC11U Pin Names 00118 P0_0 = 0 00119 , P0_1 = 1 00120 , P0_2 = 2 00121 , P0_3 = 3 00122 , P0_4 = 4 00123 , P0_5 = 5 00124 , P0_6 = 6 00125 , P0_7 = 7 00126 , P0_8 = 8 00127 , P0_9 = 9 00128 , P0_10 = 10 00129 , P0_11 = 11 00130 , P0_12 = 12 00131 , P0_13 = 13 00132 , P0_14 = 14 00133 , P0_15 = 15 00134 , P0_16 = 16 00135 , P0_17 = 17 00136 , P0_18 = 18 00137 , P0_19 = 19 00138 , P0_20 = 20 00139 , P0_21 = 21 00140 , P0_22 = 22 00141 , P0_23 = 23 00142 , P0_24 = 24 00143 , P0_25 = 25 00144 , P0_26 = 26 00145 , P0_27 = 27 00146 00147 , P1_0 = 32 00148 , P1_1 = 33 00149 , P1_2 = 34 00150 , P1_3 = 35 00151 , P1_4 = 36 00152 , P1_5 = 37 00153 , P1_6 = 38 00154 , P1_7 = 39 00155 , P1_8 = 40 00156 , P1_9 = 41 00157 , P1_10 = 42 00158 , P1_11 = 43 00159 , P1_12 = 44 00160 , P1_13 = 45 00161 , P1_14 = 46 00162 , P1_15 = 47 00163 , P1_16 = 48 00164 , P1_17 = 49 00165 , P1_18 = 50 00166 , P1_19 = 51 00167 , P1_20 = 52 00168 , P1_21 = 53 00169 , P1_22 = 54 00170 , P1_23 = 55 00171 , P1_24 = 56 00172 , P1_25 = 57 00173 , P1_26 = 58 00174 , P1_27 = 59 00175 , P1_28 = 60 00176 , P1_29 = 61 00177 00178 , P1_31 = 63 00179 00180 // mbed DIP Pin Names 00181 , p5 = P0_9 00182 , p6 = P0_8 00183 , p7 = P1_29 00184 , p8 = P0_2 00185 , p9 = P1_27 00186 , p10 = P1_26 00187 , p11 = P1_22 00188 , p12 = P1_21 00189 , p13 = P1_20 00190 , p14 = P1_23 00191 , p15 = P0_11 00192 , p16 = P0_12 00193 , p17 = P0_13 00194 , p18 = P0_14 00195 , p19 = P0_16 00196 , p20 = P0_22 00197 , p21 = P0_7 00198 , p22 = P0_17 00199 , p23 = P1_17 00200 , p24 = P1_18 00201 , p25 = P1_24 00202 , p26 = P1_25 00203 , p27 = P0_4 00204 , p28 = P0_5 00205 , p29 = P1_5 00206 , p30 = P1_2 00207 00208 , p33 = P0_3 00209 , p34 = P1_15 00210 , p35 = P0_20 00211 , p36 = P0_21 00212 00213 // Other mbed Pin Names 00214 , LED1 = P1_8 00215 , LED2 = P1_9 00216 , LED3 = P1_10 00217 , LED4 = P1_11 00218 00219 , USBTX = P0_19 00220 , USBRX = P0_18 00221 00222 // Not connected 00223 , NC = (int)0xFFFFFFFF 00224 00225 }; 00226 typedef enum PinName PinName; 00227 00228 typedef enum { 00229 CHANNEL0=FLEX_INT0_IRQn, 00230 CHANNEL1=FLEX_INT1_IRQn, 00231 CHANNEL2=FLEX_INT2_IRQn, 00232 CHANNEL3=FLEX_INT3_IRQn, 00233 CHANNEL4=FLEX_INT4_IRQn, 00234 CHANNEL5=FLEX_INT5_IRQn, 00235 CHANNEL6=FLEX_INT6_IRQn, 00236 CHANNEL7=FLEX_INT7_IRQn 00237 } Channel; 00238 00239 enum PinMode { 00240 PullUp = 2 00241 , PullDown = 1 00242 , PullNone = 0 00243 , Repeater = 3 00244 , OpenDrain = 4 00245 }; 00246 typedef enum PinMode PinMode; 00247 #endif 00248 00249 00250 #ifdef __cplusplus 00251 } 00252 #endif 00253 00254 #endif
Generated on Thu Jul 14 2022 20:44:47 by
