mbed library sources
Dependents: frdm_kl05z_gpio_test
Fork of mbed-src by
targets/hal/TARGET_NORDIC/TARGET_NRF51822/TARGET_ARCH_BLE/PinNames.h@244:7618f037e2de, 2014-06-30 (annotated)
- Committer:
- mbed_official
- Date:
- Mon Jun 30 05:45:07 2014 +0100
- Revision:
- 244:7618f037e2de
Synchronized with git revision eb364dacfeee33fb1575eb82f810a05c1f9c5015
Full URL: https://github.com/mbedmicro/mbed/commit/eb364dacfeee33fb1575eb82f810a05c1f9c5015/
[ARCH_BLE] target ARCH_BLE uses separate PinNames.h and device.h
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
mbed_official | 244:7618f037e2de | 1 | /* mbed Microcontroller Library |
mbed_official | 244:7618f037e2de | 2 | * Copyright (c) 2013 Nordic Semiconductor |
mbed_official | 244:7618f037e2de | 3 | * |
mbed_official | 244:7618f037e2de | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
mbed_official | 244:7618f037e2de | 5 | * you may not use this file except in compliance with the License. |
mbed_official | 244:7618f037e2de | 6 | * You may obtain a copy of the License at |
mbed_official | 244:7618f037e2de | 7 | * |
mbed_official | 244:7618f037e2de | 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
mbed_official | 244:7618f037e2de | 9 | * |
mbed_official | 244:7618f037e2de | 10 | * Unless required by applicable law or agreed to in writing, software |
mbed_official | 244:7618f037e2de | 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
mbed_official | 244:7618f037e2de | 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
mbed_official | 244:7618f037e2de | 13 | * See the License for the specific language governing permissions and |
mbed_official | 244:7618f037e2de | 14 | * limitations under the License. |
mbed_official | 244:7618f037e2de | 15 | */ |
mbed_official | 244:7618f037e2de | 16 | #ifndef MBED_PINNAMES_H |
mbed_official | 244:7618f037e2de | 17 | #define MBED_PINNAMES_H |
mbed_official | 244:7618f037e2de | 18 | |
mbed_official | 244:7618f037e2de | 19 | #include "cmsis.h" |
mbed_official | 244:7618f037e2de | 20 | |
mbed_official | 244:7618f037e2de | 21 | #ifdef __cplusplus |
mbed_official | 244:7618f037e2de | 22 | extern "C" { |
mbed_official | 244:7618f037e2de | 23 | #endif |
mbed_official | 244:7618f037e2de | 24 | |
mbed_official | 244:7618f037e2de | 25 | typedef enum { |
mbed_official | 244:7618f037e2de | 26 | PIN_INPUT, |
mbed_official | 244:7618f037e2de | 27 | PIN_OUTPUT |
mbed_official | 244:7618f037e2de | 28 | } PinDirection; |
mbed_official | 244:7618f037e2de | 29 | |
mbed_official | 244:7618f037e2de | 30 | #define PORT_SHIFT 3 |
mbed_official | 244:7618f037e2de | 31 | |
mbed_official | 244:7618f037e2de | 32 | typedef enum { |
mbed_official | 244:7618f037e2de | 33 | p0 = 0, |
mbed_official | 244:7618f037e2de | 34 | p1 = 1, |
mbed_official | 244:7618f037e2de | 35 | p2 = 2, |
mbed_official | 244:7618f037e2de | 36 | p3 = 3, |
mbed_official | 244:7618f037e2de | 37 | p4 = 4, |
mbed_official | 244:7618f037e2de | 38 | p5 = 5, |
mbed_official | 244:7618f037e2de | 39 | p6 = 6, |
mbed_official | 244:7618f037e2de | 40 | p7 = 7, |
mbed_official | 244:7618f037e2de | 41 | p8 = 8, |
mbed_official | 244:7618f037e2de | 42 | p9 = 9, |
mbed_official | 244:7618f037e2de | 43 | p10 = 10, |
mbed_official | 244:7618f037e2de | 44 | p11 = 11, |
mbed_official | 244:7618f037e2de | 45 | p12 = 12, |
mbed_official | 244:7618f037e2de | 46 | p13 = 13, |
mbed_official | 244:7618f037e2de | 47 | p14 = 14, |
mbed_official | 244:7618f037e2de | 48 | p15 = 15, |
mbed_official | 244:7618f037e2de | 49 | p16 = 16, |
mbed_official | 244:7618f037e2de | 50 | p17 = 17, |
mbed_official | 244:7618f037e2de | 51 | p18 = 18, |
mbed_official | 244:7618f037e2de | 52 | p19 = 19, |
mbed_official | 244:7618f037e2de | 53 | p20 = 20, |
mbed_official | 244:7618f037e2de | 54 | p21 = 21, |
mbed_official | 244:7618f037e2de | 55 | p22 = 22, |
mbed_official | 244:7618f037e2de | 56 | p23 = 23, |
mbed_official | 244:7618f037e2de | 57 | p24 = 24, |
mbed_official | 244:7618f037e2de | 58 | p25 = 25, |
mbed_official | 244:7618f037e2de | 59 | p26 = 26, |
mbed_official | 244:7618f037e2de | 60 | p27 = 27, |
mbed_official | 244:7618f037e2de | 61 | p28 = 28, |
mbed_official | 244:7618f037e2de | 62 | p29 = 29, |
mbed_official | 244:7618f037e2de | 63 | p30 = 30, |
mbed_official | 244:7618f037e2de | 64 | // p31=31, |
mbed_official | 244:7618f037e2de | 65 | |
mbed_official | 244:7618f037e2de | 66 | P0_0 = p0, |
mbed_official | 244:7618f037e2de | 67 | P0_1 = p1, |
mbed_official | 244:7618f037e2de | 68 | P0_2 = p2, |
mbed_official | 244:7618f037e2de | 69 | P0_3 = p3, |
mbed_official | 244:7618f037e2de | 70 | P0_4 = p4, |
mbed_official | 244:7618f037e2de | 71 | P0_5 = p5, |
mbed_official | 244:7618f037e2de | 72 | P0_6 = p6, |
mbed_official | 244:7618f037e2de | 73 | P0_7 = p7, |
mbed_official | 244:7618f037e2de | 74 | |
mbed_official | 244:7618f037e2de | 75 | P0_8 = p8, |
mbed_official | 244:7618f037e2de | 76 | P0_9 = p9, |
mbed_official | 244:7618f037e2de | 77 | P0_10 = p10, |
mbed_official | 244:7618f037e2de | 78 | P0_11 = p11, |
mbed_official | 244:7618f037e2de | 79 | P0_12 = p12, |
mbed_official | 244:7618f037e2de | 80 | P0_13 = p13, |
mbed_official | 244:7618f037e2de | 81 | P0_14 = p14, |
mbed_official | 244:7618f037e2de | 82 | P0_15 = p15, |
mbed_official | 244:7618f037e2de | 83 | |
mbed_official | 244:7618f037e2de | 84 | P0_16 = p16, |
mbed_official | 244:7618f037e2de | 85 | P0_17 = p17, |
mbed_official | 244:7618f037e2de | 86 | P0_18 = p18, |
mbed_official | 244:7618f037e2de | 87 | P0_19 = p19, |
mbed_official | 244:7618f037e2de | 88 | P0_20 = p20, |
mbed_official | 244:7618f037e2de | 89 | P0_21 = p21, |
mbed_official | 244:7618f037e2de | 90 | P0_22 = p22, |
mbed_official | 244:7618f037e2de | 91 | P0_23 = p23, |
mbed_official | 244:7618f037e2de | 92 | |
mbed_official | 244:7618f037e2de | 93 | P0_24 = p24, |
mbed_official | 244:7618f037e2de | 94 | P0_25 = p25, |
mbed_official | 244:7618f037e2de | 95 | P0_26 = p26, |
mbed_official | 244:7618f037e2de | 96 | P0_27 = p27, |
mbed_official | 244:7618f037e2de | 97 | P0_28 = p28, |
mbed_official | 244:7618f037e2de | 98 | P0_29 = p29, |
mbed_official | 244:7618f037e2de | 99 | P0_30 = p30, |
mbed_official | 244:7618f037e2de | 100 | |
mbed_official | 244:7618f037e2de | 101 | LED1 = p30, |
mbed_official | 244:7618f037e2de | 102 | LED2 = p14, |
mbed_official | 244:7618f037e2de | 103 | LED3 = p15, |
mbed_official | 244:7618f037e2de | 104 | LED4 = p16, |
mbed_official | 244:7618f037e2de | 105 | |
mbed_official | 244:7618f037e2de | 106 | RX_PIN_NUMBER = p7, |
mbed_official | 244:7618f037e2de | 107 | TX_PIN_NUMBER = p8, |
mbed_official | 244:7618f037e2de | 108 | CTS_PIN_NUMBER = p26, |
mbed_official | 244:7618f037e2de | 109 | RTS_PIN_NUMBER = p27, |
mbed_official | 244:7618f037e2de | 110 | |
mbed_official | 244:7618f037e2de | 111 | // mBed interface Pins |
mbed_official | 244:7618f037e2de | 112 | USBTX = TX_PIN_NUMBER, |
mbed_official | 244:7618f037e2de | 113 | USBRX = RX_PIN_NUMBER, |
mbed_official | 244:7618f037e2de | 114 | |
mbed_official | 244:7618f037e2de | 115 | SPI_PSELMOSI0 = p25, |
mbed_official | 244:7618f037e2de | 116 | SPI_PSELMISO0 = p28, |
mbed_official | 244:7618f037e2de | 117 | SPI_PSELSS0 = p24, |
mbed_official | 244:7618f037e2de | 118 | SPI_PSELSCK0 = p29, |
mbed_official | 244:7618f037e2de | 119 | |
mbed_official | 244:7618f037e2de | 120 | SPI_PSELMOSI1 = p12, |
mbed_official | 244:7618f037e2de | 121 | SPI_PSELMISO1 = p13, |
mbed_official | 244:7618f037e2de | 122 | SPI_PSELSS1 = p14, |
mbed_official | 244:7618f037e2de | 123 | SPI_PSELSCK1 = p15, |
mbed_official | 244:7618f037e2de | 124 | |
mbed_official | 244:7618f037e2de | 125 | SPIS_PSELMOSI = p12, |
mbed_official | 244:7618f037e2de | 126 | SPIS_PSELMISO = p13, |
mbed_official | 244:7618f037e2de | 127 | SPIS_PSELSS = p14, |
mbed_official | 244:7618f037e2de | 128 | SPIS_PSELSCK = p15, |
mbed_official | 244:7618f037e2de | 129 | |
mbed_official | 244:7618f037e2de | 130 | I2C_SDA0 = p5, |
mbed_official | 244:7618f037e2de | 131 | I2C_SCL0 = p6, |
mbed_official | 244:7618f037e2de | 132 | |
mbed_official | 244:7618f037e2de | 133 | I2C_SDA1 = p13, |
mbed_official | 244:7618f037e2de | 134 | I2C_SCL1 = p15, |
mbed_official | 244:7618f037e2de | 135 | |
mbed_official | 244:7618f037e2de | 136 | D0 = p7, |
mbed_official | 244:7618f037e2de | 137 | D1 = p8, |
mbed_official | 244:7618f037e2de | 138 | D2 = p9, |
mbed_official | 244:7618f037e2de | 139 | D3 = p10, |
mbed_official | 244:7618f037e2de | 140 | D4 = p11, |
mbed_official | 244:7618f037e2de | 141 | D5 = p12, |
mbed_official | 244:7618f037e2de | 142 | D6 = p13, |
mbed_official | 244:7618f037e2de | 143 | D7 = p17, |
mbed_official | 244:7618f037e2de | 144 | |
mbed_official | 244:7618f037e2de | 145 | D8 = p18, |
mbed_official | 244:7618f037e2de | 146 | D9 = p23, |
mbed_official | 244:7618f037e2de | 147 | D10 = p24, |
mbed_official | 244:7618f037e2de | 148 | D11 = p25, |
mbed_official | 244:7618f037e2de | 149 | D12 = p28, |
mbed_official | 244:7618f037e2de | 150 | D13 = p29, |
mbed_official | 244:7618f037e2de | 151 | |
mbed_official | 244:7618f037e2de | 152 | D14 = p5, |
mbed_official | 244:7618f037e2de | 153 | D15 = p6, |
mbed_official | 244:7618f037e2de | 154 | |
mbed_official | 244:7618f037e2de | 155 | A0 = p1, |
mbed_official | 244:7618f037e2de | 156 | A1 = p2, |
mbed_official | 244:7618f037e2de | 157 | A2 = p3, |
mbed_official | 244:7618f037e2de | 158 | A3 = p4, |
mbed_official | 244:7618f037e2de | 159 | A4 = p5, |
mbed_official | 244:7618f037e2de | 160 | A5 = p6, |
mbed_official | 244:7618f037e2de | 161 | |
mbed_official | 244:7618f037e2de | 162 | // Not connected |
mbed_official | 244:7618f037e2de | 163 | NC = (int)0xFFFFFFFF |
mbed_official | 244:7618f037e2de | 164 | } PinName; |
mbed_official | 244:7618f037e2de | 165 | |
mbed_official | 244:7618f037e2de | 166 | typedef enum { |
mbed_official | 244:7618f037e2de | 167 | PullNone = 0, |
mbed_official | 244:7618f037e2de | 168 | PullDown = 1, |
mbed_official | 244:7618f037e2de | 169 | PullUp = 3, |
mbed_official | 244:7618f037e2de | 170 | PullDefault = PullUp |
mbed_official | 244:7618f037e2de | 171 | } PinMode; |
mbed_official | 244:7618f037e2de | 172 | |
mbed_official | 244:7618f037e2de | 173 | #ifdef __cplusplus |
mbed_official | 244:7618f037e2de | 174 | } |
mbed_official | 244:7618f037e2de | 175 | #endif |
mbed_official | 244:7618f037e2de | 176 | |
mbed_official | 244:7618f037e2de | 177 | #endif |