]> git.gir.st - tmk_keyboard.git/blob - tool/mbed/mbed-sdk/libraries/mbed/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/TARGET_DELTA_DFCM_NNN40/PinNames.h
Squashed 'tmk_core/' changes from 7967731..b9e0ea0
[tmk_keyboard.git] / tool / mbed / mbed-sdk / libraries / mbed / targets / hal / TARGET_NORDIC / TARGET_MCU_NRF51822 / TARGET_DELTA_DFCM_NNN40 / PinNames.h
1 /* mbed Microcontroller Library
2 * Copyright (c) 2015 Nordic Semiconductor
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16 #ifndef MBED_PINNAMES_H
17 #define MBED_PINNAMES_H
18
19 #include "cmsis.h"
20
21 #ifdef __cplusplus
22 extern "C" {
23 #endif
24
25 typedef enum {
26 PIN_INPUT,
27 PIN_OUTPUT
28 } PinDirection;
29
30 #define PORT_SHIFT 3
31
32 typedef enum {
33 NC = (int)0xFFFFFFFF,
34 p0 = 0,
35 p1 = 1,
36 p2 = 2,
37 p3 = 3,
38 p4 = 4,
39 p5 = 5,
40 p6 = 6,
41 p7 = 7,
42 p8 = NC,
43 p9 = NC,
44 p10 = NC,
45 p11 = NC,
46 p12 = NC,
47 p13 = 13,
48 p14 = NC,
49 p15 = NC,
50 p16 = 16,
51 p17 = 17,
52 p18 = NC,
53 p19 = 19,
54 p20 = 20,
55 p21 = 21,
56 p22 = 22,
57 p23 = 23,
58 p24 = 24,
59 p25 = 25,
60 p26 = 26,
61 p27 = 27,
62 p28 = NC,
63 p29 = 29,
64 p30 = 30,
65 p31 = 31,
66
67 LED1 = p7,
68 LED2 = p13,
69
70 BUTTON0 = p16,
71 BUTTON1 = p17,
72
73 RX_PIN_NUMBER = p23,
74 TX_PIN_NUMBER = p25,
75
76 // mBed interface Pins
77 USBTX = TX_PIN_NUMBER,
78 USBRX = RX_PIN_NUMBER,
79
80 SPI_PSELMOSI0 = p24,
81 SPI_PSELMISO0 = p29,
82 SPI_PSELSS0 = p6,
83 SPI_PSELSCK0 = p21,
84
85 SPIS_PSELMOSI = p24,
86 SPIS_PSELMISO = p29,
87 SPIS_PSELSS = p6,
88 SPIS_PSELSCK = p21,
89
90 I2C_SDA0 = p22,
91 I2C_SCL0 = p20,
92
93 A0 = p0,
94 A1 = p1,
95 A2 = p2,
96 A3 = p3,
97 A4 = p4,
98 A5 = p5,
99
100 SWIO = p19,
101 VERF0 = p0,
102
103 // SPI for controlling internal flash, don't use it.
104 FLASH_SPIMOSI = 15,
105 FLASH_SPIMISO = 9,
106 FLASH_SPICS = 28,
107 FLASH_SPICLK = 11,
108 // Not connected
109 CTS_PIN_NUMBER= NC,
110 RTS_PIN_NUMBER= NC,
111 SPI_PSELMOSI1 = NC,
112 SPI_PSELMISO1 = NC,
113 SPI_PSELSS1 = NC,
114 SPI_PSELSCK1 = NC,
115 LED3 = NC,
116 LED4 = NC
117 } PinName;
118
119 typedef enum {
120 PullNone = 0,
121 PullDown = 1,
122 PullUp = 3,
123 PullDefault = PullUp
124 } PinMode;
125
126 #ifdef __cplusplus
127 }
128 #endif
129
130 #endif
Imprint / Impressum