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:
Thu Jul 07 14:34:11 2016 +0100
Revision:
122:f9eeca106725
Release 122 of the mbed library

Changes:
- new targets - Nucleo L432KC, Beetle, Nucleo F446ZE, Nucleo L011K4
- Thread safety addition - mbed API should contain a statement about thread safety
- critical section API addition
- CAS API (core_util_atomic_incr/decr)
- DEVICE_ are generated from targets.json file, device.h deprecated
- Callback replaces FunctionPointer to provide std like interface
- mbed HAL API docs improvements
- toolchain - prexif attributes with MBED_
- add new attributes - packed, weak, forcedinline, align
- target.json - contains targets definitions
- ST - L1XX - Cube update to 1.5
- SPI clock selection fix (clock from APB domain)
- F7 - Cube update v1.4.0
- L0 - baudrate init fix
- L1 - Cube update v1.5
- F3 - baudrate init fix, 3 targets CAN support
- F4 - Cube update v1.12.0, 3 targets CAN support
- L4XX - Cube update v1.5.1
- F0 - update Cube to v1.5.0
- L4 - 2 targets (L476RG/VG) CAN support
- NXP - pwm clock fix for KSDK2 MCU
- LPC2368 - remove ARM toolchain support - due to regression
- KSDK2 - fix SPI , I2C address and repeat start
- Silabs - some fixes backported from mbed 3
- Renesas - RZ_A1H - SystemCoreClockUpdate addition

Who changed what in which revision?

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