Programme d'utilisation des AX12 avec rajout de l'MX12

Fork of test_carteAToutFaire_PR by CRAC Team

Committer:
R66Y
Date:
Sat May 20 15:23:58 2017 +0000
Revision:
3:1bb26049bdd1
Parent:
1:f3f702086a30
Programme de contr?le des AX12 avec rajout de l'MX12;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
ClementBreteau 1:f3f702086a30 1 /* mbed Microcontroller Library - PinNames
ClementBreteau 1:f3f702086a30 2 * Copyright (C) 2008-2011 ARM Limited. All rights reserved.
ClementBreteau 1:f3f702086a30 3 *
ClementBreteau 1:f3f702086a30 4 * Provides the mapping of mbed DIP and LPC Pin Names
ClementBreteau 1:f3f702086a30 5 */
ClementBreteau 1:f3f702086a30 6
ClementBreteau 1:f3f702086a30 7 #ifndef MBED_PINNAMES_H
ClementBreteau 1:f3f702086a30 8 #define MBED_PINNAMES_H
ClementBreteau 1:f3f702086a30 9
ClementBreteau 1:f3f702086a30 10 #include "cmsis.h"
ClementBreteau 1:f3f702086a30 11
ClementBreteau 1:f3f702086a30 12 #ifdef __cplusplus
ClementBreteau 1:f3f702086a30 13 extern "C" {
ClementBreteau 1:f3f702086a30 14 #endif
ClementBreteau 1:f3f702086a30 15
ClementBreteau 1:f3f702086a30 16 #if defined(TARGET_LPC1768) || defined(TARGET_LPC2368)
ClementBreteau 1:f3f702086a30 17
ClementBreteau 1:f3f702086a30 18 enum PinName {
ClementBreteau 1:f3f702086a30 19
ClementBreteau 1:f3f702086a30 20 // LPC Pin Names
ClementBreteau 1:f3f702086a30 21 P0_0 = LPC_GPIO0_BASE, P0_1, P0_2, P0_3, P0_4, P0_5, P0_6, P0_7
ClementBreteau 1:f3f702086a30 22 , P0_8, P0_9, P0_10, P0_11, P0_12, P0_13, P0_14, P0_15
ClementBreteau 1:f3f702086a30 23 , P0_16, P0_17, P0_18, P0_19, P0_20, P0_21, P0_22, P0_23
ClementBreteau 1:f3f702086a30 24 , P0_24, P0_25, P0_26, P0_27, P0_28, P0_29, P0_30, P0_31
ClementBreteau 1:f3f702086a30 25 , P1_0, P1_1, P1_2, P1_3, P1_4, P1_5, P1_6, P1_7
ClementBreteau 1:f3f702086a30 26 , P1_8, P1_9, P1_10, P1_11, P1_12, P1_13, P1_14, P1_15
ClementBreteau 1:f3f702086a30 27 , P1_16, P1_17, P1_18, P1_19, P1_20, P1_21, P1_22, P1_23
ClementBreteau 1:f3f702086a30 28 , P1_24, P1_25, P1_26, P1_27, P1_28, P1_29, P1_30, P1_31
ClementBreteau 1:f3f702086a30 29 , P2_0, P2_1, P2_2, P2_3, P2_4, P2_5, P2_6, P2_7
ClementBreteau 1:f3f702086a30 30 , P2_8, P2_9, P2_10, P2_11, P2_12, P2_13, P2_14, P2_15
ClementBreteau 1:f3f702086a30 31 , P2_16, P2_17, P2_18, P2_19, P2_20, P2_21, P2_22, P2_23
ClementBreteau 1:f3f702086a30 32 , P2_24, P2_25, P2_26, P2_27, P2_28, P2_29, P2_30, P2_31
ClementBreteau 1:f3f702086a30 33 , P3_0, P3_1, P3_2, P3_3, P3_4, P3_5, P3_6, P3_7
ClementBreteau 1:f3f702086a30 34 , P3_8, P3_9, P3_10, P3_11, P3_12, P3_13, P3_14, P3_15
ClementBreteau 1:f3f702086a30 35 , P3_16, P3_17, P3_18, P3_19, P3_20, P3_21, P3_22, P3_23
ClementBreteau 1:f3f702086a30 36 , P3_24, P3_25, P3_26, P3_27, P3_28, P3_29, P3_30, P3_31
ClementBreteau 1:f3f702086a30 37 , P4_0, P4_1, P4_2, P4_3, P4_4, P4_5, P4_6, P4_7
ClementBreteau 1:f3f702086a30 38 , P4_8, P4_9, P4_10, P4_11, P4_12, P4_13, P4_14, P4_15
ClementBreteau 1:f3f702086a30 39 , P4_16, P4_17, P4_18, P4_19, P4_20, P4_21, P4_22, P4_23
ClementBreteau 1:f3f702086a30 40 , P4_24, P4_25, P4_26, P4_27, P4_28, P4_29, P4_30, P4_31
ClementBreteau 1:f3f702086a30 41
ClementBreteau 1:f3f702086a30 42 // mbed DIP Pin Names
ClementBreteau 1:f3f702086a30 43 , p5 = P0_9
ClementBreteau 1:f3f702086a30 44 , p6 = P0_8
ClementBreteau 1:f3f702086a30 45 , p7 = P0_7
ClementBreteau 1:f3f702086a30 46 , p8 = P0_6
ClementBreteau 1:f3f702086a30 47 , p9 = P0_0
ClementBreteau 1:f3f702086a30 48 , p10 = P0_1
ClementBreteau 1:f3f702086a30 49 , p11 = P0_18
ClementBreteau 1:f3f702086a30 50 , p12 = P0_17
ClementBreteau 1:f3f702086a30 51 , p13 = P0_15
ClementBreteau 1:f3f702086a30 52 , p14 = P0_16
ClementBreteau 1:f3f702086a30 53 , p15 = P0_23
ClementBreteau 1:f3f702086a30 54 , p16 = P0_24
ClementBreteau 1:f3f702086a30 55 , p17 = P0_25
ClementBreteau 1:f3f702086a30 56 , p18 = P0_26
ClementBreteau 1:f3f702086a30 57 , p19 = P1_30
ClementBreteau 1:f3f702086a30 58 , p20 = P1_31
ClementBreteau 1:f3f702086a30 59 , p21 = P2_5
ClementBreteau 1:f3f702086a30 60 , p22 = P2_4
ClementBreteau 1:f3f702086a30 61 , p23 = P2_3
ClementBreteau 1:f3f702086a30 62 , p24 = P2_2
ClementBreteau 1:f3f702086a30 63 , p25 = P2_1
ClementBreteau 1:f3f702086a30 64 , p26 = P2_0
ClementBreteau 1:f3f702086a30 65 , p27 = P0_11
ClementBreteau 1:f3f702086a30 66 , p28 = P0_10
ClementBreteau 1:f3f702086a30 67 , p29 = P0_5
ClementBreteau 1:f3f702086a30 68 , p30 = P0_4
ClementBreteau 1:f3f702086a30 69
ClementBreteau 1:f3f702086a30 70 // Other mbed Pin Names
ClementBreteau 1:f3f702086a30 71 #ifdef MCB1700
ClementBreteau 1:f3f702086a30 72 , LED1 = P1_28
ClementBreteau 1:f3f702086a30 73 , LED2 = P1_29
ClementBreteau 1:f3f702086a30 74 , LED3 = P1_31
ClementBreteau 1:f3f702086a30 75 , LED4 = P2_2
ClementBreteau 1:f3f702086a30 76 #else
ClementBreteau 1:f3f702086a30 77 , LED1 = P1_18
ClementBreteau 1:f3f702086a30 78 , LED2 = P1_20
ClementBreteau 1:f3f702086a30 79 , LED3 = P1_21
ClementBreteau 1:f3f702086a30 80 , LED4 = P1_23
ClementBreteau 1:f3f702086a30 81 #endif
ClementBreteau 1:f3f702086a30 82 , USBTX = P0_2
ClementBreteau 1:f3f702086a30 83 , USBRX = P0_3
ClementBreteau 1:f3f702086a30 84
ClementBreteau 1:f3f702086a30 85 // Not connected
ClementBreteau 1:f3f702086a30 86 , NC = (int)0xFFFFFFFF
ClementBreteau 1:f3f702086a30 87
ClementBreteau 1:f3f702086a30 88 };
ClementBreteau 1:f3f702086a30 89 typedef enum PinName PinName;
ClementBreteau 1:f3f702086a30 90
ClementBreteau 1:f3f702086a30 91 enum PinMode {
ClementBreteau 1:f3f702086a30 92 PullUp = 0
ClementBreteau 1:f3f702086a30 93 , PullDown = 3
ClementBreteau 1:f3f702086a30 94 , PullNone = 2
ClementBreteau 1:f3f702086a30 95 , OpenDrain = 4
ClementBreteau 1:f3f702086a30 96 };
ClementBreteau 1:f3f702086a30 97 typedef enum PinMode PinMode;
ClementBreteau 1:f3f702086a30 98
ClementBreteau 1:f3f702086a30 99 // version of PINCON_TypeDef using register arrays
ClementBreteau 1:f3f702086a30 100 typedef struct {
ClementBreteau 1:f3f702086a30 101 __IO uint32_t PINSEL[11];
ClementBreteau 1:f3f702086a30 102 uint32_t RESERVED0[5];
ClementBreteau 1:f3f702086a30 103 __IO uint32_t PINMODE[10];
ClementBreteau 1:f3f702086a30 104 #ifndef TARGET_LPC2368
ClementBreteau 1:f3f702086a30 105 // Open drain mode is not available on LPC2368
ClementBreteau 1:f3f702086a30 106 __IO uint32_t PINMODE_OD[5];
ClementBreteau 1:f3f702086a30 107 #endif
ClementBreteau 1:f3f702086a30 108 } PINCONARRAY_TypeDef;
ClementBreteau 1:f3f702086a30 109
ClementBreteau 1:f3f702086a30 110 #define PINCONARRAY ((PINCONARRAY_TypeDef *)LPC_PINCON_BASE)
ClementBreteau 1:f3f702086a30 111
ClementBreteau 1:f3f702086a30 112
ClementBreteau 1:f3f702086a30 113 #elif defined(TARGET_LPC11U24)
ClementBreteau 1:f3f702086a30 114
ClementBreteau 1:f3f702086a30 115 enum PinName {
ClementBreteau 1:f3f702086a30 116
ClementBreteau 1:f3f702086a30 117 // LPC11U Pin Names
ClementBreteau 1:f3f702086a30 118 P0_0 = 0
ClementBreteau 1:f3f702086a30 119 , P0_1 = 1
ClementBreteau 1:f3f702086a30 120 , P0_2 = 2
ClementBreteau 1:f3f702086a30 121 , P0_3 = 3
ClementBreteau 1:f3f702086a30 122 , P0_4 = 4
ClementBreteau 1:f3f702086a30 123 , P0_5 = 5
ClementBreteau 1:f3f702086a30 124 , P0_6 = 6
ClementBreteau 1:f3f702086a30 125 , P0_7 = 7
ClementBreteau 1:f3f702086a30 126 , P0_8 = 8
ClementBreteau 1:f3f702086a30 127 , P0_9 = 9
ClementBreteau 1:f3f702086a30 128 , P0_10 = 10
ClementBreteau 1:f3f702086a30 129 , P0_11 = 11
ClementBreteau 1:f3f702086a30 130 , P0_12 = 12
ClementBreteau 1:f3f702086a30 131 , P0_13 = 13
ClementBreteau 1:f3f702086a30 132 , P0_14 = 14
ClementBreteau 1:f3f702086a30 133 , P0_15 = 15
ClementBreteau 1:f3f702086a30 134 , P0_16 = 16
ClementBreteau 1:f3f702086a30 135 , P0_17 = 17
ClementBreteau 1:f3f702086a30 136 , P0_18 = 18
ClementBreteau 1:f3f702086a30 137 , P0_19 = 19
ClementBreteau 1:f3f702086a30 138 , P0_20 = 20
ClementBreteau 1:f3f702086a30 139 , P0_21 = 21
ClementBreteau 1:f3f702086a30 140 , P0_22 = 22
ClementBreteau 1:f3f702086a30 141 , P0_23 = 23
ClementBreteau 1:f3f702086a30 142 , P0_24 = 24
ClementBreteau 1:f3f702086a30 143 , P0_25 = 25
ClementBreteau 1:f3f702086a30 144 , P0_26 = 26
ClementBreteau 1:f3f702086a30 145 , P0_27 = 27
ClementBreteau 1:f3f702086a30 146
ClementBreteau 1:f3f702086a30 147 , P1_0 = 32
ClementBreteau 1:f3f702086a30 148 , P1_1 = 33
ClementBreteau 1:f3f702086a30 149 , P1_2 = 34
ClementBreteau 1:f3f702086a30 150 , P1_3 = 35
ClementBreteau 1:f3f702086a30 151 , P1_4 = 36
ClementBreteau 1:f3f702086a30 152 , P1_5 = 37
ClementBreteau 1:f3f702086a30 153 , P1_6 = 38
ClementBreteau 1:f3f702086a30 154 , P1_7 = 39
ClementBreteau 1:f3f702086a30 155 , P1_8 = 40
ClementBreteau 1:f3f702086a30 156 , P1_9 = 41
ClementBreteau 1:f3f702086a30 157 , P1_10 = 42
ClementBreteau 1:f3f702086a30 158 , P1_11 = 43
ClementBreteau 1:f3f702086a30 159 , P1_12 = 44
ClementBreteau 1:f3f702086a30 160 , P1_13 = 45
ClementBreteau 1:f3f702086a30 161 , P1_14 = 46
ClementBreteau 1:f3f702086a30 162 , P1_15 = 47
ClementBreteau 1:f3f702086a30 163 , P1_16 = 48
ClementBreteau 1:f3f702086a30 164 , P1_17 = 49
ClementBreteau 1:f3f702086a30 165 , P1_18 = 50
ClementBreteau 1:f3f702086a30 166 , P1_19 = 51
ClementBreteau 1:f3f702086a30 167 , P1_20 = 52
ClementBreteau 1:f3f702086a30 168 , P1_21 = 53
ClementBreteau 1:f3f702086a30 169 , P1_22 = 54
ClementBreteau 1:f3f702086a30 170 , P1_23 = 55
ClementBreteau 1:f3f702086a30 171 , P1_24 = 56
ClementBreteau 1:f3f702086a30 172 , P1_25 = 57
ClementBreteau 1:f3f702086a30 173 , P1_26 = 58
ClementBreteau 1:f3f702086a30 174 , P1_27 = 59
ClementBreteau 1:f3f702086a30 175 , P1_28 = 60
ClementBreteau 1:f3f702086a30 176 , P1_29 = 61
ClementBreteau 1:f3f702086a30 177
ClementBreteau 1:f3f702086a30 178 , P1_31 = 63
ClementBreteau 1:f3f702086a30 179
ClementBreteau 1:f3f702086a30 180 // mbed DIP Pin Names
ClementBreteau 1:f3f702086a30 181 , p5 = P0_9
ClementBreteau 1:f3f702086a30 182 , p6 = P0_8
ClementBreteau 1:f3f702086a30 183 , p7 = P1_29
ClementBreteau 1:f3f702086a30 184 , p8 = P0_2
ClementBreteau 1:f3f702086a30 185 , p9 = P1_27
ClementBreteau 1:f3f702086a30 186 , p10 = P1_26
ClementBreteau 1:f3f702086a30 187 , p11 = P1_22
ClementBreteau 1:f3f702086a30 188 , p12 = P1_21
ClementBreteau 1:f3f702086a30 189 , p13 = P1_20
ClementBreteau 1:f3f702086a30 190 , p14 = P1_23
ClementBreteau 1:f3f702086a30 191 , p15 = P0_11
ClementBreteau 1:f3f702086a30 192 , p16 = P0_12
ClementBreteau 1:f3f702086a30 193 , p17 = P0_13
ClementBreteau 1:f3f702086a30 194 , p18 = P0_14
ClementBreteau 1:f3f702086a30 195 , p19 = P0_16
ClementBreteau 1:f3f702086a30 196 , p20 = P0_22
ClementBreteau 1:f3f702086a30 197 , p21 = P0_7
ClementBreteau 1:f3f702086a30 198 , p22 = P0_17
ClementBreteau 1:f3f702086a30 199 , p23 = P1_17
ClementBreteau 1:f3f702086a30 200 , p24 = P1_18
ClementBreteau 1:f3f702086a30 201 , p25 = P1_24
ClementBreteau 1:f3f702086a30 202 , p26 = P1_25
ClementBreteau 1:f3f702086a30 203 , p27 = P0_4
ClementBreteau 1:f3f702086a30 204 , p28 = P0_5
ClementBreteau 1:f3f702086a30 205 , p29 = P1_5
ClementBreteau 1:f3f702086a30 206 , p30 = P1_2
ClementBreteau 1:f3f702086a30 207
ClementBreteau 1:f3f702086a30 208 , p33 = P0_3
ClementBreteau 1:f3f702086a30 209 , p34 = P1_15
ClementBreteau 1:f3f702086a30 210 , p35 = P0_20
ClementBreteau 1:f3f702086a30 211 , p36 = P0_21
ClementBreteau 1:f3f702086a30 212
ClementBreteau 1:f3f702086a30 213 // Other mbed Pin Names
ClementBreteau 1:f3f702086a30 214 , LED1 = P1_8
ClementBreteau 1:f3f702086a30 215 , LED2 = P1_9
ClementBreteau 1:f3f702086a30 216 , LED3 = P1_10
ClementBreteau 1:f3f702086a30 217 , LED4 = P1_11
ClementBreteau 1:f3f702086a30 218
ClementBreteau 1:f3f702086a30 219 , USBTX = P0_19
ClementBreteau 1:f3f702086a30 220 , USBRX = P0_18
ClementBreteau 1:f3f702086a30 221
ClementBreteau 1:f3f702086a30 222 // Not connected
ClementBreteau 1:f3f702086a30 223 , NC = (int)0xFFFFFFFF
ClementBreteau 1:f3f702086a30 224
ClementBreteau 1:f3f702086a30 225 };
ClementBreteau 1:f3f702086a30 226 typedef enum PinName PinName;
ClementBreteau 1:f3f702086a30 227
ClementBreteau 1:f3f702086a30 228 typedef enum {
ClementBreteau 1:f3f702086a30 229 CHANNEL0=FLEX_INT0_IRQn,
ClementBreteau 1:f3f702086a30 230 CHANNEL1=FLEX_INT1_IRQn,
ClementBreteau 1:f3f702086a30 231 CHANNEL2=FLEX_INT2_IRQn,
ClementBreteau 1:f3f702086a30 232 CHANNEL3=FLEX_INT3_IRQn,
ClementBreteau 1:f3f702086a30 233 CHANNEL4=FLEX_INT4_IRQn,
ClementBreteau 1:f3f702086a30 234 CHANNEL5=FLEX_INT5_IRQn,
ClementBreteau 1:f3f702086a30 235 CHANNEL6=FLEX_INT6_IRQn,
ClementBreteau 1:f3f702086a30 236 CHANNEL7=FLEX_INT7_IRQn
ClementBreteau 1:f3f702086a30 237 } Channel;
ClementBreteau 1:f3f702086a30 238
ClementBreteau 1:f3f702086a30 239 enum PinMode {
ClementBreteau 1:f3f702086a30 240 PullUp = 2
ClementBreteau 1:f3f702086a30 241 , PullDown = 1
ClementBreteau 1:f3f702086a30 242 , PullNone = 0
ClementBreteau 1:f3f702086a30 243 , Repeater = 3
ClementBreteau 1:f3f702086a30 244 , OpenDrain = 4
ClementBreteau 1:f3f702086a30 245 };
ClementBreteau 1:f3f702086a30 246 typedef enum PinMode PinMode;
ClementBreteau 1:f3f702086a30 247 #endif
ClementBreteau 1:f3f702086a30 248
ClementBreteau 1:f3f702086a30 249
ClementBreteau 1:f3f702086a30 250 #ifdef __cplusplus
ClementBreteau 1:f3f702086a30 251 }
ClementBreteau 1:f3f702086a30 252 #endif
ClementBreteau 1:f3f702086a30 253
ClementBreteau 1:f3f702086a30 254 #endif