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