Mouse code for the MacroRat
mbed-dev/targets/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_NRF51_DONGLE/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 | p28 = 28, |
sahilmgandhi | 18:6a4db94011d3 | 60 | p29 = 29, |
sahilmgandhi | 18:6a4db94011d3 | 61 | p30 = 30, |
sahilmgandhi | 18:6a4db94011d3 | 62 | |
sahilmgandhi | 18:6a4db94011d3 | 63 | P0_0 = p0, |
sahilmgandhi | 18:6a4db94011d3 | 64 | P0_1 = p1, |
sahilmgandhi | 18:6a4db94011d3 | 65 | P0_2 = p2, |
sahilmgandhi | 18:6a4db94011d3 | 66 | P0_3 = p3, |
sahilmgandhi | 18:6a4db94011d3 | 67 | P0_4 = p4, |
sahilmgandhi | 18:6a4db94011d3 | 68 | P0_5 = p5, |
sahilmgandhi | 18:6a4db94011d3 | 69 | P0_6 = p6, |
sahilmgandhi | 18:6a4db94011d3 | 70 | P0_7 = p7, |
sahilmgandhi | 18:6a4db94011d3 | 71 | |
sahilmgandhi | 18:6a4db94011d3 | 72 | P0_8 = p8, |
sahilmgandhi | 18:6a4db94011d3 | 73 | P0_9 = p9, |
sahilmgandhi | 18:6a4db94011d3 | 74 | P0_10 = p10, |
sahilmgandhi | 18:6a4db94011d3 | 75 | P0_11 = p11, |
sahilmgandhi | 18:6a4db94011d3 | 76 | P0_12 = p12, |
sahilmgandhi | 18:6a4db94011d3 | 77 | P0_13 = p13, |
sahilmgandhi | 18:6a4db94011d3 | 78 | P0_14 = p14, |
sahilmgandhi | 18:6a4db94011d3 | 79 | P0_15 = p15, |
sahilmgandhi | 18:6a4db94011d3 | 80 | |
sahilmgandhi | 18:6a4db94011d3 | 81 | P0_16 = p16, |
sahilmgandhi | 18:6a4db94011d3 | 82 | P0_17 = p17, |
sahilmgandhi | 18:6a4db94011d3 | 83 | P0_18 = p18, |
sahilmgandhi | 18:6a4db94011d3 | 84 | P0_19 = p19, |
sahilmgandhi | 18:6a4db94011d3 | 85 | P0_20 = p20, |
sahilmgandhi | 18:6a4db94011d3 | 86 | P0_21 = p21, |
sahilmgandhi | 18:6a4db94011d3 | 87 | P0_22 = p22, |
sahilmgandhi | 18:6a4db94011d3 | 88 | P0_23 = p23, |
sahilmgandhi | 18:6a4db94011d3 | 89 | |
sahilmgandhi | 18:6a4db94011d3 | 90 | P0_24 = p24, |
sahilmgandhi | 18:6a4db94011d3 | 91 | P0_25 = p25, |
sahilmgandhi | 18:6a4db94011d3 | 92 | P0_28 = p28, |
sahilmgandhi | 18:6a4db94011d3 | 93 | P0_29 = p29, |
sahilmgandhi | 18:6a4db94011d3 | 94 | |
sahilmgandhi | 18:6a4db94011d3 | 95 | LED1 = p21, |
sahilmgandhi | 18:6a4db94011d3 | 96 | LED2 = p22, |
sahilmgandhi | 18:6a4db94011d3 | 97 | LED3 = p23, |
sahilmgandhi | 18:6a4db94011d3 | 98 | LED4 = p23, |
sahilmgandhi | 18:6a4db94011d3 | 99 | LEDR = LED1, |
sahilmgandhi | 18:6a4db94011d3 | 100 | LEDG = LED2, |
sahilmgandhi | 18:6a4db94011d3 | 101 | LEDB = LED3, |
sahilmgandhi | 18:6a4db94011d3 | 102 | |
sahilmgandhi | 18:6a4db94011d3 | 103 | RX_PIN_NUMBER = p11, |
sahilmgandhi | 18:6a4db94011d3 | 104 | TX_PIN_NUMBER = p9, |
sahilmgandhi | 18:6a4db94011d3 | 105 | CTS_PIN_NUMBER = p10, |
sahilmgandhi | 18:6a4db94011d3 | 106 | RTS_PIN_NUMBER = p8, |
sahilmgandhi | 18:6a4db94011d3 | 107 | |
sahilmgandhi | 18:6a4db94011d3 | 108 | // mBed interface Pins |
sahilmgandhi | 18:6a4db94011d3 | 109 | USBTX = TX_PIN_NUMBER, |
sahilmgandhi | 18:6a4db94011d3 | 110 | USBRX = RX_PIN_NUMBER, |
sahilmgandhi | 18:6a4db94011d3 | 111 | |
sahilmgandhi | 18:6a4db94011d3 | 112 | SPI_PSELMOSI0 = p15, |
sahilmgandhi | 18:6a4db94011d3 | 113 | SPI_PSELMISO0 = p16, |
sahilmgandhi | 18:6a4db94011d3 | 114 | SPI_PSELSS0 = p17, |
sahilmgandhi | 18:6a4db94011d3 | 115 | SPI_PSELSCK0 = p18, |
sahilmgandhi | 18:6a4db94011d3 | 116 | |
sahilmgandhi | 18:6a4db94011d3 | 117 | SPI_PSELMOSI1 = p15, |
sahilmgandhi | 18:6a4db94011d3 | 118 | SPI_PSELMISO1 = p16, |
sahilmgandhi | 18:6a4db94011d3 | 119 | SPI_PSELSS1 = p17, |
sahilmgandhi | 18:6a4db94011d3 | 120 | SPI_PSELSCK1 = p18, |
sahilmgandhi | 18:6a4db94011d3 | 121 | |
sahilmgandhi | 18:6a4db94011d3 | 122 | SPIS_PSELMOSI = p15, |
sahilmgandhi | 18:6a4db94011d3 | 123 | SPIS_PSELMISO = p16, |
sahilmgandhi | 18:6a4db94011d3 | 124 | SPIS_PSELSS = p17, |
sahilmgandhi | 18:6a4db94011d3 | 125 | SPIS_PSELSCK = p18, |
sahilmgandhi | 18:6a4db94011d3 | 126 | |
sahilmgandhi | 18:6a4db94011d3 | 127 | I2C_SDA0 = p19, |
sahilmgandhi | 18:6a4db94011d3 | 128 | I2C_SCL0 = p20, |
sahilmgandhi | 18:6a4db94011d3 | 129 | |
sahilmgandhi | 18:6a4db94011d3 | 130 | // Not connected |
sahilmgandhi | 18:6a4db94011d3 | 131 | NC = (int)0xFFFFFFFF |
sahilmgandhi | 18:6a4db94011d3 | 132 | } PinName; |
sahilmgandhi | 18:6a4db94011d3 | 133 | |
sahilmgandhi | 18:6a4db94011d3 | 134 | typedef enum { |
sahilmgandhi | 18:6a4db94011d3 | 135 | PullNone = 0, |
sahilmgandhi | 18:6a4db94011d3 | 136 | PullDown = 1, |
sahilmgandhi | 18:6a4db94011d3 | 137 | PullUp = 3, |
sahilmgandhi | 18:6a4db94011d3 | 138 | PullDefault = PullUp |
sahilmgandhi | 18:6a4db94011d3 | 139 | } PinMode; |
sahilmgandhi | 18:6a4db94011d3 | 140 | |
sahilmgandhi | 18:6a4db94011d3 | 141 | #ifdef __cplusplus |
sahilmgandhi | 18:6a4db94011d3 | 142 | } |
sahilmgandhi | 18:6a4db94011d3 | 143 | #endif |
sahilmgandhi | 18:6a4db94011d3 | 144 | |
sahilmgandhi | 18:6a4db94011d3 | 145 | #endif |