Fork of the official mbed C/C SDK provides the software platform and libraries to build your applications for RenBED.

Dependents:   1-RenBuggyTimed RenBED_RGB RenBED_RGB_PWM RenBED_RGB

Fork of mbed by mbed official

Committer:
bogdanm
Date:
Wed Jul 02 13:22:23 2014 +0100
Revision:
86:04dd9b1680ae
Parent:
TARGET_NRF51822/TARGET_NORDIC/TARGET_NRF51822/PinNames.h@82:6473597d706e
Release 86 of the mbed library

Main changes:


- bug fixes in various backends
- mbed "error" replaced by assert logic (mbed_assert)
- new ST Nucleo targets

Who changed what in which revision?

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