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:
AnnaBridge
Date:
Wed Feb 20 20:53:29 2019 +0000
Revision:
172:65be27845400
Parent:
171:3a7713b1edbc
mbed library release version 165

Who changed what in which revision?

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