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 111:4336505e4b1c 1 /* mbed Microcontroller Library
Kojto 111:4336505e4b1c 2 * Copyright (c) 2006-2015 ARM Limited
Kojto 111:4336505e4b1c 3 *
Kojto 111:4336505e4b1c 4 * Licensed under the Apache License, Version 2.0 (the "License");
Kojto 111:4336505e4b1c 5 * you may not use this file except in compliance with the License.
Kojto 111:4336505e4b1c 6 * You may obtain a copy of the License at
Kojto 111:4336505e4b1c 7 *
Kojto 111:4336505e4b1c 8 * http://www.apache.org/licenses/LICENSE-2.0
Kojto 111:4336505e4b1c 9 *
Kojto 111:4336505e4b1c 10 * Unless required by applicable law or agreed to in writing, software
Kojto 111:4336505e4b1c 11 * distributed under the License is distributed on an "AS IS" BASIS,
Kojto 111:4336505e4b1c 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Kojto 111:4336505e4b1c 13 * See the License for the specific language governing permissions and
Kojto 111:4336505e4b1c 14 * limitations under the License.
Kojto 111:4336505e4b1c 15 */
Kojto 111:4336505e4b1c 16 #ifndef MBED_PINNAMES_H
Kojto 111:4336505e4b1c 17 #define MBED_PINNAMES_H
Kojto 111:4336505e4b1c 18
Kojto 111:4336505e4b1c 19 #include "cmsis.h"
Kojto 111:4336505e4b1c 20
Kojto 111:4336505e4b1c 21 #ifdef __cplusplus
Kojto 111:4336505e4b1c 22 extern "C" {
Kojto 111:4336505e4b1c 23 #endif
Kojto 111:4336505e4b1c 24
Kojto 111:4336505e4b1c 25 typedef enum {
Kojto 111:4336505e4b1c 26 PIN_INPUT,
Kojto 111:4336505e4b1c 27 PIN_OUTPUT,
Kojto 111:4336505e4b1c 28 PIN_INPUT_OUTPUT //pin state can be set and read back
Kojto 111:4336505e4b1c 29 } PinDirection;
Kojto 111:4336505e4b1c 30
Kojto 111:4336505e4b1c 31 typedef enum {
Kojto 111:4336505e4b1c 32 PA00 = 0,
Kojto 111:4336505e4b1c 33 PA01 = 1,
Kojto 111:4336505e4b1c 34 PA02 = 2,
Kojto 111:4336505e4b1c 35 PA03 = 3,
Kojto 111:4336505e4b1c 36 PA04 = 4,
Kojto 111:4336505e4b1c 37 PA05 = 5,
Kojto 111:4336505e4b1c 38 PA06 = 6,
Kojto 111:4336505e4b1c 39 PA07 = 7,
Kojto 111:4336505e4b1c 40 PA08 = 8,
Kojto 111:4336505e4b1c 41 PA09 = 9,
Kojto 111:4336505e4b1c 42 PA10 = 10,
Kojto 111:4336505e4b1c 43 PA11 = 11,
Kojto 111:4336505e4b1c 44 PA12 = 12,
Kojto 111:4336505e4b1c 45 PA13 = 13,
Kojto 111:4336505e4b1c 46 PA14 = 14,
Kojto 111:4336505e4b1c 47 PA15 = 15,
Kojto 111:4336505e4b1c 48 PA16 = 16,
Kojto 111:4336505e4b1c 49 PA17 = 17,
Kojto 111:4336505e4b1c 50 PA18 = 18,
Kojto 111:4336505e4b1c 51 PA19 = 19,
Kojto 111:4336505e4b1c 52 PA20 = 20,
Kojto 111:4336505e4b1c 53 PA21 = 21,
Kojto 111:4336505e4b1c 54 PA22 = 22,
Kojto 111:4336505e4b1c 55 PA23 = 23,
Kojto 111:4336505e4b1c 56 PA24 = 24,
Kojto 111:4336505e4b1c 57 PA25 = 25,
Kojto 111:4336505e4b1c 58 PA27 = 27,
Kojto 111:4336505e4b1c 59 PA28 = 28,
Kojto 111:4336505e4b1c 60 PA30 = 30,
Kojto 111:4336505e4b1c 61 PA31 = 31,
Kojto 111:4336505e4b1c 62
Kojto 111:4336505e4b1c 63 PB02 = 34,
Kojto 111:4336505e4b1c 64 PB03 = 35,
Kojto 111:4336505e4b1c 65 PB08 = 40,
Kojto 111:4336505e4b1c 66 PB09 = 41,
Kojto 111:4336505e4b1c 67 PB10 = 42,
Kojto 111:4336505e4b1c 68 PB11 = 43,
Kojto 111:4336505e4b1c 69 PB22 = 54,
Kojto 111:4336505e4b1c 70 PB23 = 55,
Kojto 111:4336505e4b1c 71
Kojto 111:4336505e4b1c 72 USBTX = PB10,
Kojto 111:4336505e4b1c 73 USBRX = PB11,
Kojto 111:4336505e4b1c 74
Kojto 111:4336505e4b1c 75 LED1 = PA23,
Kojto 111:4336505e4b1c 76 LED2 = PA23,
Kojto 111:4336505e4b1c 77 LED3 = PA23,
Kojto 111:4336505e4b1c 78 LED4 = PA23,
Kojto 111:4336505e4b1c 79
Kojto 111:4336505e4b1c 80 // Not connected
Kojto 111:4336505e4b1c 81 NC = (int)0xFFFFFFFF
Kojto 111:4336505e4b1c 82 } PinName;
Kojto 111:4336505e4b1c 83
Kojto 111:4336505e4b1c 84 typedef enum {
Kojto 111:4336505e4b1c 85 PullNone = 0,
Kojto 111:4336505e4b1c 86 PullUp = 1,
Kojto 111:4336505e4b1c 87 PullDown = 2,
Kojto 111:4336505e4b1c 88 PullDefault = PullUp
Kojto 111:4336505e4b1c 89 } PinMode;
Kojto 111:4336505e4b1c 90
Kojto 111:4336505e4b1c 91 #ifdef __cplusplus
Kojto 111:4336505e4b1c 92 }
Kojto 111:4336505e4b1c 93 #endif
Kojto 111:4336505e4b1c 94
Kojto 111:4336505e4b1c 95 #endif