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:
emilmont
Date:
Fri Feb 14 14:36:43 2014 +0000
Revision:
77:869cf507173a
Child:
81:7d30d6019079
Release 77 of the mbed library

Main changes:
* Add target NUCLEO_F030R8
* Add target NUCLEO_F401RE
* Add target NUCLEO_F103RB
* Add target NUCLEO_L152RE

Who changed what in which revision?

UserRevisionLine numberNew contents of line
emilmont 77:869cf507173a 1 /* mbed Microcontroller Library
emilmont 77:869cf507173a 2 *******************************************************************************
emilmont 77:869cf507173a 3 * Copyright (c) 2014, STMicroelectronics
emilmont 77:869cf507173a 4 * All rights reserved.
emilmont 77:869cf507173a 5 *
emilmont 77:869cf507173a 6 * Redistribution and use in source and binary forms, with or without
emilmont 77:869cf507173a 7 * modification, are permitted provided that the following conditions are met:
emilmont 77:869cf507173a 8 *
emilmont 77:869cf507173a 9 * 1. Redistributions of source code must retain the above copyright notice,
emilmont 77:869cf507173a 10 * this list of conditions and the following disclaimer.
emilmont 77:869cf507173a 11 * 2. Redistributions in binary form must reproduce the above copyright notice,
emilmont 77:869cf507173a 12 * this list of conditions and the following disclaimer in the documentation
emilmont 77:869cf507173a 13 * and/or other materials provided with the distribution.
emilmont 77:869cf507173a 14 * 3. Neither the name of STMicroelectronics nor the names of its contributors
emilmont 77:869cf507173a 15 * may be used to endorse or promote products derived from this software
emilmont 77:869cf507173a 16 * without specific prior written permission.
emilmont 77:869cf507173a 17 *
emilmont 77:869cf507173a 18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
emilmont 77:869cf507173a 19 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
emilmont 77:869cf507173a 20 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
emilmont 77:869cf507173a 21 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
emilmont 77:869cf507173a 22 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
emilmont 77:869cf507173a 23 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
emilmont 77:869cf507173a 24 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
emilmont 77:869cf507173a 25 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
emilmont 77:869cf507173a 26 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
emilmont 77:869cf507173a 27 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
emilmont 77:869cf507173a 28 *******************************************************************************
emilmont 77:869cf507173a 29 */
emilmont 77:869cf507173a 30 #ifndef MBED_PERIPHERALNAMES_H
emilmont 77:869cf507173a 31 #define MBED_PERIPHERALNAMES_H
emilmont 77:869cf507173a 32
emilmont 77:869cf507173a 33 #include "cmsis.h"
emilmont 77:869cf507173a 34
emilmont 77:869cf507173a 35 #ifdef __cplusplus
emilmont 77:869cf507173a 36 extern "C" {
emilmont 77:869cf507173a 37 #endif
emilmont 77:869cf507173a 38
emilmont 77:869cf507173a 39 typedef enum {
emilmont 77:869cf507173a 40 ADC_1 = (int)ADC1_BASE,
emilmont 77:869cf507173a 41 ADC_2 = (int)ADC_BASE
emilmont 77:869cf507173a 42 } ADCName;
emilmont 77:869cf507173a 43
emilmont 77:869cf507173a 44 typedef enum {
emilmont 77:869cf507173a 45 UART_1 = (int)USART1_BASE,
emilmont 77:869cf507173a 46 UART_2 = (int)USART2_BASE
emilmont 77:869cf507173a 47 } UARTName;
emilmont 77:869cf507173a 48
emilmont 77:869cf507173a 49 #define STDIO_UART_TX PA_2
emilmont 77:869cf507173a 50 #define STDIO_UART_RX PA_3
emilmont 77:869cf507173a 51 #define STDIO_UART UART_2
emilmont 77:869cf507173a 52
emilmont 77:869cf507173a 53 typedef enum {
emilmont 77:869cf507173a 54 SPI_1 = (int)SPI1_BASE,
emilmont 77:869cf507173a 55 SPI_2 = (int)SPI2_BASE
emilmont 77:869cf507173a 56 } SPIName;
emilmont 77:869cf507173a 57
emilmont 77:869cf507173a 58 typedef enum {
emilmont 77:869cf507173a 59 I2C_1 = (int)I2C1_BASE,
emilmont 77:869cf507173a 60 I2C_2 = (int)I2C2_BASE
emilmont 77:869cf507173a 61 } I2CName;
emilmont 77:869cf507173a 62
emilmont 77:869cf507173a 63 typedef enum {
emilmont 77:869cf507173a 64 PWM_2 = (int)TIM2_BASE,
emilmont 77:869cf507173a 65 PWM_3 = (int)TIM3_BASE,
emilmont 77:869cf507173a 66 PWM_4 = (int)TIM4_BASE
emilmont 77:869cf507173a 67 } PWMName;
emilmont 77:869cf507173a 68
emilmont 77:869cf507173a 69 #ifdef __cplusplus
emilmont 77:869cf507173a 70 }
emilmont 77:869cf507173a 71 #endif
emilmont 77:869cf507173a 72
emilmont 77:869cf507173a 73 #endif