mbed SDK library sources

Fork of mbed-src by mbed official

Development branch of the mbed library sources. This library is kept in synch with the latest changes from the mbed SDK and it is not guaranteed to work.

If you are looking for a stable and tested release, please import one of the official mbed library releases:

Import librarymbed

The official Mbed 2 C/C++ SDK provides the software platform and libraries to build your applications.

Committer:
mbed_official
Date:
Fri Feb 07 18:00:11 2014 +0000
Revision:
85:e1a8e879a6a9
Synchronized with git revision 4b2b368a6a3b1f0fd33d99917981c67436c4aebe

Full URL: https://github.com/mbedmicro/mbed/commit/4b2b368a6a3b1f0fd33d99917981c67436c4aebe/

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mbed_official 85:e1a8e879a6a9 1 /* mbed Microcontroller Library
mbed_official 85:e1a8e879a6a9 2 * Copyright (c) 2006-2013 ARM Limited
mbed_official 85:e1a8e879a6a9 3 *
mbed_official 85:e1a8e879a6a9 4 * Licensed under the Apache License, Version 2.0 (the "License");
mbed_official 85:e1a8e879a6a9 5 * you may not use this file except in compliance with the License.
mbed_official 85:e1a8e879a6a9 6 * You may obtain a copy of the License at
mbed_official 85:e1a8e879a6a9 7 *
mbed_official 85:e1a8e879a6a9 8 * http://www.apache.org/licenses/LICENSE-2.0
mbed_official 85:e1a8e879a6a9 9 *
mbed_official 85:e1a8e879a6a9 10 * Unless required by applicable law or agreed to in writing, software
mbed_official 85:e1a8e879a6a9 11 * distributed under the License is distributed on an "AS IS" BASIS,
mbed_official 85:e1a8e879a6a9 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
mbed_official 85:e1a8e879a6a9 13 * See the License for the specific language governing permissions and
mbed_official 85:e1a8e879a6a9 14 * limitations under the License.
mbed_official 85:e1a8e879a6a9 15 */
mbed_official 85:e1a8e879a6a9 16 #ifndef MBED_PINNAMES_H
mbed_official 85:e1a8e879a6a9 17 #define MBED_PINNAMES_H
mbed_official 85:e1a8e879a6a9 18
mbed_official 85:e1a8e879a6a9 19 #include "cmsis.h"
mbed_official 85:e1a8e879a6a9 20
mbed_official 85:e1a8e879a6a9 21 #ifdef __cplusplus
mbed_official 85:e1a8e879a6a9 22 extern "C" {
mbed_official 85:e1a8e879a6a9 23 #endif
mbed_official 85:e1a8e879a6a9 24
mbed_official 85:e1a8e879a6a9 25 typedef enum {
mbed_official 85:e1a8e879a6a9 26 PIN_INPUT,
mbed_official 85:e1a8e879a6a9 27 PIN_OUTPUT
mbed_official 85:e1a8e879a6a9 28 } PinDirection;
mbed_official 85:e1a8e879a6a9 29
mbed_official 85:e1a8e879a6a9 30 #define PORT_SHIFT 3
mbed_official 85:e1a8e879a6a9 31
mbed_official 85:e1a8e879a6a9 32 typedef enum {
mbed_official 85:e1a8e879a6a9 33 p0 = 0,
mbed_official 85:e1a8e879a6a9 34 p1 = 1,
mbed_official 85:e1a8e879a6a9 35 p2 = 2,
mbed_official 85:e1a8e879a6a9 36 p3 = 3,
mbed_official 85:e1a8e879a6a9 37 p4 = 4,
mbed_official 85:e1a8e879a6a9 38 p5 = 5,
mbed_official 85:e1a8e879a6a9 39 p6 = 6,
mbed_official 85:e1a8e879a6a9 40 p7 = 7,
mbed_official 85:e1a8e879a6a9 41 p8 = 8,
mbed_official 85:e1a8e879a6a9 42 p9 = 9,
mbed_official 85:e1a8e879a6a9 43 p10 = 10,
mbed_official 85:e1a8e879a6a9 44 p11 = 11,
mbed_official 85:e1a8e879a6a9 45 p12 = 12,
mbed_official 85:e1a8e879a6a9 46 p13 = 13,
mbed_official 85:e1a8e879a6a9 47 p14 = 14,
mbed_official 85:e1a8e879a6a9 48 p15 = 15,
mbed_official 85:e1a8e879a6a9 49 p16 = 16,
mbed_official 85:e1a8e879a6a9 50 p17 = 17,
mbed_official 85:e1a8e879a6a9 51 p18 = 18,
mbed_official 85:e1a8e879a6a9 52 p19 = 19,
mbed_official 85:e1a8e879a6a9 53 p20 = 20,
mbed_official 85:e1a8e879a6a9 54 p21 = 21,
mbed_official 85:e1a8e879a6a9 55 p22 = 22,
mbed_official 85:e1a8e879a6a9 56 p23 = 23,
mbed_official 85:e1a8e879a6a9 57 p24 = 24,
mbed_official 85:e1a8e879a6a9 58 p25 = 25,
mbed_official 85:e1a8e879a6a9 59 p26 = 26,
mbed_official 85:e1a8e879a6a9 60 p27 = 27,
mbed_official 85:e1a8e879a6a9 61 p28 = 28,
mbed_official 85:e1a8e879a6a9 62 p29 = 29,
mbed_official 85:e1a8e879a6a9 63 p30 = 30,
mbed_official 85:e1a8e879a6a9 64 // p31=31,
mbed_official 85:e1a8e879a6a9 65
mbed_official 85:e1a8e879a6a9 66 P0_0 = p0,
mbed_official 85:e1a8e879a6a9 67 P0_1 = p1,
mbed_official 85:e1a8e879a6a9 68 P0_2 = p2,
mbed_official 85:e1a8e879a6a9 69 P0_3 = p3,
mbed_official 85:e1a8e879a6a9 70 P0_4 = p4,
mbed_official 85:e1a8e879a6a9 71 P0_5 = p5,
mbed_official 85:e1a8e879a6a9 72 P0_6 = p6,
mbed_official 85:e1a8e879a6a9 73 P0_7 = p7,
mbed_official 85:e1a8e879a6a9 74
mbed_official 85:e1a8e879a6a9 75 P0_8 = p8,
mbed_official 85:e1a8e879a6a9 76 P0_9 = p9,
mbed_official 85:e1a8e879a6a9 77 P0_10 = p10,
mbed_official 85:e1a8e879a6a9 78 P0_11 = p11,
mbed_official 85:e1a8e879a6a9 79 P0_12 = p12,
mbed_official 85:e1a8e879a6a9 80 P0_13 = p13,
mbed_official 85:e1a8e879a6a9 81 P0_14 = p14,
mbed_official 85:e1a8e879a6a9 82 P0_15 = p15,
mbed_official 85:e1a8e879a6a9 83
mbed_official 85:e1a8e879a6a9 84 P0_16 = p16,
mbed_official 85:e1a8e879a6a9 85 P0_17 = p17,
mbed_official 85:e1a8e879a6a9 86 P0_18 = p18,
mbed_official 85:e1a8e879a6a9 87 P0_19 = p19,
mbed_official 85:e1a8e879a6a9 88 P0_20 = p20,
mbed_official 85:e1a8e879a6a9 89 P0_21 = p21,
mbed_official 85:e1a8e879a6a9 90 P0_22 = p22,
mbed_official 85:e1a8e879a6a9 91 P0_23 = p23,
mbed_official 85:e1a8e879a6a9 92
mbed_official 85:e1a8e879a6a9 93 P0_24 = p24,
mbed_official 85:e1a8e879a6a9 94 P0_25 = p25,
mbed_official 85:e1a8e879a6a9 95 P0_26 = p26,
mbed_official 85:e1a8e879a6a9 96 P0_27 = p27,
mbed_official 85:e1a8e879a6a9 97 P0_28 = p28,
mbed_official 85:e1a8e879a6a9 98 P0_29 = p29,
mbed_official 85:e1a8e879a6a9 99 P0_30 = p30,
mbed_official 85:e1a8e879a6a9 100
mbed_official 85:e1a8e879a6a9 101 LED1 = p18,
mbed_official 85:e1a8e879a6a9 102 LED2 = p19,
mbed_official 85:e1a8e879a6a9 103 LED3 = p18,
mbed_official 85:e1a8e879a6a9 104 LED4 = p19,
mbed_official 85:e1a8e879a6a9 105
mbed_official 85:e1a8e879a6a9 106 BUTTON0 = p16,
mbed_official 85:e1a8e879a6a9 107 BUTTON1 = p17,
mbed_official 85:e1a8e879a6a9 108
mbed_official 85:e1a8e879a6a9 109 RX_PIN_NUMBER = p11,
mbed_official 85:e1a8e879a6a9 110 TX_PIN_NUMBER = p9,
mbed_official 85:e1a8e879a6a9 111 CTS_PIN_NUMBER = p10,
mbed_official 85:e1a8e879a6a9 112 RTS_PIN_NUMBER = p8,
mbed_official 85:e1a8e879a6a9 113
mbed_official 85:e1a8e879a6a9 114 // mBed interface Pins
mbed_official 85:e1a8e879a6a9 115 USBTX = TX_PIN_NUMBER,
mbed_official 85:e1a8e879a6a9 116 USBRX = RX_PIN_NUMBER,
mbed_official 85:e1a8e879a6a9 117
mbed_official 85:e1a8e879a6a9 118 SPI_PSELMOSI0 = p20,
mbed_official 85:e1a8e879a6a9 119 SPI_PSELMISO0 = p22,
mbed_official 85:e1a8e879a6a9 120 SPI_PSELSS0 = p24,
mbed_official 85:e1a8e879a6a9 121 SPI_PSELSCK0 = p25,
mbed_official 85:e1a8e879a6a9 122
mbed_official 85:e1a8e879a6a9 123 SPI_PSELMOSI1 = p12,
mbed_official 85:e1a8e879a6a9 124 SPI_PSELMISO1 = p13,
mbed_official 85:e1a8e879a6a9 125 SPI_PSELSS1 = p14,
mbed_official 85:e1a8e879a6a9 126 SPI_PSELSCK1 = p15,
mbed_official 85:e1a8e879a6a9 127
mbed_official 85:e1a8e879a6a9 128 SPIS_PSELMOSI = p12,
mbed_official 85:e1a8e879a6a9 129 SPIS_PSELMISO = p13,
mbed_official 85:e1a8e879a6a9 130 SPIS_PSELSS = p14,
mbed_official 85:e1a8e879a6a9 131 SPIS_PSELSCK = p15,
mbed_official 85:e1a8e879a6a9 132
mbed_official 85:e1a8e879a6a9 133 I2C_SDA0 = p22,
mbed_official 85:e1a8e879a6a9 134 I2C_SCL0 = p20,
mbed_official 85:e1a8e879a6a9 135
mbed_official 85:e1a8e879a6a9 136 I2C_SDA1 = p13,
mbed_official 85:e1a8e879a6a9 137 I2C_SCL1 = p15,
mbed_official 85:e1a8e879a6a9 138 // Not connected
mbed_official 85:e1a8e879a6a9 139 NC = (int)0xFFFFFFFF
mbed_official 85:e1a8e879a6a9 140 } PinName;
mbed_official 85:e1a8e879a6a9 141
mbed_official 85:e1a8e879a6a9 142 typedef enum {
mbed_official 85:e1a8e879a6a9 143 PullNone = 0,
mbed_official 85:e1a8e879a6a9 144 PullDown = 1,
mbed_official 85:e1a8e879a6a9 145 PullUp = 3
mbed_official 85:e1a8e879a6a9 146 } PinMode;
mbed_official 85:e1a8e879a6a9 147
mbed_official 85:e1a8e879a6a9 148 #ifdef __cplusplus
mbed_official 85:e1a8e879a6a9 149 }
mbed_official 85:e1a8e879a6a9 150 #endif
mbed_official 85:e1a8e879a6a9 151
mbed_official 85:e1a8e879a6a9 152 #endif