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