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:
Fri Jun 22 15:38:59 2018 +0100
Revision:
169:a7c7b631e539
mbed library. Release version 162

Who changed what in which revision?

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