The official Mbed 2 C/C++ SDK provides the software platform and libraries to build your applications.

Dependents:   hello SerialTestv11 SerialTestv12 Sierpinski ... more

mbed 2

This is the mbed 2 library. If you'd like to learn about Mbed OS please see the mbed-os docs.

Committer:
Anna Bridge
Date:
Wed Jan 17 16:13:02 2018 +0000
Revision:
160:5571c4ff569f
mbed library. Release version 158

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Anna Bridge 160:5571c4ff569f 1 /* mbed Microcontroller Library
Anna Bridge 160:5571c4ff569f 2 *******************************************************************************
Anna Bridge 160:5571c4ff569f 3 * Copyright (c) 2014, STMicroelectronics
Anna Bridge 160:5571c4ff569f 4 * All rights reserved.
Anna Bridge 160:5571c4ff569f 5 *
Anna Bridge 160:5571c4ff569f 6 * Redistribution and use in source and binary forms, with or without
Anna Bridge 160:5571c4ff569f 7 * modification, are permitted provided that the following conditions are met:
Anna Bridge 160:5571c4ff569f 8 *
Anna Bridge 160:5571c4ff569f 9 * 1. Redistributions of source code must retain the above copyright notice,
Anna Bridge 160:5571c4ff569f 10 * this list of conditions and the following disclaimer.
Anna Bridge 160:5571c4ff569f 11 * 2. Redistributions in binary form must reproduce the above copyright notice,
Anna Bridge 160:5571c4ff569f 12 * this list of conditions and the following disclaimer in the documentation
Anna Bridge 160:5571c4ff569f 13 * and/or other materials provided with the distribution.
Anna Bridge 160:5571c4ff569f 14 * 3. Neither the name of STMicroelectronics nor the names of its contributors
Anna Bridge 160:5571c4ff569f 15 * may be used to endorse or promote products derived from this software
Anna Bridge 160:5571c4ff569f 16 * without specific prior written permission.
Anna Bridge 160:5571c4ff569f 17 *
Anna Bridge 160:5571c4ff569f 18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
Anna Bridge 160:5571c4ff569f 19 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
Anna Bridge 160:5571c4ff569f 20 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
Anna Bridge 160:5571c4ff569f 21 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
Anna Bridge 160:5571c4ff569f 22 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
Anna Bridge 160:5571c4ff569f 23 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
Anna Bridge 160:5571c4ff569f 24 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
Anna Bridge 160:5571c4ff569f 25 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
Anna Bridge 160:5571c4ff569f 26 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
Anna Bridge 160:5571c4ff569f 27 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Anna Bridge 160:5571c4ff569f 28 *******************************************************************************
Anna Bridge 160:5571c4ff569f 29 */
Anna Bridge 160:5571c4ff569f 30
Anna Bridge 160:5571c4ff569f 31 #ifndef MBED_PERIPHERALPINS_H
Anna Bridge 160:5571c4ff569f 32 #define MBED_PERIPHERALPINS_H
Anna Bridge 160:5571c4ff569f 33
Anna Bridge 160:5571c4ff569f 34 #include "pinmap.h"
Anna Bridge 160:5571c4ff569f 35 #include "PeripheralNames.h"
Anna Bridge 160:5571c4ff569f 36
Anna Bridge 160:5571c4ff569f 37 //*** ADC ***
Anna Bridge 160:5571c4ff569f 38 #ifdef DEVICE_ANALOGIN
Anna Bridge 160:5571c4ff569f 39 extern const PinMap PinMap_ADC[];
Anna Bridge 160:5571c4ff569f 40 extern const PinMap PinMap_ADC_Internal[];
Anna Bridge 160:5571c4ff569f 41 #endif
Anna Bridge 160:5571c4ff569f 42
Anna Bridge 160:5571c4ff569f 43 //*** DAC ***
Anna Bridge 160:5571c4ff569f 44 #ifdef DEVICE_ANALOGOUT
Anna Bridge 160:5571c4ff569f 45 extern const PinMap PinMap_DAC[];
Anna Bridge 160:5571c4ff569f 46 #endif
Anna Bridge 160:5571c4ff569f 47
Anna Bridge 160:5571c4ff569f 48 //*** I2C ***
Anna Bridge 160:5571c4ff569f 49 #if DEVICE_I2C
Anna Bridge 160:5571c4ff569f 50 extern const PinMap PinMap_I2C_SDA[];
Anna Bridge 160:5571c4ff569f 51 extern const PinMap PinMap_I2C_SCL[];
Anna Bridge 160:5571c4ff569f 52 #endif
Anna Bridge 160:5571c4ff569f 53
Anna Bridge 160:5571c4ff569f 54 //*** PWM ***
Anna Bridge 160:5571c4ff569f 55 #if DEVICE_PWMOUT
Anna Bridge 160:5571c4ff569f 56 extern const PinMap PinMap_PWM[];
Anna Bridge 160:5571c4ff569f 57 #endif
Anna Bridge 160:5571c4ff569f 58
Anna Bridge 160:5571c4ff569f 59 //*** SERIAL ***
Anna Bridge 160:5571c4ff569f 60 #ifdef DEVICE_SERIAL
Anna Bridge 160:5571c4ff569f 61 extern const PinMap PinMap_UART_TX[];
Anna Bridge 160:5571c4ff569f 62 extern const PinMap PinMap_UART_RX[];
Anna Bridge 160:5571c4ff569f 63 #ifdef DEVICE_SERIAL_FC
Anna Bridge 160:5571c4ff569f 64 extern const PinMap PinMap_UART_RTS[];
Anna Bridge 160:5571c4ff569f 65 extern const PinMap PinMap_UART_CTS[];
Anna Bridge 160:5571c4ff569f 66 #endif
Anna Bridge 160:5571c4ff569f 67 #endif
Anna Bridge 160:5571c4ff569f 68
Anna Bridge 160:5571c4ff569f 69 //*** SPI ***
Anna Bridge 160:5571c4ff569f 70 #ifdef DEVICE_SPI
Anna Bridge 160:5571c4ff569f 71 extern const PinMap PinMap_SPI_MOSI[];
Anna Bridge 160:5571c4ff569f 72 extern const PinMap PinMap_SPI_MISO[];
Anna Bridge 160:5571c4ff569f 73 extern const PinMap PinMap_SPI_SCLK[];
Anna Bridge 160:5571c4ff569f 74 extern const PinMap PinMap_SPI_SSEL[];
Anna Bridge 160:5571c4ff569f 75 #endif
Anna Bridge 160:5571c4ff569f 76
Anna Bridge 160:5571c4ff569f 77 //*** CAN ***
Anna Bridge 160:5571c4ff569f 78 #ifdef DEVICE_CAN
Anna Bridge 160:5571c4ff569f 79 extern const PinMap PinMap_CAN_RD[];
Anna Bridge 160:5571c4ff569f 80 extern const PinMap PinMap_CAN_TD[];
Anna Bridge 160:5571c4ff569f 81 #endif
Anna Bridge 160:5571c4ff569f 82
Anna Bridge 160:5571c4ff569f 83 #endif