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