mbed library sources, with proposed I2C for Seed Arch BLE - not working -
Dependents: Seeed_Barometer_Sensor_Example
Fork of mbed-src by
targets/hal/TARGET_Freescale/TARGET_K20D50M/PinNames.h@385:29cfbec5cd8b, 2014-11-04 (annotated)
- Committer:
- grassel
- Date:
- Tue Nov 04 18:57:50 2014 +0000
- Revision:
- 385:29cfbec5cd8b
- Parent:
- 255:20b371a9491b
working, thanks to the fix provided by Yihui Xiong at https://developer.mbed.org/questions/5107/Arch-BLE-I2C-working/#answer5390
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
mbed_official | 255:20b371a9491b | 1 | /* mbed Microcontroller Library |
mbed_official | 255:20b371a9491b | 2 | * Copyright (c) 2006-2013 ARM Limited |
mbed_official | 255:20b371a9491b | 3 | * |
mbed_official | 255:20b371a9491b | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
mbed_official | 255:20b371a9491b | 5 | * you may not use this file except in compliance with the License. |
mbed_official | 255:20b371a9491b | 6 | * You may obtain a copy of the License at |
mbed_official | 255:20b371a9491b | 7 | * |
mbed_official | 255:20b371a9491b | 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
mbed_official | 255:20b371a9491b | 9 | * |
mbed_official | 255:20b371a9491b | 10 | * Unless required by applicable law or agreed to in writing, software |
mbed_official | 255:20b371a9491b | 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
mbed_official | 255:20b371a9491b | 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
mbed_official | 255:20b371a9491b | 13 | * See the License for the specific language governing permissions and |
mbed_official | 255:20b371a9491b | 14 | * limitations under the License. |
mbed_official | 255:20b371a9491b | 15 | */ |
mbed_official | 255:20b371a9491b | 16 | #ifndef MBED_PINNAMES_H |
mbed_official | 255:20b371a9491b | 17 | #define MBED_PINNAMES_H |
mbed_official | 255:20b371a9491b | 18 | |
mbed_official | 255:20b371a9491b | 19 | #include "cmsis.h" |
mbed_official | 255:20b371a9491b | 20 | |
mbed_official | 255:20b371a9491b | 21 | #ifdef __cplusplus |
mbed_official | 255:20b371a9491b | 22 | extern "C" { |
mbed_official | 255:20b371a9491b | 23 | #endif |
mbed_official | 255:20b371a9491b | 24 | |
mbed_official | 255:20b371a9491b | 25 | typedef enum { |
mbed_official | 255:20b371a9491b | 26 | PIN_INPUT, |
mbed_official | 255:20b371a9491b | 27 | PIN_OUTPUT |
mbed_official | 255:20b371a9491b | 28 | } PinDirection; |
mbed_official | 255:20b371a9491b | 29 | |
mbed_official | 255:20b371a9491b | 30 | /* PCR - 0x1000 */ |
mbed_official | 255:20b371a9491b | 31 | #define PORT_SHIFT 12 |
mbed_official | 255:20b371a9491b | 32 | |
mbed_official | 255:20b371a9491b | 33 | typedef enum { |
mbed_official | 255:20b371a9491b | 34 | PTA0 = 0x0, |
mbed_official | 255:20b371a9491b | 35 | PTA1 = 0x4, |
mbed_official | 255:20b371a9491b | 36 | PTA2 = 0x8, |
mbed_official | 255:20b371a9491b | 37 | PTA3 = 0xc, |
mbed_official | 255:20b371a9491b | 38 | PTA4 = 0x10, |
mbed_official | 255:20b371a9491b | 39 | PTA5 = 0x14, |
mbed_official | 255:20b371a9491b | 40 | PTA6 = 0x18, |
mbed_official | 255:20b371a9491b | 41 | PTA7 = 0x1c, |
mbed_official | 255:20b371a9491b | 42 | PTA8 = 0x20, |
mbed_official | 255:20b371a9491b | 43 | PTA9 = 0x24, |
mbed_official | 255:20b371a9491b | 44 | PTA10 = 0x28, |
mbed_official | 255:20b371a9491b | 45 | PTA11 = 0x2c, |
mbed_official | 255:20b371a9491b | 46 | PTA12 = 0x30, |
mbed_official | 255:20b371a9491b | 47 | PTA13 = 0x34, |
mbed_official | 255:20b371a9491b | 48 | PTA14 = 0x38, |
mbed_official | 255:20b371a9491b | 49 | PTA15 = 0x3c, |
mbed_official | 255:20b371a9491b | 50 | PTA16 = 0x40, |
mbed_official | 255:20b371a9491b | 51 | PTA17 = 0x44, |
mbed_official | 255:20b371a9491b | 52 | PTA18 = 0x48, |
mbed_official | 255:20b371a9491b | 53 | PTA19 = 0x4c, |
mbed_official | 255:20b371a9491b | 54 | PTA20 = 0x50, |
mbed_official | 255:20b371a9491b | 55 | PTA21 = 0x54, |
mbed_official | 255:20b371a9491b | 56 | PTA22 = 0x58, |
mbed_official | 255:20b371a9491b | 57 | PTA23 = 0x5c, |
mbed_official | 255:20b371a9491b | 58 | PTA24 = 0x60, |
mbed_official | 255:20b371a9491b | 59 | PTA25 = 0x64, |
mbed_official | 255:20b371a9491b | 60 | PTA26 = 0x68, |
mbed_official | 255:20b371a9491b | 61 | PTA27 = 0x6c, |
mbed_official | 255:20b371a9491b | 62 | PTA28 = 0x70, |
mbed_official | 255:20b371a9491b | 63 | PTA29 = 0x74, |
mbed_official | 255:20b371a9491b | 64 | PTA30 = 0x78, |
mbed_official | 255:20b371a9491b | 65 | PTA31 = 0x7c, |
mbed_official | 255:20b371a9491b | 66 | PTB0 = 0x1000, |
mbed_official | 255:20b371a9491b | 67 | PTB1 = 0x1004, |
mbed_official | 255:20b371a9491b | 68 | PTB2 = 0x1008, |
mbed_official | 255:20b371a9491b | 69 | PTB3 = 0x100c, |
mbed_official | 255:20b371a9491b | 70 | PTB4 = 0x1010, |
mbed_official | 255:20b371a9491b | 71 | PTB5 = 0x1014, |
mbed_official | 255:20b371a9491b | 72 | PTB6 = 0x1018, |
mbed_official | 255:20b371a9491b | 73 | PTB7 = 0x101c, |
mbed_official | 255:20b371a9491b | 74 | PTB8 = 0x1020, |
mbed_official | 255:20b371a9491b | 75 | PTB9 = 0x1024, |
mbed_official | 255:20b371a9491b | 76 | PTB10 = 0x1028, |
mbed_official | 255:20b371a9491b | 77 | PTB11 = 0x102c, |
mbed_official | 255:20b371a9491b | 78 | PTB12 = 0x1030, |
mbed_official | 255:20b371a9491b | 79 | PTB13 = 0x1034, |
mbed_official | 255:20b371a9491b | 80 | PTB14 = 0x1038, |
mbed_official | 255:20b371a9491b | 81 | PTB15 = 0x103c, |
mbed_official | 255:20b371a9491b | 82 | PTB16 = 0x1040, |
mbed_official | 255:20b371a9491b | 83 | PTB17 = 0x1044, |
mbed_official | 255:20b371a9491b | 84 | PTB18 = 0x1048, |
mbed_official | 255:20b371a9491b | 85 | PTB19 = 0x104c, |
mbed_official | 255:20b371a9491b | 86 | PTB20 = 0x1050, |
mbed_official | 255:20b371a9491b | 87 | PTB21 = 0x1054, |
mbed_official | 255:20b371a9491b | 88 | PTB22 = 0x1058, |
mbed_official | 255:20b371a9491b | 89 | PTB23 = 0x105c, |
mbed_official | 255:20b371a9491b | 90 | PTB24 = 0x1060, |
mbed_official | 255:20b371a9491b | 91 | PTB25 = 0x1064, |
mbed_official | 255:20b371a9491b | 92 | PTB26 = 0x1068, |
mbed_official | 255:20b371a9491b | 93 | PTB27 = 0x106c, |
mbed_official | 255:20b371a9491b | 94 | PTB28 = 0x1070, |
mbed_official | 255:20b371a9491b | 95 | PTB29 = 0x1074, |
mbed_official | 255:20b371a9491b | 96 | PTB30 = 0x1078, |
mbed_official | 255:20b371a9491b | 97 | PTB31 = 0x107c, |
mbed_official | 255:20b371a9491b | 98 | PTC0 = 0x2000, |
mbed_official | 255:20b371a9491b | 99 | PTC1 = 0x2004, |
mbed_official | 255:20b371a9491b | 100 | PTC2 = 0x2008, |
mbed_official | 255:20b371a9491b | 101 | PTC3 = 0x200c, |
mbed_official | 255:20b371a9491b | 102 | PTC4 = 0x2010, |
mbed_official | 255:20b371a9491b | 103 | PTC5 = 0x2014, |
mbed_official | 255:20b371a9491b | 104 | PTC6 = 0x2018, |
mbed_official | 255:20b371a9491b | 105 | PTC7 = 0x201c, |
mbed_official | 255:20b371a9491b | 106 | PTC8 = 0x2020, |
mbed_official | 255:20b371a9491b | 107 | PTC9 = 0x2024, |
mbed_official | 255:20b371a9491b | 108 | PTC10 = 0x2028, |
mbed_official | 255:20b371a9491b | 109 | PTC11 = 0x202c, |
mbed_official | 255:20b371a9491b | 110 | PTC12 = 0x2030, |
mbed_official | 255:20b371a9491b | 111 | PTC13 = 0x2034, |
mbed_official | 255:20b371a9491b | 112 | PTC14 = 0x2038, |
mbed_official | 255:20b371a9491b | 113 | PTC15 = 0x203c, |
mbed_official | 255:20b371a9491b | 114 | PTC16 = 0x2040, |
mbed_official | 255:20b371a9491b | 115 | PTC17 = 0x2044, |
mbed_official | 255:20b371a9491b | 116 | PTC18 = 0x2048, |
mbed_official | 255:20b371a9491b | 117 | PTC19 = 0x204c, |
mbed_official | 255:20b371a9491b | 118 | PTC20 = 0x2050, |
mbed_official | 255:20b371a9491b | 119 | PTC21 = 0x2054, |
mbed_official | 255:20b371a9491b | 120 | PTC22 = 0x2058, |
mbed_official | 255:20b371a9491b | 121 | PTC23 = 0x205c, |
mbed_official | 255:20b371a9491b | 122 | PTC24 = 0x2060, |
mbed_official | 255:20b371a9491b | 123 | PTC25 = 0x2064, |
mbed_official | 255:20b371a9491b | 124 | PTC26 = 0x2068, |
mbed_official | 255:20b371a9491b | 125 | PTC27 = 0x206c, |
mbed_official | 255:20b371a9491b | 126 | PTC28 = 0x2070, |
mbed_official | 255:20b371a9491b | 127 | PTC29 = 0x2074, |
mbed_official | 255:20b371a9491b | 128 | PTC30 = 0x2078, |
mbed_official | 255:20b371a9491b | 129 | PTC31 = 0x207c, |
mbed_official | 255:20b371a9491b | 130 | PTD0 = 0x3000, |
mbed_official | 255:20b371a9491b | 131 | PTD1 = 0x3004, |
mbed_official | 255:20b371a9491b | 132 | PTD2 = 0x3008, |
mbed_official | 255:20b371a9491b | 133 | PTD3 = 0x300c, |
mbed_official | 255:20b371a9491b | 134 | PTD4 = 0x3010, |
mbed_official | 255:20b371a9491b | 135 | PTD5 = 0x3014, |
mbed_official | 255:20b371a9491b | 136 | PTD6 = 0x3018, |
mbed_official | 255:20b371a9491b | 137 | PTD7 = 0x301c, |
mbed_official | 255:20b371a9491b | 138 | PTD8 = 0x3020, |
mbed_official | 255:20b371a9491b | 139 | PTD9 = 0x3024, |
mbed_official | 255:20b371a9491b | 140 | PTD10 = 0x3028, |
mbed_official | 255:20b371a9491b | 141 | PTD11 = 0x302c, |
mbed_official | 255:20b371a9491b | 142 | PTD12 = 0x3030, |
mbed_official | 255:20b371a9491b | 143 | PTD13 = 0x3034, |
mbed_official | 255:20b371a9491b | 144 | PTD14 = 0x3038, |
mbed_official | 255:20b371a9491b | 145 | PTD15 = 0x303c, |
mbed_official | 255:20b371a9491b | 146 | PTD16 = 0x3040, |
mbed_official | 255:20b371a9491b | 147 | PTD17 = 0x3044, |
mbed_official | 255:20b371a9491b | 148 | PTD18 = 0x3048, |
mbed_official | 255:20b371a9491b | 149 | PTD19 = 0x304c, |
mbed_official | 255:20b371a9491b | 150 | PTD20 = 0x3050, |
mbed_official | 255:20b371a9491b | 151 | PTD21 = 0x3054, |
mbed_official | 255:20b371a9491b | 152 | PTD22 = 0x3058, |
mbed_official | 255:20b371a9491b | 153 | PTD23 = 0x305c, |
mbed_official | 255:20b371a9491b | 154 | PTD24 = 0x3060, |
mbed_official | 255:20b371a9491b | 155 | PTD25 = 0x3064, |
mbed_official | 255:20b371a9491b | 156 | PTD26 = 0x3068, |
mbed_official | 255:20b371a9491b | 157 | PTD27 = 0x306c, |
mbed_official | 255:20b371a9491b | 158 | PTD28 = 0x3070, |
mbed_official | 255:20b371a9491b | 159 | PTD29 = 0x3074, |
mbed_official | 255:20b371a9491b | 160 | PTD30 = 0x3078, |
mbed_official | 255:20b371a9491b | 161 | PTD31 = 0x307c, |
mbed_official | 255:20b371a9491b | 162 | PTE0 = 0x4000, |
mbed_official | 255:20b371a9491b | 163 | PTE1 = 0x4004, |
mbed_official | 255:20b371a9491b | 164 | PTE2 = 0x4008, |
mbed_official | 255:20b371a9491b | 165 | PTE3 = 0x400c, |
mbed_official | 255:20b371a9491b | 166 | PTE4 = 0x4010, |
mbed_official | 255:20b371a9491b | 167 | PTE5 = 0x4014, |
mbed_official | 255:20b371a9491b | 168 | PTE6 = 0x4018, |
mbed_official | 255:20b371a9491b | 169 | PTE7 = 0x401c, |
mbed_official | 255:20b371a9491b | 170 | PTE8 = 0x4020, |
mbed_official | 255:20b371a9491b | 171 | PTE9 = 0x4024, |
mbed_official | 255:20b371a9491b | 172 | PTE10 = 0x4028, |
mbed_official | 255:20b371a9491b | 173 | PTE11 = 0x402c, |
mbed_official | 255:20b371a9491b | 174 | PTE12 = 0x4030, |
mbed_official | 255:20b371a9491b | 175 | PTE13 = 0x4034, |
mbed_official | 255:20b371a9491b | 176 | PTE14 = 0x4038, |
mbed_official | 255:20b371a9491b | 177 | PTE15 = 0x403c, |
mbed_official | 255:20b371a9491b | 178 | PTE16 = 0x4040, |
mbed_official | 255:20b371a9491b | 179 | PTE17 = 0x4044, |
mbed_official | 255:20b371a9491b | 180 | PTE18 = 0x4048, |
mbed_official | 255:20b371a9491b | 181 | PTE19 = 0x404c, |
mbed_official | 255:20b371a9491b | 182 | PTE20 = 0x4050, |
mbed_official | 255:20b371a9491b | 183 | PTE21 = 0x4054, |
mbed_official | 255:20b371a9491b | 184 | PTE22 = 0x4058, |
mbed_official | 255:20b371a9491b | 185 | PTE23 = 0x405c, |
mbed_official | 255:20b371a9491b | 186 | PTE24 = 0x4060, |
mbed_official | 255:20b371a9491b | 187 | PTE25 = 0x4064, |
mbed_official | 255:20b371a9491b | 188 | PTE26 = 0x4068, |
mbed_official | 255:20b371a9491b | 189 | PTE27 = 0x406c, |
mbed_official | 255:20b371a9491b | 190 | PTE28 = 0x4070, |
mbed_official | 255:20b371a9491b | 191 | PTE29 = 0x4074, |
mbed_official | 255:20b371a9491b | 192 | PTE30 = 0x4078, |
mbed_official | 255:20b371a9491b | 193 | PTE31 = 0x407c, |
mbed_official | 255:20b371a9491b | 194 | |
mbed_official | 255:20b371a9491b | 195 | LED_RED = PTC3, |
mbed_official | 255:20b371a9491b | 196 | LED_GREEN = PTD4, |
mbed_official | 255:20b371a9491b | 197 | LED_BLUE = PTA2, |
mbed_official | 255:20b371a9491b | 198 | |
mbed_official | 255:20b371a9491b | 199 | // mbed original LED naming |
mbed_official | 255:20b371a9491b | 200 | LED1 = LED_RED, |
mbed_official | 255:20b371a9491b | 201 | LED2 = LED_GREEN, |
mbed_official | 255:20b371a9491b | 202 | LED3 = LED_BLUE, |
mbed_official | 255:20b371a9491b | 203 | LED4 = LED_BLUE, |
mbed_official | 255:20b371a9491b | 204 | |
mbed_official | 255:20b371a9491b | 205 | // USB Pins |
mbed_official | 255:20b371a9491b | 206 | USBTX = PTB17, |
mbed_official | 255:20b371a9491b | 207 | USBRX = PTB16, |
mbed_official | 255:20b371a9491b | 208 | |
mbed_official | 255:20b371a9491b | 209 | // Arduino Headers |
mbed_official | 255:20b371a9491b | 210 | D0 = PTE1, |
mbed_official | 255:20b371a9491b | 211 | D1 = PTE0, |
mbed_official | 255:20b371a9491b | 212 | D2 = PTA5, |
mbed_official | 255:20b371a9491b | 213 | D3 = PTD4, |
mbed_official | 255:20b371a9491b | 214 | D4 = PTC8, |
mbed_official | 255:20b371a9491b | 215 | D5 = PTA1, |
mbed_official | 255:20b371a9491b | 216 | D6 = PTC3, |
mbed_official | 255:20b371a9491b | 217 | D7 = PTC4, |
mbed_official | 255:20b371a9491b | 218 | D8 = PTA12, |
mbed_official | 255:20b371a9491b | 219 | D9 = PTA2, |
mbed_official | 255:20b371a9491b | 220 | D10 = PTC2, |
mbed_official | 255:20b371a9491b | 221 | D11 = PTD2, |
mbed_official | 255:20b371a9491b | 222 | D12 = PTD3, |
mbed_official | 255:20b371a9491b | 223 | D13 = PTD1, |
mbed_official | 255:20b371a9491b | 224 | D14 = PTB3, |
mbed_official | 255:20b371a9491b | 225 | D15 = PTB2, |
mbed_official | 255:20b371a9491b | 226 | |
mbed_official | 255:20b371a9491b | 227 | A0 = PTC0, |
mbed_official | 255:20b371a9491b | 228 | A1 = PTC1, |
mbed_official | 255:20b371a9491b | 229 | A2 = PTD6, |
mbed_official | 255:20b371a9491b | 230 | A3 = PTD5, |
mbed_official | 255:20b371a9491b | 231 | A4 = PTB1, |
mbed_official | 255:20b371a9491b | 232 | A5 = PTB0, |
mbed_official | 255:20b371a9491b | 233 | |
mbed_official | 255:20b371a9491b | 234 | I2C_SCL = D15, |
mbed_official | 255:20b371a9491b | 235 | I2C_SDA = D14, |
mbed_official | 255:20b371a9491b | 236 | |
mbed_official | 255:20b371a9491b | 237 | TSI_ELEC0 = PTB16, |
mbed_official | 255:20b371a9491b | 238 | TSI_ELEC1 = PTB17, |
mbed_official | 255:20b371a9491b | 239 | |
mbed_official | 255:20b371a9491b | 240 | // Not connected |
mbed_official | 255:20b371a9491b | 241 | NC = (int)0xFFFFFFFF |
mbed_official | 255:20b371a9491b | 242 | } PinName; |
mbed_official | 255:20b371a9491b | 243 | |
mbed_official | 255:20b371a9491b | 244 | |
mbed_official | 255:20b371a9491b | 245 | typedef enum { |
mbed_official | 255:20b371a9491b | 246 | PullNone = 0, |
mbed_official | 255:20b371a9491b | 247 | PullDown = 2, |
mbed_official | 255:20b371a9491b | 248 | PullUp = 3, |
mbed_official | 255:20b371a9491b | 249 | PullDefault = PullUp |
mbed_official | 255:20b371a9491b | 250 | } PinMode; |
mbed_official | 255:20b371a9491b | 251 | |
mbed_official | 255:20b371a9491b | 252 | #ifdef __cplusplus |
mbed_official | 255:20b371a9491b | 253 | } |
mbed_official | 255:20b371a9491b | 254 | #endif |
mbed_official | 255:20b371a9491b | 255 | |
mbed_official | 255:20b371a9491b | 256 | #endif |