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:
Kojto
Date:
Tue Mar 15 14:34:00 2016 +0000
Revision:
116:c0f6e94411f5
Parent:
102:da0ca467f8b5
Release 116 of the mbed library

Changes:
- new targets - NUCLEO_L073RZ
- fixes to IOTSS BEID platform
- LPC824, LPC1549 and LPC11U68 - fix PWMOut SCT bugs
- STM32F7 - Cube driver
- STM32F4 - add RTC LSI macro, defined as 0
- STM32F3 - fix multiple ADC clock initialization
- retarget - binary mode fix for GCC

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Kojto 102:da0ca467f8b5 1 /* mbed Microcontroller Library
Kojto 102:da0ca467f8b5 2 * Copyright (c) 2006-2015 ARM Limited
Kojto 102:da0ca467f8b5 3 *
Kojto 102:da0ca467f8b5 4 * Licensed under the Apache License, Version 2.0 (the "License");
Kojto 102:da0ca467f8b5 5 * you may not use this file except in compliance with the License.
Kojto 102:da0ca467f8b5 6 * You may obtain a copy of the License at
Kojto 102:da0ca467f8b5 7 *
Kojto 102:da0ca467f8b5 8 * http://www.apache.org/licenses/LICENSE-2.0
Kojto 102:da0ca467f8b5 9 *
Kojto 102:da0ca467f8b5 10 * Unless required by applicable law or agreed to in writing, software
Kojto 102:da0ca467f8b5 11 * distributed under the License is distributed on an "AS IS" BASIS,
Kojto 102:da0ca467f8b5 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Kojto 102:da0ca467f8b5 13 * See the License for the specific language governing permissions and
Kojto 102:da0ca467f8b5 14 * limitations under the License.
Kojto 102:da0ca467f8b5 15 */
Kojto 102:da0ca467f8b5 16 #ifndef MBED_PERIPHERALNAMES_H
Kojto 102:da0ca467f8b5 17 #define MBED_PERIPHERALNAMES_H
Kojto 102:da0ca467f8b5 18
Kojto 102:da0ca467f8b5 19 #include "cmsis.h"
Kojto 102:da0ca467f8b5 20
Kojto 102:da0ca467f8b5 21 #ifdef __cplusplus
Kojto 102:da0ca467f8b5 22 extern "C" {
Kojto 102:da0ca467f8b5 23 #endif
Kojto 102:da0ca467f8b5 24
Kojto 102:da0ca467f8b5 25 typedef enum {
Kojto 102:da0ca467f8b5 26 UART_0 = (int)CMSDK_UART0_BASE,
Kojto 116:c0f6e94411f5 27 UART_1 = (int)CMSDK_UART1_BASE,
Kojto 116:c0f6e94411f5 28 UART_2 = (int)CMSDK_UART3_BASE,
Kojto 116:c0f6e94411f5 29 UART_3 = (int)CMSDK_UART4_BASE
Kojto 102:da0ca467f8b5 30 } UARTName;
Kojto 102:da0ca467f8b5 31
Kojto 102:da0ca467f8b5 32 typedef enum {
Kojto 116:c0f6e94411f5 33 I2C_0 = (int)MPS2_TSC_I2C_BASE,
Kojto 116:c0f6e94411f5 34 I2C_1 = (int)MPS2_AAIC_I2C_BASE,
Kojto 116:c0f6e94411f5 35 I2C_2 = (int)MPS2_SHIELD0_I2C_BASE,
Kojto 116:c0f6e94411f5 36 I2C_3 = (int)MPS2_SHIELD1_I2C_BASE
Kojto 116:c0f6e94411f5 37
Kojto 102:da0ca467f8b5 38 } I2CName;
Kojto 102:da0ca467f8b5 39
Kojto 102:da0ca467f8b5 40 typedef enum {
Kojto 102:da0ca467f8b5 41 ADC0_0 = 0,
Kojto 102:da0ca467f8b5 42 ADC0_1,
Kojto 102:da0ca467f8b5 43 ADC0_2,
Kojto 102:da0ca467f8b5 44 ADC0_3,
Kojto 102:da0ca467f8b5 45 ADC0_4,
Kojto 102:da0ca467f8b5 46 ADC0_5,
Kojto 102:da0ca467f8b5 47 ADC0_6,
Kojto 116:c0f6e94411f5 48 ADC0_7,
Kojto 116:c0f6e94411f5 49 ADC0_8,
Kojto 116:c0f6e94411f5 50 ADC0_9,
Kojto 116:c0f6e94411f5 51 ADC0_10,
Kojto 116:c0f6e94411f5 52 ADC0_11
Kojto 102:da0ca467f8b5 53 } ADCName;
Kojto 102:da0ca467f8b5 54
Kojto 102:da0ca467f8b5 55 typedef enum {
Kojto 116:c0f6e94411f5 56 SPI_0 = (int)MPS2_SSP1_BASE,
Kojto 116:c0f6e94411f5 57 SPI_1 = (int)MPS2_SSP0_BASE,
Kojto 116:c0f6e94411f5 58 SPI_2 = (int)MPS2_SSP2_BASE,
Kojto 116:c0f6e94411f5 59 SPI_3 = (int)MPS2_SSP3_BASE,
Kojto 116:c0f6e94411f5 60 SPI_4 = (int)MPS2_SSP4_BASE
Kojto 102:da0ca467f8b5 61 } SPIName;
Kojto 102:da0ca467f8b5 62
Kojto 102:da0ca467f8b5 63 typedef enum {
Kojto 102:da0ca467f8b5 64 PWM_1 = 0,
Kojto 102:da0ca467f8b5 65 PWM_2,
Kojto 102:da0ca467f8b5 66 PWM_3,
Kojto 102:da0ca467f8b5 67 PWM_4,
Kojto 102:da0ca467f8b5 68 PWM_5,
Kojto 102:da0ca467f8b5 69 PWM_6,
Kojto 102:da0ca467f8b5 70 PWM_7,
Kojto 102:da0ca467f8b5 71 PWM_8,
Kojto 102:da0ca467f8b5 72 PWM_9,
Kojto 102:da0ca467f8b5 73 PWM_10,
Kojto 102:da0ca467f8b5 74 PWM_11
Kojto 102:da0ca467f8b5 75 } PWMName;
Kojto 102:da0ca467f8b5 76
Kojto 102:da0ca467f8b5 77 #define STDIO_UART_TX USBTX
Kojto 102:da0ca467f8b5 78 #define STDIO_UART_RX USBRX
Kojto 102:da0ca467f8b5 79 #define STDIO_UART UART_0
Kojto 102:da0ca467f8b5 80
Kojto 102:da0ca467f8b5 81 #define MBED_UART0 USBTX, USBRX
Kojto 116:c0f6e94411f5 82 #define MBED_UART1 XB_TX, XB_RX
Kojto 116:c0f6e94411f5 83 #define MBED_UART2 SH0_TX, SH0_RX
Kojto 116:c0f6e94411f5 84 #define MBED_UART3 SH1_TX, SH1_RX
Kojto 102:da0ca467f8b5 85 #define MBED_UARTUSB USBTX, USBRX
Kojto 102:da0ca467f8b5 86
Kojto 102:da0ca467f8b5 87 #ifdef __cplusplus
Kojto 102:da0ca467f8b5 88 }
Kojto 102:da0ca467f8b5 89 #endif
Kojto 102:da0ca467f8b5 90
Kojto 102:da0ca467f8b5 91 #endif