5.2.1 - Updated I2C files

Dependents:   mbed-TFT-example-NCS36510 mbed-Accelerometer-example-NCS36510 mbed-Accelerometer-example-NCS36510

Committer:
group-onsemi
Date:
Wed Jan 25 20:34:15 2017 +0000
Revision:
0:098463de4c5d
Initial commit

Who changed what in which revision?

UserRevisionLine numberNew contents of line
group-onsemi 0:098463de4c5d 1 /* mbed Microcontroller Library
group-onsemi 0:098463de4c5d 2 * Copyright (c) 2006-2013 ARM Limited
group-onsemi 0:098463de4c5d 3 *
group-onsemi 0:098463de4c5d 4 * Licensed under the Apache License, Version 2.0 (the "License");
group-onsemi 0:098463de4c5d 5 * you may not use this file except in compliance with the License.
group-onsemi 0:098463de4c5d 6 * You may obtain a copy of the License at
group-onsemi 0:098463de4c5d 7 *
group-onsemi 0:098463de4c5d 8 * http://www.apache.org/licenses/LICENSE-2.0
group-onsemi 0:098463de4c5d 9 *
group-onsemi 0:098463de4c5d 10 * Unless required by applicable law or agreed to in writing, software
group-onsemi 0:098463de4c5d 11 * distributed under the License is distributed on an "AS IS" BASIS,
group-onsemi 0:098463de4c5d 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
group-onsemi 0:098463de4c5d 13 * See the License for the specific language governing permissions and
group-onsemi 0:098463de4c5d 14 * limitations under the License.
group-onsemi 0:098463de4c5d 15 */
group-onsemi 0:098463de4c5d 16 #ifndef MBED_PINNAMES_H
group-onsemi 0:098463de4c5d 17 #define MBED_PINNAMES_H
group-onsemi 0:098463de4c5d 18
group-onsemi 0:098463de4c5d 19 #include "cmsis.h"
group-onsemi 0:098463de4c5d 20
group-onsemi 0:098463de4c5d 21 #ifdef __cplusplus
group-onsemi 0:098463de4c5d 22 extern "C" {
group-onsemi 0:098463de4c5d 23 #endif
group-onsemi 0:098463de4c5d 24
group-onsemi 0:098463de4c5d 25 typedef enum {
group-onsemi 0:098463de4c5d 26 PIN_INPUT,
group-onsemi 0:098463de4c5d 27 PIN_OUTPUT
group-onsemi 0:098463de4c5d 28 } PinDirection;
group-onsemi 0:098463de4c5d 29
group-onsemi 0:098463de4c5d 30 #define PORT_SHIFT 5
group-onsemi 0:098463de4c5d 31
group-onsemi 0:098463de4c5d 32 typedef enum {
group-onsemi 0:098463de4c5d 33 // MPS2 EXP Pin Names
group-onsemi 0:098463de4c5d 34 EXP0 = 0 ,
group-onsemi 0:098463de4c5d 35 EXP1 = 4 ,
group-onsemi 0:098463de4c5d 36 EXP2 = 2 ,
group-onsemi 0:098463de4c5d 37 EXP3 = 3 ,
group-onsemi 0:098463de4c5d 38 EXP4 = 1 ,
group-onsemi 0:098463de4c5d 39 EXP5 = 15,
group-onsemi 0:098463de4c5d 40 EXP6 = 5 ,
group-onsemi 0:098463de4c5d 41 EXP7 = 6 ,
group-onsemi 0:098463de4c5d 42 EXP8 = 7 ,
group-onsemi 0:098463de4c5d 43 EXP9 = 8 ,
group-onsemi 0:098463de4c5d 44 EXP10 =9 ,
group-onsemi 0:098463de4c5d 45 EXP11 =13,
group-onsemi 0:098463de4c5d 46 EXP12 =10,
group-onsemi 0:098463de4c5d 47 EXP13 =11,
group-onsemi 0:098463de4c5d 48 EXP14 =12,
group-onsemi 0:098463de4c5d 49 EXP15 =14,
group-onsemi 0:098463de4c5d 50 EXP16 =18,
group-onsemi 0:098463de4c5d 51 EXP17 =19,
group-onsemi 0:098463de4c5d 52 EXP18 =20,
group-onsemi 0:098463de4c5d 53 EXP19 =21,
group-onsemi 0:098463de4c5d 54 EXP20 =52,
group-onsemi 0:098463de4c5d 55 EXP21 =53,
group-onsemi 0:098463de4c5d 56 EXP22 =54,
group-onsemi 0:098463de4c5d 57 EXP23 =55,
group-onsemi 0:098463de4c5d 58 EXP24 =56,
group-onsemi 0:098463de4c5d 59 EXP25 =57,
group-onsemi 0:098463de4c5d 60
group-onsemi 0:098463de4c5d 61 EXP26 =16,
group-onsemi 0:098463de4c5d 62 EXP27 =25,
group-onsemi 0:098463de4c5d 63 EXP28 =24,
group-onsemi 0:098463de4c5d 64 EXP29 =31,
group-onsemi 0:098463de4c5d 65 EXP30 =17,
group-onsemi 0:098463de4c5d 66 EXP31 =23,
group-onsemi 0:098463de4c5d 67 EXP32 =27,
group-onsemi 0:098463de4c5d 68 EXP33 =30,
group-onsemi 0:098463de4c5d 69 EXP34 =26,
group-onsemi 0:098463de4c5d 70 EXP35 =28,
group-onsemi 0:098463de4c5d 71 EXP36 =29,
group-onsemi 0:098463de4c5d 72 EXP37 =58,
group-onsemi 0:098463de4c5d 73 EXP38 =48,
group-onsemi 0:098463de4c5d 74 EXP39 =49,
group-onsemi 0:098463de4c5d 75 EXP40 =50,
group-onsemi 0:098463de4c5d 76 EXP41 =22,
group-onsemi 0:098463de4c5d 77 EXP42 =59,
group-onsemi 0:098463de4c5d 78 EXP43 =60,
group-onsemi 0:098463de4c5d 79 EXP44 =51,
group-onsemi 0:098463de4c5d 80 EXP45 =61,
group-onsemi 0:098463de4c5d 81 EXP46 =62,
group-onsemi 0:098463de4c5d 82 EXP47 =63,
group-onsemi 0:098463de4c5d 83 EXP48 =64,
group-onsemi 0:098463de4c5d 84 EXP49 =65,
group-onsemi 0:098463de4c5d 85 EXP50 =66,
group-onsemi 0:098463de4c5d 86 EXP51 =67,
group-onsemi 0:098463de4c5d 87
group-onsemi 0:098463de4c5d 88 // Other mbed Pin Names
group-onsemi 0:098463de4c5d 89
group-onsemi 0:098463de4c5d 90 //LEDs on mps2
group-onsemi 0:098463de4c5d 91 //user leds
group-onsemi 0:098463de4c5d 92 USERLED1 = 100,
group-onsemi 0:098463de4c5d 93 USERLED2 = 101,
group-onsemi 0:098463de4c5d 94 //user switches
group-onsemi 0:098463de4c5d 95 USERSW1 = 110,
group-onsemi 0:098463de4c5d 96 USERSW2 = 111,
group-onsemi 0:098463de4c5d 97
group-onsemi 0:098463de4c5d 98 //mcc leds
group-onsemi 0:098463de4c5d 99 LED1 = 200,
group-onsemi 0:098463de4c5d 100 LED2 = 201,
group-onsemi 0:098463de4c5d 101 LED3 = 202,
group-onsemi 0:098463de4c5d 102 LED4 = 203,
group-onsemi 0:098463de4c5d 103 LED5 = 204,
group-onsemi 0:098463de4c5d 104 LED6 = 205,
group-onsemi 0:098463de4c5d 105 LED7 = 206,
group-onsemi 0:098463de4c5d 106 LED8 = 207,
group-onsemi 0:098463de4c5d 107
group-onsemi 0:098463de4c5d 108 //MCC Switches
group-onsemi 0:098463de4c5d 109 SW1 = 210,
group-onsemi 0:098463de4c5d 110 SW2 = 211,
group-onsemi 0:098463de4c5d 111 SW3 = 212,
group-onsemi 0:098463de4c5d 112 SW4 = 213,
group-onsemi 0:098463de4c5d 113 SW5 = 214,
group-onsemi 0:098463de4c5d 114 SW6 = 215,
group-onsemi 0:098463de4c5d 115 SW7 = 216,
group-onsemi 0:098463de4c5d 116 SW8 = 217,
group-onsemi 0:098463de4c5d 117
group-onsemi 0:098463de4c5d 118 //MPS2 SPI header pins j21
group-onsemi 0:098463de4c5d 119 MOSI_SPI = 300,
group-onsemi 0:098463de4c5d 120 MISO_SPI = 301,
group-onsemi 0:098463de4c5d 121 SCLK_SPI = 302,
group-onsemi 0:098463de4c5d 122 SSEL_SPI = 303,
group-onsemi 0:098463de4c5d 123
group-onsemi 0:098463de4c5d 124 //MPS2 CLCD SPI
group-onsemi 0:098463de4c5d 125 CLCD_MOSI = 304,
group-onsemi 0:098463de4c5d 126 CLCD_MISO = 305,
group-onsemi 0:098463de4c5d 127 CLCD_SCLK = 306,
group-onsemi 0:098463de4c5d 128 CLCD_SSEL = 307,
group-onsemi 0:098463de4c5d 129 CLCD_RESET = 308,
group-onsemi 0:098463de4c5d 130 CLCD_RS = 309,
group-onsemi 0:098463de4c5d 131 CLCD_RD = 310,
group-onsemi 0:098463de4c5d 132 CLCD_BL_CTRL = 311,
group-onsemi 0:098463de4c5d 133
group-onsemi 0:098463de4c5d 134 //MPS2 shield 0 SPI
group-onsemi 0:098463de4c5d 135 SHIELD_0_SPI_SCK = 320,
group-onsemi 0:098463de4c5d 136 SHIELD_0_SPI_MOSI = 321,
group-onsemi 0:098463de4c5d 137 SHIELD_0_SPI_MISO = 322,
group-onsemi 0:098463de4c5d 138 SHIELD_0_SPI_nCS = 323,
group-onsemi 0:098463de4c5d 139
group-onsemi 0:098463de4c5d 140 //MPS2 shield 1 SPI
group-onsemi 0:098463de4c5d 141 SHIELD_1_SPI_SCK = 331,
group-onsemi 0:098463de4c5d 142 SHIELD_1_SPI_MOSI = 332,
group-onsemi 0:098463de4c5d 143 SHIELD_1_SPI_MISO = 333,
group-onsemi 0:098463de4c5d 144 SHIELD_1_SPI_nCS = 334,
group-onsemi 0:098463de4c5d 145
group-onsemi 0:098463de4c5d 146 //MPS2 shield ADC SPI
group-onsemi 0:098463de4c5d 147 ADC_MOSI = 650,
group-onsemi 0:098463de4c5d 148 ADC_MISO = 651,
group-onsemi 0:098463de4c5d 149 ADC_SCLK = 652,
group-onsemi 0:098463de4c5d 150 ADC_SSEL = 653,
group-onsemi 0:098463de4c5d 151
group-onsemi 0:098463de4c5d 152 //MPS2 Uart
group-onsemi 0:098463de4c5d 153 USBTX = 400,
group-onsemi 0:098463de4c5d 154 USBRX = 401,
group-onsemi 0:098463de4c5d 155 XB_TX = 402,
group-onsemi 0:098463de4c5d 156 XB_RX = 403,
group-onsemi 0:098463de4c5d 157 SH0_TX = 404,
group-onsemi 0:098463de4c5d 158 SH0_RX = 405,
group-onsemi 0:098463de4c5d 159 SH1_TX = 406,
group-onsemi 0:098463de4c5d 160 SH1_RX = 407,
group-onsemi 0:098463de4c5d 161
group-onsemi 0:098463de4c5d 162 //MPS2 I2C touchscreen and audio
group-onsemi 0:098463de4c5d 163 TSC_SDA = 500,
group-onsemi 0:098463de4c5d 164 TSC_SCL = 501,
group-onsemi 0:098463de4c5d 165 AUD_SDA = 502,
group-onsemi 0:098463de4c5d 166 AUD_SCL = 503,
group-onsemi 0:098463de4c5d 167
group-onsemi 0:098463de4c5d 168 //MPS2 I2C for shield
group-onsemi 0:098463de4c5d 169 SHIELD_0_SDA = 504,
group-onsemi 0:098463de4c5d 170 SHIELD_0_SCL = 505,
group-onsemi 0:098463de4c5d 171 SHIELD_1_SDA = 506,
group-onsemi 0:098463de4c5d 172 SHIELD_1_SCL = 507,
group-onsemi 0:098463de4c5d 173
group-onsemi 0:098463de4c5d 174 //MPS2 shield Analog pins
group-onsemi 0:098463de4c5d 175 A0_0 = 600,
group-onsemi 0:098463de4c5d 176 A0_1 = 601,
group-onsemi 0:098463de4c5d 177 A0_2 = 602,
group-onsemi 0:098463de4c5d 178 A0_3 = 603,
group-onsemi 0:098463de4c5d 179 A0_4 = 604,
group-onsemi 0:098463de4c5d 180 A0_5 = 605,
group-onsemi 0:098463de4c5d 181 A1_0 = 606,
group-onsemi 0:098463de4c5d 182 A1_1 = 607,
group-onsemi 0:098463de4c5d 183 A1_2 = 608,
group-onsemi 0:098463de4c5d 184 A1_3 = 609,
group-onsemi 0:098463de4c5d 185 A1_4 = 610,
group-onsemi 0:098463de4c5d 186 A1_5 = 611,
group-onsemi 0:098463de4c5d 187 //MPS2 Shield Digital pins
group-onsemi 0:098463de4c5d 188 D0_0 = EXP0,
group-onsemi 0:098463de4c5d 189 D0_1 = EXP4,
group-onsemi 0:098463de4c5d 190 D0_2 = EXP2,
group-onsemi 0:098463de4c5d 191 D0_3 = EXP3,
group-onsemi 0:098463de4c5d 192 D0_4 = EXP1,
group-onsemi 0:098463de4c5d 193 D0_5 = EXP6,
group-onsemi 0:098463de4c5d 194 D0_6 = EXP7,
group-onsemi 0:098463de4c5d 195 D0_7 = EXP8,
group-onsemi 0:098463de4c5d 196 D0_8 = EXP9,
group-onsemi 0:098463de4c5d 197 D0_9 = EXP10,
group-onsemi 0:098463de4c5d 198 D0_10 = EXP12,
group-onsemi 0:098463de4c5d 199 D0_11 = EXP13,
group-onsemi 0:098463de4c5d 200 D0_12 = EXP14,
group-onsemi 0:098463de4c5d 201 D0_13 = EXP11,
group-onsemi 0:098463de4c5d 202 D0_14 = EXP15,
group-onsemi 0:098463de4c5d 203 D0_15 = EXP5,
group-onsemi 0:098463de4c5d 204
group-onsemi 0:098463de4c5d 205 D1_0 = EXP26,
group-onsemi 0:098463de4c5d 206 D1_1 = EXP30,
group-onsemi 0:098463de4c5d 207 D1_2 = EXP28,
group-onsemi 0:098463de4c5d 208 D1_3 = EXP29,
group-onsemi 0:098463de4c5d 209 D1_4 = EXP27,
group-onsemi 0:098463de4c5d 210 D1_5 = EXP32,
group-onsemi 0:098463de4c5d 211 D1_6 = EXP33,
group-onsemi 0:098463de4c5d 212 D1_7 = EXP34,
group-onsemi 0:098463de4c5d 213 D1_8 = EXP35,
group-onsemi 0:098463de4c5d 214 D1_9 = EXP36,
group-onsemi 0:098463de4c5d 215 D1_10 = EXP38,
group-onsemi 0:098463de4c5d 216 D1_11 = EXP39,
group-onsemi 0:098463de4c5d 217 D1_12 = EXP40,
group-onsemi 0:098463de4c5d 218 D1_13 = EXP44,
group-onsemi 0:098463de4c5d 219 D1_14 = EXP41,
group-onsemi 0:098463de4c5d 220 D1_15 = EXP31,
group-onsemi 0:098463de4c5d 221
group-onsemi 0:098463de4c5d 222 // Not connected
group-onsemi 0:098463de4c5d 223 NC = (int)0xFFFFFFFF,
group-onsemi 0:098463de4c5d 224 } PinName;
group-onsemi 0:098463de4c5d 225
group-onsemi 0:098463de4c5d 226
group-onsemi 0:098463de4c5d 227 typedef enum {
group-onsemi 0:098463de4c5d 228 PullUp = 2,
group-onsemi 0:098463de4c5d 229 PullDown = 1,
group-onsemi 0:098463de4c5d 230 PullNone = 0,
group-onsemi 0:098463de4c5d 231 Repeater = 3,
group-onsemi 0:098463de4c5d 232 OpenDrain = 4,
group-onsemi 0:098463de4c5d 233 PullDefault = PullDown
group-onsemi 0:098463de4c5d 234 } PinMode;
group-onsemi 0:098463de4c5d 235
group-onsemi 0:098463de4c5d 236 #ifdef __cplusplus
group-onsemi 0:098463de4c5d 237 }
group-onsemi 0:098463de4c5d 238 #endif
group-onsemi 0:098463de4c5d 239
group-onsemi 0:098463de4c5d 240 #endif
group-onsemi 0:098463de4c5d 241