mbed library sources. Supersedes mbed-src.

Dependents:   Nucleo_Hello_Encoder BLE_iBeaconScan AM1805_DEMO DISCO-F429ZI_ExportTemplate1 ... more

Committer:
Anna Bridge
Date:
Wed May 10 12:06:41 2017 +0100
Revision:
164:289d4deac6e4
Parent:
158:b23ee177fd68
Child:
168:9672193075cf
This updates the lib to the mbed lib v142

Who changed what in which revision?

UserRevisionLine numberNew contents of line
<> 149:156823d33999 1 /* mbed Microcontroller Library
<> 149:156823d33999 2 *******************************************************************************
<> 149:156823d33999 3 * Copyright (c) 2016, STMicroelectronics
<> 149:156823d33999 4 * All rights reserved.
<> 149:156823d33999 5 *
<> 149:156823d33999 6 * Redistribution and use in source and binary forms, with or without
<> 149:156823d33999 7 * modification, are permitted provided that the following conditions are met:
<> 149:156823d33999 8 *
<> 149:156823d33999 9 * 1. Redistributions of source code must retain the above copyright notice,
<> 149:156823d33999 10 * this list of conditions and the following disclaimer.
<> 149:156823d33999 11 * 2. Redistributions in binary form must reproduce the above copyright notice,
<> 149:156823d33999 12 * this list of conditions and the following disclaimer in the documentation
<> 149:156823d33999 13 * and/or other materials provided with the distribution.
<> 149:156823d33999 14 * 3. Neither the name of STMicroelectronics nor the names of its contributors
<> 149:156823d33999 15 * may be used to endorse or promote products derived from this software
<> 149:156823d33999 16 * without specific prior written permission.
<> 149:156823d33999 17 *
<> 149:156823d33999 18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
<> 149:156823d33999 19 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
<> 149:156823d33999 20 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
<> 149:156823d33999 21 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
<> 149:156823d33999 22 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
<> 149:156823d33999 23 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
<> 149:156823d33999 24 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
<> 149:156823d33999 25 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
<> 149:156823d33999 26 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
<> 149:156823d33999 27 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
<> 149:156823d33999 28 *******************************************************************************
<> 149:156823d33999 29 */
<> 149:156823d33999 30 #ifndef MBED_PINNAMES_H
<> 149:156823d33999 31 #define MBED_PINNAMES_H
<> 149:156823d33999 32
<> 149:156823d33999 33 #include "cmsis.h"
<> 157:ff67d9f36b67 34 #include "PinNamesTypes.h"
<> 149:156823d33999 35
<> 149:156823d33999 36 #ifdef __cplusplus
<> 149:156823d33999 37 extern "C" {
<> 149:156823d33999 38 #endif
<> 149:156823d33999 39
<> 149:156823d33999 40 typedef enum {
<> 149:156823d33999 41 PA_0 = 0x00, // On P1/P2 connectors
<> 149:156823d33999 42 PA_1 = 0x01, // On P1/P2 connectors
<> 149:156823d33999 43 PA_2 = 0x02, // On P1/P2 connectors
<> 149:156823d33999 44 PA_3 = 0x03, // On P1/P2 connectors
<> 149:156823d33999 45 PA_4 = 0x04,
<> 149:156823d33999 46 PA_5 = 0x05, // On P1/P2 connectors
<> 149:156823d33999 47 PA_6 = 0x06,
<> 149:156823d33999 48 PA_7 = 0x07,
<> 149:156823d33999 49 PA_8 = 0x08,
<> 149:156823d33999 50 PA_9 = 0x09,
<> 149:156823d33999 51 PA_10 = 0x0A,
<> 149:156823d33999 52 PA_11 = 0x0B,
<> 149:156823d33999 53 PA_12 = 0x0C,
<> 149:156823d33999 54 PA_13 = 0x0D,
<> 149:156823d33999 55 PA_14 = 0x0E,
<> 149:156823d33999 56 PA_15 = 0x0F,
<> 149:156823d33999 57
<> 149:156823d33999 58 PB_0 = 0x10,
<> 149:156823d33999 59 PB_1 = 0x11,
<> 149:156823d33999 60 PB_2 = 0x12, // On P1/P2 connectors
<> 149:156823d33999 61 PB_3 = 0x13, // On P1/P2 connectors
<> 149:156823d33999 62 PB_4 = 0x14,
<> 149:156823d33999 63 PB_5 = 0x15,
<> 149:156823d33999 64 PB_6 = 0x16,
<> 149:156823d33999 65 PB_7 = 0x17,
<> 149:156823d33999 66 PB_8 = 0x18, // On P1/P2 connectors
<> 149:156823d33999 67 PB_9 = 0x19, // On P1/P2 connectors
<> 149:156823d33999 68 PB_10 = 0x1A,
<> 149:156823d33999 69 PB_11 = 0x1B,
<> 149:156823d33999 70 PB_12 = 0x1C,
<> 149:156823d33999 71 PB_13 = 0x1D,
<> 149:156823d33999 72 PB_14 = 0x1E,
<> 149:156823d33999 73 PB_15 = 0x1F,
<> 149:156823d33999 74
<> 149:156823d33999 75 PC_0 = 0x20,
<> 149:156823d33999 76 PC_1 = 0x21,
<> 149:156823d33999 77 PC_2 = 0x22,
<> 149:156823d33999 78 PC_3 = 0x23,
<> 149:156823d33999 79 PC_4 = 0x24,
<> 149:156823d33999 80 PC_5 = 0x25,
<> 149:156823d33999 81 PC_6 = 0x26,
<> 149:156823d33999 82 PC_7 = 0x27,
<> 149:156823d33999 83 PC_8 = 0x28,
<> 149:156823d33999 84 PC_9 = 0x29,
<> 149:156823d33999 85 PC_10 = 0x2A,
<> 149:156823d33999 86 PC_11 = 0x2B,
<> 149:156823d33999 87 PC_12 = 0x2C,
<> 149:156823d33999 88 PC_13 = 0x2D,
<> 149:156823d33999 89 PC_14 = 0x2E, // On P1/P2 connectors
<> 149:156823d33999 90 PC_15 = 0x2F, // On P1/P2 connectors
<> 149:156823d33999 91
<> 149:156823d33999 92 PD_0 = 0x30, // On P1/P2 connectors
<> 149:156823d33999 93 PD_1 = 0x31,
<> 149:156823d33999 94 PD_2 = 0x32,
<> 149:156823d33999 95 PD_3 = 0x33,
<> 149:156823d33999 96 PD_4 = 0x34,
<> 149:156823d33999 97 PD_5 = 0x35,
<> 149:156823d33999 98 PD_6 = 0x36,
<> 149:156823d33999 99 PD_7 = 0x37,
<> 149:156823d33999 100 PD_8 = 0x38,
<> 149:156823d33999 101 PD_9 = 0x39,
<> 149:156823d33999 102 PD_10 = 0x3A,
<> 149:156823d33999 103 PD_11 = 0x3B,
<> 149:156823d33999 104 PD_12 = 0x3C,
<> 149:156823d33999 105 PD_13 = 0x3D,
<> 149:156823d33999 106 PD_14 = 0x3E,
<> 149:156823d33999 107 PD_15 = 0x3F,
<> 149:156823d33999 108
<> 149:156823d33999 109 PE_0 = 0x40,
<> 149:156823d33999 110 PE_1 = 0x41,
<> 149:156823d33999 111 PE_2 = 0x42,
<> 149:156823d33999 112 PE_3 = 0x43,
<> 149:156823d33999 113 PE_4 = 0x44,
<> 149:156823d33999 114 PE_5 = 0x45,
<> 149:156823d33999 115 PE_6 = 0x46,
<> 149:156823d33999 116 PE_7 = 0x47,
<> 149:156823d33999 117 PE_8 = 0x48, // On P1/P2 connectors
<> 149:156823d33999 118 PE_9 = 0x49,
<> 149:156823d33999 119 PE_10 = 0x4A, // On P1/P2 connectors
<> 149:156823d33999 120 PE_11 = 0x4B, // On P1/P2 connectors
<> 149:156823d33999 121 PE_12 = 0x4C, // On P1/P2 connectors
<> 149:156823d33999 122 PE_13 = 0x4D, // On P1/P2 connectors
<> 149:156823d33999 123 PE_14 = 0x4E, // On P1/P2 connectors
<> 149:156823d33999 124 PE_15 = 0x4F, // On P1/P2 connectors
<> 149:156823d33999 125
<> 149:156823d33999 126 PH_0 = 0x70, // On P1/P2 connectors
<> 149:156823d33999 127 PH_1 = 0x71, // On P1/P2 connectors
<> 149:156823d33999 128
<> 149:156823d33999 129 // ADC internal channels
<> 149:156823d33999 130 ADC_TEMP = 0xF0,
<> 149:156823d33999 131 ADC_VREF = 0xF1,
<> 149:156823d33999 132 ADC_VBAT = 0xF2,
<> 149:156823d33999 133
<> 149:156823d33999 134 // Generic signals namings
<> 149:156823d33999 135 LED1 = PE_8, // LD5 Green
<> 149:156823d33999 136 LED2 = PB_2, // LD4 Red
<> 149:156823d33999 137 LED3 = LED1,
<> 149:156823d33999 138 LED4 = LED2,
<> 149:156823d33999 139 JOYSTICK_CENTER = PA_0,
<> 149:156823d33999 140 JOYSTICK_LEFT = PA_1,
<> 149:156823d33999 141 JOYSTICK_RIGHT = PA_2,
<> 149:156823d33999 142 JOYSTICK_UP = PA_3,
<> 149:156823d33999 143 JOYSTICK_DOWN = PA_5,
<> 149:156823d33999 144 USER_BUTTON = JOYSTICK_CENTER,
Anna Bridge 164:289d4deac6e4 145 // Standardized button names
Anna Bridge 164:289d4deac6e4 146 BUTTON1 = USER_BUTTON,
Anna Bridge 164:289d4deac6e4 147 BUTTON2 = JOYSTICK_LEFT,
Anna Bridge 164:289d4deac6e4 148 BUTTON3 = JOYSTICK_RIGHT,
Anna Bridge 164:289d4deac6e4 149 BUTTON4 = JOYSTICK_UP,
Anna Bridge 164:289d4deac6e4 150 BUTTON5 = JOYSTICK_DOWN,
Anna Bridge 164:289d4deac6e4 151
<> 149:156823d33999 152 SERIAL_TX = PD_5,
<> 149:156823d33999 153 SERIAL_RX = PD_6,
<> 149:156823d33999 154 USBTX = PD_5,
<> 149:156823d33999 155 USBRX = PD_6,
<> 149:156823d33999 156
<> 149:156823d33999 157 I2C_SCL = PB_8,
<> 149:156823d33999 158 I2C_SDA = PB_9,
<> 149:156823d33999 159 SPI_MOSI = PA_7,
<> 149:156823d33999 160 SPI_MISO = PA_6,
<> 149:156823d33999 161 SPI_SCK = PA_5,
<> 149:156823d33999 162 SPI_CS = PA_4,
<> 149:156823d33999 163 PWM_OUT = PB_3,
<> 149:156823d33999 164
<> 149:156823d33999 165 // Not connected
<> 149:156823d33999 166 NC = (int)0xFFFFFFFF
<> 149:156823d33999 167 } PinName;
<> 149:156823d33999 168
<> 149:156823d33999 169 #ifdef __cplusplus
<> 149:156823d33999 170 }
<> 149:156823d33999 171 #endif
<> 149:156823d33999 172
<> 149:156823d33999 173 #endif