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