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 104:b9ad9a133dc7 1 /* mbed Microcontroller Library
Kojto 104:b9ad9a133dc7 2 * Copyright (c) 2013 Nordic Semiconductor
Kojto 104:b9ad9a133dc7 3 *
Kojto 104:b9ad9a133dc7 4 * Licensed under the Apache License, Version 2.0 (the "License");
Kojto 104:b9ad9a133dc7 5 * you may not use this file except in compliance with the License.
Kojto 104:b9ad9a133dc7 6 * You may obtain a copy of the License at
Kojto 104:b9ad9a133dc7 7 *
Kojto 104:b9ad9a133dc7 8 * http://www.apache.org/licenses/LICENSE-2.0
Kojto 104:b9ad9a133dc7 9 *
Kojto 104:b9ad9a133dc7 10 * Unless required by applicable law or agreed to in writing, software
Kojto 104:b9ad9a133dc7 11 * distributed under the License is distributed on an "AS IS" BASIS,
Kojto 104:b9ad9a133dc7 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Kojto 104:b9ad9a133dc7 13 * See the License for the specific language governing permissions and
Kojto 104:b9ad9a133dc7 14 * limitations under the License.
Kojto 104:b9ad9a133dc7 15 */
Kojto 104:b9ad9a133dc7 16 #ifndef MBED_PERIPHERALNAMES_H
Kojto 104:b9ad9a133dc7 17 #define MBED_PERIPHERALNAMES_H
Kojto 104:b9ad9a133dc7 18
Kojto 104:b9ad9a133dc7 19 #include "cmsis.h"
Kojto 104:b9ad9a133dc7 20
Kojto 104:b9ad9a133dc7 21 #ifdef __cplusplus
Kojto 104:b9ad9a133dc7 22 extern "C" {
Kojto 104:b9ad9a133dc7 23 #endif
Kojto 104:b9ad9a133dc7 24
Kojto 104:b9ad9a133dc7 25 #define STDIO_UART_TX TX_PIN_NUMBER
Kojto 104:b9ad9a133dc7 26 #define STDIO_UART_RX RX_PIN_NUMBER
Kojto 104:b9ad9a133dc7 27 #define STDIO_UART UART_0
Kojto 104:b9ad9a133dc7 28
Kojto 104:b9ad9a133dc7 29 typedef enum {
Kojto 104:b9ad9a133dc7 30 UART_0 = (int)NRF_UART0_BASE
Kojto 104:b9ad9a133dc7 31 } UARTName;
Kojto 104:b9ad9a133dc7 32
Kojto 104:b9ad9a133dc7 33
Kojto 104:b9ad9a133dc7 34 typedef enum {
Kojto 104:b9ad9a133dc7 35 SPI_0 = (int)NRF_SPI0_BASE,
Kojto 104:b9ad9a133dc7 36 SPI_1 = (int)NRF_SPI1_BASE,
Kojto 104:b9ad9a133dc7 37 SPIS = (int)NRF_SPIS1_BASE
Kojto 104:b9ad9a133dc7 38 } SPIName;
Kojto 104:b9ad9a133dc7 39
Kojto 104:b9ad9a133dc7 40 typedef enum {
Kojto 104:b9ad9a133dc7 41 PWM_1 = 0,
Kojto 104:b9ad9a133dc7 42 PWM_2
Kojto 104:b9ad9a133dc7 43 } PWMName;
Kojto 104:b9ad9a133dc7 44
Kojto 104:b9ad9a133dc7 45 typedef enum {
Kojto 104:b9ad9a133dc7 46 I2C_0 = (int)NRF_TWI0_BASE,
Kojto 104:b9ad9a133dc7 47 I2C_1 = (int)NRF_TWI1_BASE
Kojto 104:b9ad9a133dc7 48 } I2CName;
Kojto 104:b9ad9a133dc7 49
Kojto 104:b9ad9a133dc7 50 typedef enum {
Kojto 104:b9ad9a133dc7 51 ADC0_0 = (int)NRF_ADC_BASE
Kojto 104:b9ad9a133dc7 52 } ADCName;
Kojto 104:b9ad9a133dc7 53
Kojto 104:b9ad9a133dc7 54 #ifdef __cplusplus
Kojto 104:b9ad9a133dc7 55 }
Kojto 104:b9ad9a133dc7 56 #endif
Kojto 104:b9ad9a133dc7 57
Kojto 104:b9ad9a133dc7 58 #endif