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:
Fri Aug 19 10:17:11 2016 +0100
Revision:
124:2241e3a39974
Release 124 of the mbed library

Changes:

- new targets - KL27Z, K66F
- deprecate macro - add since argument
- override new and delete operators to trap errors
- Maxim - i2c and dac bugfixes
- STM - STM32F4 - serial flow enablement, enable async serial
- pwm and analog definition clean-up
- Nordic - NRF51 - fix for overflow in the ticket

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Kojto 124:2241e3a39974 1 /*
Kojto 124:2241e3a39974 2 * Copyright (c) 2013 Nordic Semiconductor ASA
Kojto 124:2241e3a39974 3 * All rights reserved.
Kojto 124:2241e3a39974 4 *
Kojto 124:2241e3a39974 5 * Redistribution and use in source and binary forms, with or without modification,
Kojto 124:2241e3a39974 6 * are permitted provided that the following conditions are met:
Kojto 124:2241e3a39974 7 *
Kojto 124:2241e3a39974 8 * 1. Redistributions of source code must retain the above copyright notice, this list
Kojto 124:2241e3a39974 9 * of conditions and the following disclaimer.
Kojto 124:2241e3a39974 10 *
Kojto 124:2241e3a39974 11 * 2. Redistributions in binary form, except as embedded into a Nordic Semiconductor ASA
Kojto 124:2241e3a39974 12 * integrated circuit in a product or a software update for such product, must reproduce
Kojto 124:2241e3a39974 13 * the above copyright notice, this list of conditions and the following disclaimer in
Kojto 124:2241e3a39974 14 * the documentation and/or other materials provided with the distribution.
Kojto 124:2241e3a39974 15 *
Kojto 124:2241e3a39974 16 * 3. Neither the name of Nordic Semiconductor ASA nor the names of its contributors may be
Kojto 124:2241e3a39974 17 * used to endorse or promote products derived from this software without specific prior
Kojto 124:2241e3a39974 18 * written permission.
Kojto 124:2241e3a39974 19 *
Kojto 124:2241e3a39974 20 * 4. This software, with or without modification, must only be used with a
Kojto 124:2241e3a39974 21 * Nordic Semiconductor ASA integrated circuit.
Kojto 124:2241e3a39974 22 *
Kojto 124:2241e3a39974 23 * 5. Any software provided in binary or object form under this license must not be reverse
Kojto 124:2241e3a39974 24 * engineered, decompiled, modified and/or disassembled.
Kojto 124:2241e3a39974 25 *
Kojto 124:2241e3a39974 26 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
Kojto 124:2241e3a39974 27 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
Kojto 124:2241e3a39974 28 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
Kojto 124:2241e3a39974 29 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
Kojto 124:2241e3a39974 30 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
Kojto 124:2241e3a39974 31 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
Kojto 124:2241e3a39974 32 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
Kojto 124:2241e3a39974 33 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
Kojto 124:2241e3a39974 34 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
Kojto 124:2241e3a39974 35 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Kojto 124:2241e3a39974 36 *
Kojto 124:2241e3a39974 37 */
Kojto 124:2241e3a39974 38
Kojto 124:2241e3a39974 39 #ifndef MBED_PERIPHERALNAMES_H
Kojto 124:2241e3a39974 40 #define MBED_PERIPHERALNAMES_H
Kojto 124:2241e3a39974 41
Kojto 124:2241e3a39974 42 #include "cmsis.h"
Kojto 124:2241e3a39974 43
Kojto 124:2241e3a39974 44 #ifdef __cplusplus
Kojto 124:2241e3a39974 45 extern "C" {
Kojto 124:2241e3a39974 46 #endif
Kojto 124:2241e3a39974 47
Kojto 124:2241e3a39974 48 #define STDIO_UART_TX TX_PIN_NUMBER
Kojto 124:2241e3a39974 49 #define STDIO_UART_RX RX_PIN_NUMBER
Kojto 124:2241e3a39974 50 #define STDIO_UART UART_0
Kojto 124:2241e3a39974 51
Kojto 124:2241e3a39974 52 typedef enum {
Kojto 124:2241e3a39974 53 UART_0 = (int)NRF_UART0_BASE
Kojto 124:2241e3a39974 54 } UARTName;
Kojto 124:2241e3a39974 55
Kojto 124:2241e3a39974 56
Kojto 124:2241e3a39974 57 typedef enum {
Kojto 124:2241e3a39974 58 SPI_0 = (int)NRF_SPI0_BASE,
Kojto 124:2241e3a39974 59 SPI_1 = (int)NRF_SPI1_BASE,
Kojto 124:2241e3a39974 60 SPIS = (int)NRF_SPIS1_BASE
Kojto 124:2241e3a39974 61 } SPIName;
Kojto 124:2241e3a39974 62
Kojto 124:2241e3a39974 63 typedef enum {
Kojto 124:2241e3a39974 64 PWM_1 = 0,
Kojto 124:2241e3a39974 65 PWM_2
Kojto 124:2241e3a39974 66 } PWMName;
Kojto 124:2241e3a39974 67
Kojto 124:2241e3a39974 68 typedef enum {
Kojto 124:2241e3a39974 69 I2C_0 = (int)NRF_TWI0_BASE,
Kojto 124:2241e3a39974 70 I2C_1 = (int)NRF_TWI1_BASE
Kojto 124:2241e3a39974 71 } I2CName;
Kojto 124:2241e3a39974 72
Kojto 124:2241e3a39974 73 typedef enum {
Kojto 124:2241e3a39974 74 ADC0_0 = (int)NRF_ADC_BASE
Kojto 124:2241e3a39974 75 } ADCName;
Kojto 124:2241e3a39974 76
Kojto 124:2241e3a39974 77 #ifdef __cplusplus
Kojto 124:2241e3a39974 78 }
Kojto 124:2241e3a39974 79 #endif
Kojto 124:2241e3a39974 80
Kojto 124:2241e3a39974 81 #endif