mbed library sources modified for open wear

Dependents:   openwear-lifelogger-example

Fork of mbed-src by mbed official

Committer:
mbed_official
Date:
Wed Jul 23 21:15:06 2014 +0100
Revision:
265:9632ea190e16
Child:
267:8673334f2cbe
Synchronized with git revision 7a5896cba254ab45829b43f6cef5563706ebba2b

Full URL: https://github.com/mbedmicro/mbed/commit/7a5896cba254ab45829b43f6cef5563706ebba2b/

[MTS_GAMBIT] Add new target support

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mbed_official 265:9632ea190e16 1 /* mbed Microcontroller Library
mbed_official 265:9632ea190e16 2 * Copyright (c) 2006-2013 ARM Limited
mbed_official 265:9632ea190e16 3 *
mbed_official 265:9632ea190e16 4 * Licensed under the Apache License, Version 2.0 (the "License");
mbed_official 265:9632ea190e16 5 * you may not use this file except in compliance with the License.
mbed_official 265:9632ea190e16 6 * You may obtain a copy of the License at
mbed_official 265:9632ea190e16 7 *
mbed_official 265:9632ea190e16 8 * http://www.apache.org/licenses/LICENSE-2.0
mbed_official 265:9632ea190e16 9 *
mbed_official 265:9632ea190e16 10 * Unless required by applicable law or agreed to in writing, software
mbed_official 265:9632ea190e16 11 * distributed under the License is distributed on an "AS IS" BASIS,
mbed_official 265:9632ea190e16 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
mbed_official 265:9632ea190e16 13 * See the License for the specific language governing permissions and
mbed_official 265:9632ea190e16 14 * limitations under the License.
mbed_official 265:9632ea190e16 15 */
mbed_official 265:9632ea190e16 16 #ifndef MBED_PINNAMES_H
mbed_official 265:9632ea190e16 17 #define MBED_PINNAMES_H
mbed_official 265:9632ea190e16 18
mbed_official 265:9632ea190e16 19 #include "cmsis.h"
mbed_official 265:9632ea190e16 20
mbed_official 265:9632ea190e16 21 #ifdef __cplusplus
mbed_official 265:9632ea190e16 22 extern "C" {
mbed_official 265:9632ea190e16 23 #endif
mbed_official 265:9632ea190e16 24
mbed_official 265:9632ea190e16 25 typedef enum {
mbed_official 265:9632ea190e16 26 PIN_INPUT,
mbed_official 265:9632ea190e16 27 PIN_OUTPUT
mbed_official 265:9632ea190e16 28 } PinDirection;
mbed_official 265:9632ea190e16 29
mbed_official 265:9632ea190e16 30 #define GPIO_PORT_SHIFT 12
mbed_official 265:9632ea190e16 31
mbed_official 265:9632ea190e16 32 typedef enum {
mbed_official 265:9632ea190e16 33 PTA0 = (0 << GPIO_PORT_SHIFT | 0 ),
mbed_official 265:9632ea190e16 34 PTA1 = (0 << GPIO_PORT_SHIFT | 1 ),
mbed_official 265:9632ea190e16 35 PTA2 = (0 << GPIO_PORT_SHIFT | 2 ),
mbed_official 265:9632ea190e16 36 PTA3 = (0 << GPIO_PORT_SHIFT | 3 ),
mbed_official 265:9632ea190e16 37 PTA4 = (0 << GPIO_PORT_SHIFT | 4 ),
mbed_official 265:9632ea190e16 38 PTA5 = (0 << GPIO_PORT_SHIFT | 5 ),
mbed_official 265:9632ea190e16 39 PTA6 = (0 << GPIO_PORT_SHIFT | 6 ),
mbed_official 265:9632ea190e16 40 PTA7 = (0 << GPIO_PORT_SHIFT | 7 ),
mbed_official 265:9632ea190e16 41 PTA8 = (0 << GPIO_PORT_SHIFT | 8 ),
mbed_official 265:9632ea190e16 42 PTA9 = (0 << GPIO_PORT_SHIFT | 9 ),
mbed_official 265:9632ea190e16 43 PTA10 = (0 << GPIO_PORT_SHIFT | 10),
mbed_official 265:9632ea190e16 44 PTA11 = (0 << GPIO_PORT_SHIFT | 11),
mbed_official 265:9632ea190e16 45 PTA12 = (0 << GPIO_PORT_SHIFT | 12),
mbed_official 265:9632ea190e16 46 PTA13 = (0 << GPIO_PORT_SHIFT | 13),
mbed_official 265:9632ea190e16 47 PTA14 = (0 << GPIO_PORT_SHIFT | 14),
mbed_official 265:9632ea190e16 48 PTA15 = (0 << GPIO_PORT_SHIFT | 15),
mbed_official 265:9632ea190e16 49 PTA16 = (0 << GPIO_PORT_SHIFT | 16),
mbed_official 265:9632ea190e16 50 PTA17 = (0 << GPIO_PORT_SHIFT | 17),
mbed_official 265:9632ea190e16 51 PTA18 = (0 << GPIO_PORT_SHIFT | 18),
mbed_official 265:9632ea190e16 52 PTA19 = (0 << GPIO_PORT_SHIFT | 19),
mbed_official 265:9632ea190e16 53 PTA20 = (0 << GPIO_PORT_SHIFT | 20),
mbed_official 265:9632ea190e16 54 PTA21 = (0 << GPIO_PORT_SHIFT | 21),
mbed_official 265:9632ea190e16 55 PTA22 = (0 << GPIO_PORT_SHIFT | 22),
mbed_official 265:9632ea190e16 56 PTA23 = (0 << GPIO_PORT_SHIFT | 23),
mbed_official 265:9632ea190e16 57 PTA24 = (0 << GPIO_PORT_SHIFT | 24),
mbed_official 265:9632ea190e16 58 PTA25 = (0 << GPIO_PORT_SHIFT | 25),
mbed_official 265:9632ea190e16 59 PTA26 = (0 << GPIO_PORT_SHIFT | 26),
mbed_official 265:9632ea190e16 60 PTA27 = (0 << GPIO_PORT_SHIFT | 27),
mbed_official 265:9632ea190e16 61 PTA28 = (0 << GPIO_PORT_SHIFT | 28),
mbed_official 265:9632ea190e16 62 PTA29 = (0 << GPIO_PORT_SHIFT | 29),
mbed_official 265:9632ea190e16 63 PTA30 = (0 << GPIO_PORT_SHIFT | 30),
mbed_official 265:9632ea190e16 64 PTA31 = (0 << GPIO_PORT_SHIFT | 31),
mbed_official 265:9632ea190e16 65 PTB0 = (1 << GPIO_PORT_SHIFT | 0 ),
mbed_official 265:9632ea190e16 66 PTB1 = (1 << GPIO_PORT_SHIFT | 1 ),
mbed_official 265:9632ea190e16 67 PTB2 = (1 << GPIO_PORT_SHIFT | 2 ),
mbed_official 265:9632ea190e16 68 PTB3 = (1 << GPIO_PORT_SHIFT | 3 ),
mbed_official 265:9632ea190e16 69 PTB4 = (1 << GPIO_PORT_SHIFT | 4 ),
mbed_official 265:9632ea190e16 70 PTB5 = (1 << GPIO_PORT_SHIFT | 5 ),
mbed_official 265:9632ea190e16 71 PTB6 = (1 << GPIO_PORT_SHIFT | 6 ),
mbed_official 265:9632ea190e16 72 PTB7 = (1 << GPIO_PORT_SHIFT | 7 ),
mbed_official 265:9632ea190e16 73 PTB8 = (1 << GPIO_PORT_SHIFT | 8 ),
mbed_official 265:9632ea190e16 74 PTB9 = (1 << GPIO_PORT_SHIFT | 9 ),
mbed_official 265:9632ea190e16 75 PTB10 = (1 << GPIO_PORT_SHIFT | 10),
mbed_official 265:9632ea190e16 76 PTB11 = (1 << GPIO_PORT_SHIFT | 11),
mbed_official 265:9632ea190e16 77 PTB12 = (1 << GPIO_PORT_SHIFT | 12),
mbed_official 265:9632ea190e16 78 PTB13 = (1 << GPIO_PORT_SHIFT | 13),
mbed_official 265:9632ea190e16 79 PTB14 = (1 << GPIO_PORT_SHIFT | 14),
mbed_official 265:9632ea190e16 80 PTB15 = (1 << GPIO_PORT_SHIFT | 15),
mbed_official 265:9632ea190e16 81 PTB16 = (1 << GPIO_PORT_SHIFT | 16),
mbed_official 265:9632ea190e16 82 PTB17 = (1 << GPIO_PORT_SHIFT | 17),
mbed_official 265:9632ea190e16 83 PTB18 = (1 << GPIO_PORT_SHIFT | 18),
mbed_official 265:9632ea190e16 84 PTB19 = (1 << GPIO_PORT_SHIFT | 19),
mbed_official 265:9632ea190e16 85 PTB20 = (1 << GPIO_PORT_SHIFT | 20),
mbed_official 265:9632ea190e16 86 PTB21 = (1 << GPIO_PORT_SHIFT | 21),
mbed_official 265:9632ea190e16 87 PTB22 = (1 << GPIO_PORT_SHIFT | 22),
mbed_official 265:9632ea190e16 88 PTB23 = (1 << GPIO_PORT_SHIFT | 23),
mbed_official 265:9632ea190e16 89 PTB24 = (1 << GPIO_PORT_SHIFT | 24),
mbed_official 265:9632ea190e16 90 PTB25 = (1 << GPIO_PORT_SHIFT | 25),
mbed_official 265:9632ea190e16 91 PTB26 = (1 << GPIO_PORT_SHIFT | 26),
mbed_official 265:9632ea190e16 92 PTB27 = (1 << GPIO_PORT_SHIFT | 27),
mbed_official 265:9632ea190e16 93 PTB28 = (1 << GPIO_PORT_SHIFT | 28),
mbed_official 265:9632ea190e16 94 PTB29 = (1 << GPIO_PORT_SHIFT | 29),
mbed_official 265:9632ea190e16 95 PTB30 = (1 << GPIO_PORT_SHIFT | 30),
mbed_official 265:9632ea190e16 96 PTB31 = (1 << GPIO_PORT_SHIFT | 31),
mbed_official 265:9632ea190e16 97 PTC0 = (2 << GPIO_PORT_SHIFT | 0 ),
mbed_official 265:9632ea190e16 98 PTC1 = (2 << GPIO_PORT_SHIFT | 1 ),
mbed_official 265:9632ea190e16 99 PTC2 = (2 << GPIO_PORT_SHIFT | 2 ),
mbed_official 265:9632ea190e16 100 PTC3 = (2 << GPIO_PORT_SHIFT | 3 ),
mbed_official 265:9632ea190e16 101 PTC4 = (2 << GPIO_PORT_SHIFT | 4 ),
mbed_official 265:9632ea190e16 102 PTC5 = (2 << GPIO_PORT_SHIFT | 5 ),
mbed_official 265:9632ea190e16 103 PTC6 = (2 << GPIO_PORT_SHIFT | 6 ),
mbed_official 265:9632ea190e16 104 PTC7 = (2 << GPIO_PORT_SHIFT | 7 ),
mbed_official 265:9632ea190e16 105 PTC8 = (2 << GPIO_PORT_SHIFT | 8 ),
mbed_official 265:9632ea190e16 106 PTC9 = (2 << GPIO_PORT_SHIFT | 9 ),
mbed_official 265:9632ea190e16 107 PTC10 = (2 << GPIO_PORT_SHIFT | 10),
mbed_official 265:9632ea190e16 108 PTC11 = (2 << GPIO_PORT_SHIFT | 11),
mbed_official 265:9632ea190e16 109 PTC12 = (2 << GPIO_PORT_SHIFT | 12),
mbed_official 265:9632ea190e16 110 PTC13 = (2 << GPIO_PORT_SHIFT | 13),
mbed_official 265:9632ea190e16 111 PTC14 = (2 << GPIO_PORT_SHIFT | 14),
mbed_official 265:9632ea190e16 112 PTC15 = (2 << GPIO_PORT_SHIFT | 15),
mbed_official 265:9632ea190e16 113 PTC16 = (2 << GPIO_PORT_SHIFT | 16),
mbed_official 265:9632ea190e16 114 PTC17 = (2 << GPIO_PORT_SHIFT | 17),
mbed_official 265:9632ea190e16 115 PTC18 = (2 << GPIO_PORT_SHIFT | 18),
mbed_official 265:9632ea190e16 116 PTC19 = (2 << GPIO_PORT_SHIFT | 19),
mbed_official 265:9632ea190e16 117 PTC20 = (2 << GPIO_PORT_SHIFT | 20),
mbed_official 265:9632ea190e16 118 PTC21 = (2 << GPIO_PORT_SHIFT | 21),
mbed_official 265:9632ea190e16 119 PTC22 = (2 << GPIO_PORT_SHIFT | 22),
mbed_official 265:9632ea190e16 120 PTC23 = (2 << GPIO_PORT_SHIFT | 23),
mbed_official 265:9632ea190e16 121 PTC24 = (2 << GPIO_PORT_SHIFT | 24),
mbed_official 265:9632ea190e16 122 PTC25 = (2 << GPIO_PORT_SHIFT | 25),
mbed_official 265:9632ea190e16 123 PTC26 = (2 << GPIO_PORT_SHIFT | 26),
mbed_official 265:9632ea190e16 124 PTC27 = (2 << GPIO_PORT_SHIFT | 27),
mbed_official 265:9632ea190e16 125 PTC28 = (2 << GPIO_PORT_SHIFT | 28),
mbed_official 265:9632ea190e16 126 PTC29 = (2 << GPIO_PORT_SHIFT | 29),
mbed_official 265:9632ea190e16 127 PTC30 = (2 << GPIO_PORT_SHIFT | 30),
mbed_official 265:9632ea190e16 128 PTC31 = (2 << GPIO_PORT_SHIFT | 31),
mbed_official 265:9632ea190e16 129 PTD0 = (3 << GPIO_PORT_SHIFT | 0 ),
mbed_official 265:9632ea190e16 130 PTD1 = (3 << GPIO_PORT_SHIFT | 1 ),
mbed_official 265:9632ea190e16 131 PTD2 = (3 << GPIO_PORT_SHIFT | 2 ),
mbed_official 265:9632ea190e16 132 PTD3 = (3 << GPIO_PORT_SHIFT | 3 ),
mbed_official 265:9632ea190e16 133 PTD4 = (3 << GPIO_PORT_SHIFT | 4 ),
mbed_official 265:9632ea190e16 134 PTD5 = (3 << GPIO_PORT_SHIFT | 5 ),
mbed_official 265:9632ea190e16 135 PTD6 = (3 << GPIO_PORT_SHIFT | 6 ),
mbed_official 265:9632ea190e16 136 PTD7 = (3 << GPIO_PORT_SHIFT | 7 ),
mbed_official 265:9632ea190e16 137 PTD8 = (3 << GPIO_PORT_SHIFT | 8 ),
mbed_official 265:9632ea190e16 138 PTD9 = (3 << GPIO_PORT_SHIFT | 9 ),
mbed_official 265:9632ea190e16 139 PTD10 = (3 << GPIO_PORT_SHIFT | 10),
mbed_official 265:9632ea190e16 140 PTD11 = (3 << GPIO_PORT_SHIFT | 11),
mbed_official 265:9632ea190e16 141 PTD12 = (3 << GPIO_PORT_SHIFT | 12),
mbed_official 265:9632ea190e16 142 PTD13 = (3 << GPIO_PORT_SHIFT | 13),
mbed_official 265:9632ea190e16 143 PTD14 = (3 << GPIO_PORT_SHIFT | 14),
mbed_official 265:9632ea190e16 144 PTD15 = (3 << GPIO_PORT_SHIFT | 15),
mbed_official 265:9632ea190e16 145 PTD16 = (3 << GPIO_PORT_SHIFT | 16),
mbed_official 265:9632ea190e16 146 PTD17 = (3 << GPIO_PORT_SHIFT | 17),
mbed_official 265:9632ea190e16 147 PTD18 = (3 << GPIO_PORT_SHIFT | 18),
mbed_official 265:9632ea190e16 148 PTD19 = (3 << GPIO_PORT_SHIFT | 19),
mbed_official 265:9632ea190e16 149 PTD20 = (3 << GPIO_PORT_SHIFT | 20),
mbed_official 265:9632ea190e16 150 PTD21 = (3 << GPIO_PORT_SHIFT | 21),
mbed_official 265:9632ea190e16 151 PTD22 = (3 << GPIO_PORT_SHIFT | 22),
mbed_official 265:9632ea190e16 152 PTD23 = (3 << GPIO_PORT_SHIFT | 23),
mbed_official 265:9632ea190e16 153 PTD24 = (3 << GPIO_PORT_SHIFT | 24),
mbed_official 265:9632ea190e16 154 PTD25 = (3 << GPIO_PORT_SHIFT | 25),
mbed_official 265:9632ea190e16 155 PTD26 = (3 << GPIO_PORT_SHIFT | 26),
mbed_official 265:9632ea190e16 156 PTD27 = (3 << GPIO_PORT_SHIFT | 27),
mbed_official 265:9632ea190e16 157 PTD28 = (3 << GPIO_PORT_SHIFT | 28),
mbed_official 265:9632ea190e16 158 PTD29 = (3 << GPIO_PORT_SHIFT | 29),
mbed_official 265:9632ea190e16 159 PTD30 = (3 << GPIO_PORT_SHIFT | 30),
mbed_official 265:9632ea190e16 160 PTD31 = (3 << GPIO_PORT_SHIFT | 31),
mbed_official 265:9632ea190e16 161 PTE0 = (4 << GPIO_PORT_SHIFT | 0 ),
mbed_official 265:9632ea190e16 162 PTE1 = (4 << GPIO_PORT_SHIFT | 1 ),
mbed_official 265:9632ea190e16 163 PTE2 = (4 << GPIO_PORT_SHIFT | 2 ),
mbed_official 265:9632ea190e16 164 PTE3 = (4 << GPIO_PORT_SHIFT | 3 ),
mbed_official 265:9632ea190e16 165 PTE4 = (4 << GPIO_PORT_SHIFT | 4 ),
mbed_official 265:9632ea190e16 166 PTE5 = (4 << GPIO_PORT_SHIFT | 5 ),
mbed_official 265:9632ea190e16 167 PTE6 = (4 << GPIO_PORT_SHIFT | 6 ),
mbed_official 265:9632ea190e16 168 PTE7 = (4 << GPIO_PORT_SHIFT | 7 ),
mbed_official 265:9632ea190e16 169 PTE8 = (4 << GPIO_PORT_SHIFT | 8 ),
mbed_official 265:9632ea190e16 170 PTE9 = (4 << GPIO_PORT_SHIFT | 9 ),
mbed_official 265:9632ea190e16 171 PTE10 = (4 << GPIO_PORT_SHIFT | 10),
mbed_official 265:9632ea190e16 172 PTE11 = (4 << GPIO_PORT_SHIFT | 11),
mbed_official 265:9632ea190e16 173 PTE12 = (4 << GPIO_PORT_SHIFT | 12),
mbed_official 265:9632ea190e16 174 PTE13 = (4 << GPIO_PORT_SHIFT | 13),
mbed_official 265:9632ea190e16 175 PTE14 = (4 << GPIO_PORT_SHIFT | 14),
mbed_official 265:9632ea190e16 176 PTE15 = (4 << GPIO_PORT_SHIFT | 15),
mbed_official 265:9632ea190e16 177 PTE16 = (4 << GPIO_PORT_SHIFT | 16),
mbed_official 265:9632ea190e16 178 PTE17 = (4 << GPIO_PORT_SHIFT | 17),
mbed_official 265:9632ea190e16 179 PTE18 = (4 << GPIO_PORT_SHIFT | 18),
mbed_official 265:9632ea190e16 180 PTE19 = (4 << GPIO_PORT_SHIFT | 19),
mbed_official 265:9632ea190e16 181 PTE20 = (4 << GPIO_PORT_SHIFT | 20),
mbed_official 265:9632ea190e16 182 PTE21 = (4 << GPIO_PORT_SHIFT | 21),
mbed_official 265:9632ea190e16 183 PTE22 = (4 << GPIO_PORT_SHIFT | 22),
mbed_official 265:9632ea190e16 184 PTE23 = (4 << GPIO_PORT_SHIFT | 23),
mbed_official 265:9632ea190e16 185 PTE24 = (4 << GPIO_PORT_SHIFT | 24),
mbed_official 265:9632ea190e16 186 PTE25 = (4 << GPIO_PORT_SHIFT | 25),
mbed_official 265:9632ea190e16 187 PTE26 = (4 << GPIO_PORT_SHIFT | 26),
mbed_official 265:9632ea190e16 188 PTE27 = (4 << GPIO_PORT_SHIFT | 27),
mbed_official 265:9632ea190e16 189 PTE28 = (4 << GPIO_PORT_SHIFT | 28),
mbed_official 265:9632ea190e16 190 PTE29 = (4 << GPIO_PORT_SHIFT | 29),
mbed_official 265:9632ea190e16 191 PTE30 = (4 << GPIO_PORT_SHIFT | 30),
mbed_official 265:9632ea190e16 192 PTE31 = (4 << GPIO_PORT_SHIFT | 31),
mbed_official 265:9632ea190e16 193
mbed_official 265:9632ea190e16 194 // mbed original LED naming
mbed_official 265:9632ea190e16 195 //LED1 = LED_RED,
mbed_official 265:9632ea190e16 196 //LED2 = LED_GREEN,
mbed_official 265:9632ea190e16 197 //LED3 = LED_BLUE,
mbed_official 265:9632ea190e16 198 //LED4 = LED_RED,
mbed_official 265:9632ea190e16 199
mbed_official 265:9632ea190e16 200 //Push buttons
mbed_official 265:9632ea190e16 201 //SW2 = PTC6,
mbed_official 265:9632ea190e16 202 //SW3 = PTA4,
mbed_official 265:9632ea190e16 203
mbed_official 265:9632ea190e16 204 // USB Pins
mbed_official 265:9632ea190e16 205 USBTX = PTB17,
mbed_official 265:9632ea190e16 206 USBRX = PTB16,
mbed_official 265:9632ea190e16 207
mbed_official 265:9632ea190e16 208 DAC0_OUT = 0xFEFE, /* DAC does not have Pin Name in RM */
mbed_official 265:9632ea190e16 209
mbed_official 265:9632ea190e16 210 // Not connected
mbed_official 265:9632ea190e16 211 NC = (int)0xFFFFFFFF
mbed_official 265:9632ea190e16 212 } PinName;
mbed_official 265:9632ea190e16 213
mbed_official 265:9632ea190e16 214
mbed_official 265:9632ea190e16 215 typedef enum {
mbed_official 265:9632ea190e16 216 PullNone = 0,
mbed_official 265:9632ea190e16 217 PullDown = 1,
mbed_official 265:9632ea190e16 218 PullUp = 2,
mbed_official 265:9632ea190e16 219 PullDefault = PullUp
mbed_official 265:9632ea190e16 220 } PinMode;
mbed_official 265:9632ea190e16 221
mbed_official 265:9632ea190e16 222 #ifdef __cplusplus
mbed_official 265:9632ea190e16 223 }
mbed_official 265:9632ea190e16 224 #endif
mbed_official 265:9632ea190e16 225
mbed_official 265:9632ea190e16 226 #endif