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