The official Mbed 2 C/C++ SDK provides the software platform and libraries to build your applications.

Dependents:   hello SerialTestv11 SerialTestv12 Sierpinski ... more

mbed 2

This is the mbed 2 library. If you'd like to learn about Mbed OS please see the mbed-os docs.

Committer:
AnnaBridge
Date:
Wed Feb 20 20:53:29 2019 +0000
Revision:
172:65be27845400
Parent:
171:3a7713b1edbc
mbed library release version 165

Who changed what in which revision?

UserRevisionLine numberNew contents of line
AnnaBridge 171:3a7713b1edbc 1 /* mbed Microcontroller Library
AnnaBridge 171:3a7713b1edbc 2 * Copyright (c) 2006-2013 ARM Limited
AnnaBridge 171:3a7713b1edbc 3 *
AnnaBridge 171:3a7713b1edbc 4 * Licensed under the Apache License, Version 2.0 (the "License");
AnnaBridge 171:3a7713b1edbc 5 * you may not use this file except in compliance with the License.
AnnaBridge 171:3a7713b1edbc 6 * You may obtain a copy of the License at
AnnaBridge 171:3a7713b1edbc 7 *
AnnaBridge 171:3a7713b1edbc 8 * http://www.apache.org/licenses/LICENSE-2.0
AnnaBridge 171:3a7713b1edbc 9 *
AnnaBridge 171:3a7713b1edbc 10 * Unless required by applicable law or agreed to in writing, software
AnnaBridge 171:3a7713b1edbc 11 * distributed under the License is distributed on an "AS IS" BASIS,
AnnaBridge 171:3a7713b1edbc 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
AnnaBridge 171:3a7713b1edbc 13 * See the License for the specific language governing permissions and
AnnaBridge 171:3a7713b1edbc 14 * limitations under the License.
AnnaBridge 171:3a7713b1edbc 15 */
AnnaBridge 171:3a7713b1edbc 16 #ifndef MBED_PINNAMES_H
AnnaBridge 171:3a7713b1edbc 17 #define MBED_PINNAMES_H
AnnaBridge 171:3a7713b1edbc 18
AnnaBridge 171:3a7713b1edbc 19 #include "cmsis.h"
AnnaBridge 171:3a7713b1edbc 20
AnnaBridge 171:3a7713b1edbc 21 #ifdef __cplusplus
AnnaBridge 171:3a7713b1edbc 22 extern "C" {
AnnaBridge 171:3a7713b1edbc 23 #endif
AnnaBridge 171:3a7713b1edbc 24
AnnaBridge 171:3a7713b1edbc 25 typedef enum {
AnnaBridge 171:3a7713b1edbc 26 PIN_INPUT,
AnnaBridge 171:3a7713b1edbc 27 PIN_OUTPUT
AnnaBridge 171:3a7713b1edbc 28 } PinDirection;
AnnaBridge 171:3a7713b1edbc 29
AnnaBridge 171:3a7713b1edbc 30 #define DAC0_OUT 0xFEFE /* DAC does not have Pin Name in RM */
AnnaBridge 171:3a7713b1edbc 31 #define NOT_CONNECTED (int)0xFFFFFFFF
AnnaBridge 171:3a7713b1edbc 32 #define GPIO_PORT_SHIFT 12
AnnaBridge 171:3a7713b1edbc 33
AnnaBridge 171:3a7713b1edbc 34 typedef enum {
AnnaBridge 171:3a7713b1edbc 35 PTA0 = (0 << GPIO_PORT_SHIFT | 0 ),
AnnaBridge 171:3a7713b1edbc 36 PTA1 = (0 << GPIO_PORT_SHIFT | 1 ),
AnnaBridge 171:3a7713b1edbc 37 PTA2 = (0 << GPIO_PORT_SHIFT | 2 ),
AnnaBridge 171:3a7713b1edbc 38 PTA3 = (0 << GPIO_PORT_SHIFT | 3 ),
AnnaBridge 171:3a7713b1edbc 39 PTA4 = (0 << GPIO_PORT_SHIFT | 4 ),
AnnaBridge 171:3a7713b1edbc 40 PTA5 = (0 << GPIO_PORT_SHIFT | 5 ),
AnnaBridge 171:3a7713b1edbc 41 PTA6 = (0 << GPIO_PORT_SHIFT | 6 ),
AnnaBridge 171:3a7713b1edbc 42 PTA7 = (0 << GPIO_PORT_SHIFT | 7 ),
AnnaBridge 171:3a7713b1edbc 43 PTA8 = (0 << GPIO_PORT_SHIFT | 8 ),
AnnaBridge 171:3a7713b1edbc 44 PTA9 = (0 << GPIO_PORT_SHIFT | 9 ),
AnnaBridge 171:3a7713b1edbc 45 PTA10 = (0 << GPIO_PORT_SHIFT | 10),
AnnaBridge 171:3a7713b1edbc 46 PTA11 = (0 << GPIO_PORT_SHIFT | 11),
AnnaBridge 171:3a7713b1edbc 47 PTA12 = (0 << GPIO_PORT_SHIFT | 12),
AnnaBridge 171:3a7713b1edbc 48 PTA13 = (0 << GPIO_PORT_SHIFT | 13),
AnnaBridge 171:3a7713b1edbc 49 PTA14 = (0 << GPIO_PORT_SHIFT | 14),
AnnaBridge 171:3a7713b1edbc 50 PTA15 = (0 << GPIO_PORT_SHIFT | 15),
AnnaBridge 171:3a7713b1edbc 51 PTA16 = (0 << GPIO_PORT_SHIFT | 16),
AnnaBridge 171:3a7713b1edbc 52 PTA17 = (0 << GPIO_PORT_SHIFT | 17),
AnnaBridge 171:3a7713b1edbc 53 PTA18 = (0 << GPIO_PORT_SHIFT | 18),
AnnaBridge 171:3a7713b1edbc 54 PTA19 = (0 << GPIO_PORT_SHIFT | 19),
AnnaBridge 171:3a7713b1edbc 55 PTA20 = (0 << GPIO_PORT_SHIFT | 20),
AnnaBridge 171:3a7713b1edbc 56 PTA21 = (0 << GPIO_PORT_SHIFT | 21),
AnnaBridge 171:3a7713b1edbc 57 PTA22 = (0 << GPIO_PORT_SHIFT | 22),
AnnaBridge 171:3a7713b1edbc 58 PTA23 = (0 << GPIO_PORT_SHIFT | 23),
AnnaBridge 171:3a7713b1edbc 59 PTA24 = (0 << GPIO_PORT_SHIFT | 24),
AnnaBridge 171:3a7713b1edbc 60 PTA25 = (0 << GPIO_PORT_SHIFT | 25),
AnnaBridge 171:3a7713b1edbc 61 PTA26 = (0 << GPIO_PORT_SHIFT | 26),
AnnaBridge 171:3a7713b1edbc 62 PTA27 = (0 << GPIO_PORT_SHIFT | 27),
AnnaBridge 171:3a7713b1edbc 63 PTA28 = (0 << GPIO_PORT_SHIFT | 28),
AnnaBridge 171:3a7713b1edbc 64 PTA29 = (0 << GPIO_PORT_SHIFT | 29),
AnnaBridge 171:3a7713b1edbc 65 PTA30 = (0 << GPIO_PORT_SHIFT | 30),
AnnaBridge 171:3a7713b1edbc 66 PTA31 = (0 << GPIO_PORT_SHIFT | 31),
AnnaBridge 171:3a7713b1edbc 67 PTB0 = (1 << GPIO_PORT_SHIFT | 0 ),
AnnaBridge 171:3a7713b1edbc 68 PTB1 = (1 << GPIO_PORT_SHIFT | 1 ),
AnnaBridge 171:3a7713b1edbc 69 PTB2 = (1 << GPIO_PORT_SHIFT | 2 ),
AnnaBridge 171:3a7713b1edbc 70 PTB3 = (1 << GPIO_PORT_SHIFT | 3 ),
AnnaBridge 171:3a7713b1edbc 71 PTB4 = (1 << GPIO_PORT_SHIFT | 4 ),
AnnaBridge 171:3a7713b1edbc 72 PTB5 = (1 << GPIO_PORT_SHIFT | 5 ),
AnnaBridge 171:3a7713b1edbc 73 PTB6 = (1 << GPIO_PORT_SHIFT | 6 ),
AnnaBridge 171:3a7713b1edbc 74 PTB7 = (1 << GPIO_PORT_SHIFT | 7 ),
AnnaBridge 171:3a7713b1edbc 75 PTB8 = (1 << GPIO_PORT_SHIFT | 8 ),
AnnaBridge 171:3a7713b1edbc 76 PTB9 = (1 << GPIO_PORT_SHIFT | 9 ),
AnnaBridge 171:3a7713b1edbc 77 PTB10 = (1 << GPIO_PORT_SHIFT | 10),
AnnaBridge 171:3a7713b1edbc 78 PTB11 = (1 << GPIO_PORT_SHIFT | 11),
AnnaBridge 171:3a7713b1edbc 79 PTB12 = (1 << GPIO_PORT_SHIFT | 12),
AnnaBridge 171:3a7713b1edbc 80 PTB13 = (1 << GPIO_PORT_SHIFT | 13),
AnnaBridge 171:3a7713b1edbc 81 PTB14 = (1 << GPIO_PORT_SHIFT | 14),
AnnaBridge 171:3a7713b1edbc 82 PTB15 = (1 << GPIO_PORT_SHIFT | 15),
AnnaBridge 171:3a7713b1edbc 83 PTB16 = (1 << GPIO_PORT_SHIFT | 16),
AnnaBridge 171:3a7713b1edbc 84 PTB17 = (1 << GPIO_PORT_SHIFT | 17),
AnnaBridge 171:3a7713b1edbc 85 PTB18 = (1 << GPIO_PORT_SHIFT | 18),
AnnaBridge 171:3a7713b1edbc 86 PTB19 = (1 << GPIO_PORT_SHIFT | 19),
AnnaBridge 171:3a7713b1edbc 87 PTB20 = (1 << GPIO_PORT_SHIFT | 20),
AnnaBridge 171:3a7713b1edbc 88 PTB21 = (1 << GPIO_PORT_SHIFT | 21),
AnnaBridge 171:3a7713b1edbc 89 PTB22 = (1 << GPIO_PORT_SHIFT | 22),
AnnaBridge 171:3a7713b1edbc 90 PTB23 = (1 << GPIO_PORT_SHIFT | 23),
AnnaBridge 171:3a7713b1edbc 91 PTB24 = (1 << GPIO_PORT_SHIFT | 24),
AnnaBridge 171:3a7713b1edbc 92 PTB25 = (1 << GPIO_PORT_SHIFT | 25),
AnnaBridge 171:3a7713b1edbc 93 PTB26 = (1 << GPIO_PORT_SHIFT | 26),
AnnaBridge 171:3a7713b1edbc 94 PTB27 = (1 << GPIO_PORT_SHIFT | 27),
AnnaBridge 171:3a7713b1edbc 95 PTB28 = (1 << GPIO_PORT_SHIFT | 28),
AnnaBridge 171:3a7713b1edbc 96 PTB29 = (1 << GPIO_PORT_SHIFT | 29),
AnnaBridge 171:3a7713b1edbc 97 PTB30 = (1 << GPIO_PORT_SHIFT | 30),
AnnaBridge 171:3a7713b1edbc 98 PTB31 = (1 << GPIO_PORT_SHIFT | 31),
AnnaBridge 171:3a7713b1edbc 99 PTC0 = (2 << GPIO_PORT_SHIFT | 0 ),
AnnaBridge 171:3a7713b1edbc 100 PTC1 = (2 << GPIO_PORT_SHIFT | 1 ),
AnnaBridge 171:3a7713b1edbc 101 PTC2 = (2 << GPIO_PORT_SHIFT | 2 ),
AnnaBridge 171:3a7713b1edbc 102 PTC3 = (2 << GPIO_PORT_SHIFT | 3 ),
AnnaBridge 171:3a7713b1edbc 103 PTC4 = (2 << GPIO_PORT_SHIFT | 4 ),
AnnaBridge 171:3a7713b1edbc 104 PTC5 = (2 << GPIO_PORT_SHIFT | 5 ),
AnnaBridge 171:3a7713b1edbc 105 PTC6 = (2 << GPIO_PORT_SHIFT | 6 ),
AnnaBridge 171:3a7713b1edbc 106 PTC7 = (2 << GPIO_PORT_SHIFT | 7 ),
AnnaBridge 171:3a7713b1edbc 107 PTC8 = (2 << GPIO_PORT_SHIFT | 8 ),
AnnaBridge 171:3a7713b1edbc 108 PTC9 = (2 << GPIO_PORT_SHIFT | 9 ),
AnnaBridge 171:3a7713b1edbc 109 PTC10 = (2 << GPIO_PORT_SHIFT | 10),
AnnaBridge 171:3a7713b1edbc 110 PTC11 = (2 << GPIO_PORT_SHIFT | 11),
AnnaBridge 171:3a7713b1edbc 111 PTC12 = (2 << GPIO_PORT_SHIFT | 12),
AnnaBridge 171:3a7713b1edbc 112 PTC13 = (2 << GPIO_PORT_SHIFT | 13),
AnnaBridge 171:3a7713b1edbc 113 PTC14 = (2 << GPIO_PORT_SHIFT | 14),
AnnaBridge 171:3a7713b1edbc 114 PTC15 = (2 << GPIO_PORT_SHIFT | 15),
AnnaBridge 171:3a7713b1edbc 115 PTC16 = (2 << GPIO_PORT_SHIFT | 16),
AnnaBridge 171:3a7713b1edbc 116 PTC17 = (2 << GPIO_PORT_SHIFT | 17),
AnnaBridge 171:3a7713b1edbc 117 PTC18 = (2 << GPIO_PORT_SHIFT | 18),
AnnaBridge 171:3a7713b1edbc 118 PTC19 = (2 << GPIO_PORT_SHIFT | 19),
AnnaBridge 171:3a7713b1edbc 119 PTC20 = (2 << GPIO_PORT_SHIFT | 20),
AnnaBridge 171:3a7713b1edbc 120 PTC21 = (2 << GPIO_PORT_SHIFT | 21),
AnnaBridge 171:3a7713b1edbc 121 PTC22 = (2 << GPIO_PORT_SHIFT | 22),
AnnaBridge 171:3a7713b1edbc 122 PTC23 = (2 << GPIO_PORT_SHIFT | 23),
AnnaBridge 171:3a7713b1edbc 123 PTC24 = (2 << GPIO_PORT_SHIFT | 24),
AnnaBridge 171:3a7713b1edbc 124 PTC25 = (2 << GPIO_PORT_SHIFT | 25),
AnnaBridge 171:3a7713b1edbc 125 PTC26 = (2 << GPIO_PORT_SHIFT | 26),
AnnaBridge 171:3a7713b1edbc 126 PTC27 = (2 << GPIO_PORT_SHIFT | 27),
AnnaBridge 171:3a7713b1edbc 127 PTC28 = (2 << GPIO_PORT_SHIFT | 28),
AnnaBridge 171:3a7713b1edbc 128 PTC29 = (2 << GPIO_PORT_SHIFT | 29),
AnnaBridge 171:3a7713b1edbc 129 PTC30 = (2 << GPIO_PORT_SHIFT | 30),
AnnaBridge 171:3a7713b1edbc 130 PTC31 = (2 << GPIO_PORT_SHIFT | 31),
AnnaBridge 171:3a7713b1edbc 131 PTD0 = (3 << GPIO_PORT_SHIFT | 0 ),
AnnaBridge 171:3a7713b1edbc 132 PTD1 = (3 << GPIO_PORT_SHIFT | 1 ),
AnnaBridge 171:3a7713b1edbc 133 PTD2 = (3 << GPIO_PORT_SHIFT | 2 ),
AnnaBridge 171:3a7713b1edbc 134 PTD3 = (3 << GPIO_PORT_SHIFT | 3 ),
AnnaBridge 171:3a7713b1edbc 135 PTD4 = (3 << GPIO_PORT_SHIFT | 4 ),
AnnaBridge 171:3a7713b1edbc 136 PTD5 = (3 << GPIO_PORT_SHIFT | 5 ),
AnnaBridge 171:3a7713b1edbc 137 PTD6 = (3 << GPIO_PORT_SHIFT | 6 ),
AnnaBridge 171:3a7713b1edbc 138 PTD7 = (3 << GPIO_PORT_SHIFT | 7 ),
AnnaBridge 171:3a7713b1edbc 139 PTD8 = (3 << GPIO_PORT_SHIFT | 8 ),
AnnaBridge 171:3a7713b1edbc 140 PTD9 = (3 << GPIO_PORT_SHIFT | 9 ),
AnnaBridge 171:3a7713b1edbc 141 PTD10 = (3 << GPIO_PORT_SHIFT | 10),
AnnaBridge 171:3a7713b1edbc 142 PTD11 = (3 << GPIO_PORT_SHIFT | 11),
AnnaBridge 171:3a7713b1edbc 143 PTD12 = (3 << GPIO_PORT_SHIFT | 12),
AnnaBridge 171:3a7713b1edbc 144 PTD13 = (3 << GPIO_PORT_SHIFT | 13),
AnnaBridge 171:3a7713b1edbc 145 PTD14 = (3 << GPIO_PORT_SHIFT | 14),
AnnaBridge 171:3a7713b1edbc 146 PTD15 = (3 << GPIO_PORT_SHIFT | 15),
AnnaBridge 171:3a7713b1edbc 147 PTD16 = (3 << GPIO_PORT_SHIFT | 16),
AnnaBridge 171:3a7713b1edbc 148 PTD17 = (3 << GPIO_PORT_SHIFT | 17),
AnnaBridge 171:3a7713b1edbc 149 PTD18 = (3 << GPIO_PORT_SHIFT | 18),
AnnaBridge 171:3a7713b1edbc 150 PTD19 = (3 << GPIO_PORT_SHIFT | 19),
AnnaBridge 171:3a7713b1edbc 151 PTD20 = (3 << GPIO_PORT_SHIFT | 20),
AnnaBridge 171:3a7713b1edbc 152 PTD21 = (3 << GPIO_PORT_SHIFT | 21),
AnnaBridge 171:3a7713b1edbc 153 PTD22 = (3 << GPIO_PORT_SHIFT | 22),
AnnaBridge 171:3a7713b1edbc 154 PTD23 = (3 << GPIO_PORT_SHIFT | 23),
AnnaBridge 171:3a7713b1edbc 155 PTD24 = (3 << GPIO_PORT_SHIFT | 24),
AnnaBridge 171:3a7713b1edbc 156 PTD25 = (3 << GPIO_PORT_SHIFT | 25),
AnnaBridge 171:3a7713b1edbc 157 PTD26 = (3 << GPIO_PORT_SHIFT | 26),
AnnaBridge 171:3a7713b1edbc 158 PTD27 = (3 << GPIO_PORT_SHIFT | 27),
AnnaBridge 171:3a7713b1edbc 159 PTD28 = (3 << GPIO_PORT_SHIFT | 28),
AnnaBridge 171:3a7713b1edbc 160 PTD29 = (3 << GPIO_PORT_SHIFT | 29),
AnnaBridge 171:3a7713b1edbc 161 PTD30 = (3 << GPIO_PORT_SHIFT | 30),
AnnaBridge 171:3a7713b1edbc 162 PTD31 = (3 << GPIO_PORT_SHIFT | 31),
AnnaBridge 171:3a7713b1edbc 163 PTE0 = (4 << GPIO_PORT_SHIFT | 0 ),
AnnaBridge 171:3a7713b1edbc 164 PTE1 = (4 << GPIO_PORT_SHIFT | 1 ),
AnnaBridge 171:3a7713b1edbc 165 PTE2 = (4 << GPIO_PORT_SHIFT | 2 ),
AnnaBridge 171:3a7713b1edbc 166 PTE3 = (4 << GPIO_PORT_SHIFT | 3 ),
AnnaBridge 171:3a7713b1edbc 167 PTE4 = (4 << GPIO_PORT_SHIFT | 4 ),
AnnaBridge 171:3a7713b1edbc 168 PTE5 = (4 << GPIO_PORT_SHIFT | 5 ),
AnnaBridge 171:3a7713b1edbc 169 PTE6 = (4 << GPIO_PORT_SHIFT | 6 ),
AnnaBridge 171:3a7713b1edbc 170 PTE7 = (4 << GPIO_PORT_SHIFT | 7 ),
AnnaBridge 171:3a7713b1edbc 171 PTE8 = (4 << GPIO_PORT_SHIFT | 8 ),
AnnaBridge 171:3a7713b1edbc 172 PTE9 = (4 << GPIO_PORT_SHIFT | 9 ),
AnnaBridge 171:3a7713b1edbc 173 PTE10 = (4 << GPIO_PORT_SHIFT | 10),
AnnaBridge 171:3a7713b1edbc 174 PTE11 = (4 << GPIO_PORT_SHIFT | 11),
AnnaBridge 171:3a7713b1edbc 175 PTE12 = (4 << GPIO_PORT_SHIFT | 12),
AnnaBridge 171:3a7713b1edbc 176 PTE13 = (4 << GPIO_PORT_SHIFT | 13),
AnnaBridge 171:3a7713b1edbc 177 PTE14 = (4 << GPIO_PORT_SHIFT | 14),
AnnaBridge 171:3a7713b1edbc 178 PTE15 = (4 << GPIO_PORT_SHIFT | 15),
AnnaBridge 171:3a7713b1edbc 179 PTE16 = (4 << GPIO_PORT_SHIFT | 16),
AnnaBridge 171:3a7713b1edbc 180 PTE17 = (4 << GPIO_PORT_SHIFT | 17),
AnnaBridge 171:3a7713b1edbc 181 PTE18 = (4 << GPIO_PORT_SHIFT | 18),
AnnaBridge 171:3a7713b1edbc 182 PTE19 = (4 << GPIO_PORT_SHIFT | 19),
AnnaBridge 171:3a7713b1edbc 183 PTE20 = (4 << GPIO_PORT_SHIFT | 20),
AnnaBridge 171:3a7713b1edbc 184 PTE21 = (4 << GPIO_PORT_SHIFT | 21),
AnnaBridge 171:3a7713b1edbc 185 PTE22 = (4 << GPIO_PORT_SHIFT | 22),
AnnaBridge 171:3a7713b1edbc 186 PTE23 = (4 << GPIO_PORT_SHIFT | 23),
AnnaBridge 171:3a7713b1edbc 187 PTE24 = (4 << GPIO_PORT_SHIFT | 24),
AnnaBridge 171:3a7713b1edbc 188 PTE25 = (4 << GPIO_PORT_SHIFT | 25),
AnnaBridge 171:3a7713b1edbc 189 PTE26 = (4 << GPIO_PORT_SHIFT | 26),
AnnaBridge 171:3a7713b1edbc 190 PTE27 = (4 << GPIO_PORT_SHIFT | 27),
AnnaBridge 171:3a7713b1edbc 191 PTE28 = (4 << GPIO_PORT_SHIFT | 28),
AnnaBridge 171:3a7713b1edbc 192 PTE29 = (4 << GPIO_PORT_SHIFT | 29),
AnnaBridge 171:3a7713b1edbc 193 PTE30 = (4 << GPIO_PORT_SHIFT | 30),
AnnaBridge 171:3a7713b1edbc 194 PTE31 = (4 << GPIO_PORT_SHIFT | 31),
AnnaBridge 171:3a7713b1edbc 195
AnnaBridge 171:3a7713b1edbc 196 // Analog
AnnaBridge 171:3a7713b1edbc 197 A0 = PTB6,
AnnaBridge 171:3a7713b1edbc 198 A1 = PTB7,
AnnaBridge 171:3a7713b1edbc 199 A2 = DAC0_OUT,
AnnaBridge 171:3a7713b1edbc 200 //A3 = DAC1_OUT,
AnnaBridge 171:3a7713b1edbc 201
AnnaBridge 171:3a7713b1edbc 202 // General Pin Input Output (GPIO)
AnnaBridge 171:3a7713b1edbc 203 GPIO0 = PTC1,
AnnaBridge 171:3a7713b1edbc 204 GPIO1 = PTC5,
AnnaBridge 171:3a7713b1edbc 205 GPIO2 = PTD6,
AnnaBridge 171:3a7713b1edbc 206 GPIO3 = PTC9,
AnnaBridge 171:3a7713b1edbc 207 GPIO4 = PTC3,
AnnaBridge 171:3a7713b1edbc 208 GPIO5 = PTC6,
AnnaBridge 171:3a7713b1edbc 209 GPIO6 = NOT_CONNECTED,
AnnaBridge 171:3a7713b1edbc 210
AnnaBridge 171:3a7713b1edbc 211 // Pulse Width Modulation (PWM)
AnnaBridge 171:3a7713b1edbc 212 PWM0 = GPIO2,
AnnaBridge 171:3a7713b1edbc 213 PWM1 = GPIO3,
AnnaBridge 171:3a7713b1edbc 214 PWM2 = GPIO0,
AnnaBridge 171:3a7713b1edbc 215 PWM3 = GPIO1,
AnnaBridge 171:3a7713b1edbc 216
AnnaBridge 171:3a7713b1edbc 217 // LEDs
AnnaBridge 171:3a7713b1edbc 218 LED0 = GPIO0,
AnnaBridge 171:3a7713b1edbc 219 LED1 = GPIO1,
AnnaBridge 171:3a7713b1edbc 220 LED2 = GPIO2,
AnnaBridge 171:3a7713b1edbc 221
AnnaBridge 171:3a7713b1edbc 222 LED_RED = LED0,
AnnaBridge 171:3a7713b1edbc 223 LED_GREEN = LED1,
AnnaBridge 171:3a7713b1edbc 224 LED_BLUE = LED2,
AnnaBridge 171:3a7713b1edbc 225
AnnaBridge 171:3a7713b1edbc 226 // USB bridge and SWD UART connected UART pins
AnnaBridge 171:3a7713b1edbc 227 USBTX = PTC15,
AnnaBridge 171:3a7713b1edbc 228 USBRX = PTC14,
AnnaBridge 171:3a7713b1edbc 229
AnnaBridge 171:3a7713b1edbc 230 // UART pins
AnnaBridge 172:65be27845400 231 UART0_RX = PTC16,
AnnaBridge 172:65be27845400 232 UART0_TX = PTC17,
AnnaBridge 172:65be27845400 233 UART0_CTS = PTC19,
AnnaBridge 172:65be27845400 234 UART0_RTS = PTC18,
AnnaBridge 171:3a7713b1edbc 235
AnnaBridge 171:3a7713b1edbc 236 UART1_RX = USBRX,
AnnaBridge 171:3a7713b1edbc 237 UART1_TX = USBTX,
AnnaBridge 171:3a7713b1edbc 238 UART1_CTS = PTC13,
AnnaBridge 171:3a7713b1edbc 239 UART1_RTS = PTC12,
AnnaBridge 171:3a7713b1edbc 240
AnnaBridge 172:65be27845400 241 UART2_RX = PTD8,
AnnaBridge 172:65be27845400 242 UART2_TX = PTD9,
AnnaBridge 172:65be27845400 243 UART2_CTS = PTD11,
AnnaBridge 172:65be27845400 244 UART2_RTS = PTD10,
AnnaBridge 171:3a7713b1edbc 245
AnnaBridge 171:3a7713b1edbc 246 // I2C pins
AnnaBridge 171:3a7713b1edbc 247 I2C0_SCL = PTC10,
AnnaBridge 171:3a7713b1edbc 248 I2C0_SDA = PTC11,
AnnaBridge 171:3a7713b1edbc 249
AnnaBridge 171:3a7713b1edbc 250 I2C1_SCL = PTB2,
AnnaBridge 171:3a7713b1edbc 251 I2C1_SDA = PTB3,
AnnaBridge 171:3a7713b1edbc 252
AnnaBridge 171:3a7713b1edbc 253 I2C2_SCL = NOT_CONNECTED,
AnnaBridge 171:3a7713b1edbc 254 I2C2_SDA = NOT_CONNECTED,
AnnaBridge 171:3a7713b1edbc 255
AnnaBridge 171:3a7713b1edbc 256 // SPI pins
AnnaBridge 171:3a7713b1edbc 257 SPI0_SCK = PTB11,
AnnaBridge 171:3a7713b1edbc 258 SPI0_MOSI = PTB16,
AnnaBridge 171:3a7713b1edbc 259 SPI0_MISO = PTB17,
AnnaBridge 171:3a7713b1edbc 260 SPI0_SS0 = PTB10,
AnnaBridge 171:3a7713b1edbc 261 SPI0_SS1 = PTB9,
AnnaBridge 171:3a7713b1edbc 262 SPI0_SS2 = PTB8,
AnnaBridge 171:3a7713b1edbc 263
AnnaBridge 171:3a7713b1edbc 264 SPI1_SCK = PTB21,
AnnaBridge 171:3a7713b1edbc 265 SPI1_MOSI = PTB22,
AnnaBridge 171:3a7713b1edbc 266 SPI1_MISO = PTB23,
AnnaBridge 171:3a7713b1edbc 267 SPI1_SS0 = PTB20,
AnnaBridge 171:3a7713b1edbc 268 SPI1_SS1 = PTB19,
AnnaBridge 171:3a7713b1edbc 269 SPI1_SS2 = PTB18,
AnnaBridge 171:3a7713b1edbc 270
AnnaBridge 171:3a7713b1edbc 271 SPI2_SCK = PTD1,
AnnaBridge 171:3a7713b1edbc 272 SPI2_MOSI = PTD2,
AnnaBridge 171:3a7713b1edbc 273 SPI2_MISO = PTD3,
AnnaBridge 171:3a7713b1edbc 274 SPI2_SS0 = PTD0,
AnnaBridge 171:3a7713b1edbc 275 SPI2_SS1 = PTD4,
AnnaBridge 171:3a7713b1edbc 276 SPI2_SS2 = PTD5,
AnnaBridge 171:3a7713b1edbc 277
AnnaBridge 171:3a7713b1edbc 278 SPI3_SCK = NOT_CONNECTED,
AnnaBridge 171:3a7713b1edbc 279 SPI3_MOSI = NOT_CONNECTED,
AnnaBridge 171:3a7713b1edbc 280 SPI3_MISO = NOT_CONNECTED,
AnnaBridge 171:3a7713b1edbc 281 SPI3_SS0 = NOT_CONNECTED,
AnnaBridge 171:3a7713b1edbc 282 SPI3_SS1 = NOT_CONNECTED,
AnnaBridge 171:3a7713b1edbc 283 SPI3_SS2 = NOT_CONNECTED,
AnnaBridge 171:3a7713b1edbc 284
AnnaBridge 171:3a7713b1edbc 285 // SWD UART
AnnaBridge 171:3a7713b1edbc 286 SWD_TGT_TX = UART1_TX,
AnnaBridge 171:3a7713b1edbc 287 SWD_TGT_RX = UART1_RX,
AnnaBridge 171:3a7713b1edbc 288 SWD_TGT_CTS = UART1_CTS,
AnnaBridge 171:3a7713b1edbc 289 SWD_TGT_RTS = UART1_RTS,
AnnaBridge 171:3a7713b1edbc 290
AnnaBridge 171:3a7713b1edbc 291 // Generics
AnnaBridge 171:3a7713b1edbc 292 SERIAL_TX = UART0_TX,
AnnaBridge 171:3a7713b1edbc 293 SERIAL_RX = UART0_RX,
AnnaBridge 171:3a7713b1edbc 294 I2C_SCL = I2C0_SCL,
AnnaBridge 171:3a7713b1edbc 295 I2C_SDA = I2C0_SDA,
AnnaBridge 171:3a7713b1edbc 296 SPI_MOSI = SPI0_MOSI,
AnnaBridge 171:3a7713b1edbc 297 SPI_MISO = SPI0_MISO,
AnnaBridge 171:3a7713b1edbc 298 SPI_SCK = SPI0_SCK,
AnnaBridge 171:3a7713b1edbc 299 SPI_CS = SPI0_SS0,
AnnaBridge 171:3a7713b1edbc 300 PWM_OUT = PWM0,
AnnaBridge 171:3a7713b1edbc 301
AnnaBridge 171:3a7713b1edbc 302 // Not connected
AnnaBridge 171:3a7713b1edbc 303 NC = NOT_CONNECTED
AnnaBridge 171:3a7713b1edbc 304 } PinName;
AnnaBridge 171:3a7713b1edbc 305
AnnaBridge 171:3a7713b1edbc 306
AnnaBridge 171:3a7713b1edbc 307 typedef enum {
AnnaBridge 171:3a7713b1edbc 308 PullNone = 0,
AnnaBridge 171:3a7713b1edbc 309 PullDown = 1,
AnnaBridge 171:3a7713b1edbc 310 PullUp = 2,
AnnaBridge 171:3a7713b1edbc 311 PullDefault = PullUp
AnnaBridge 171:3a7713b1edbc 312 } PinMode;
AnnaBridge 171:3a7713b1edbc 313
AnnaBridge 171:3a7713b1edbc 314 #ifdef __cplusplus
AnnaBridge 171:3a7713b1edbc 315 }
AnnaBridge 171:3a7713b1edbc 316 #endif
AnnaBridge 171:3a7713b1edbc 317
AnnaBridge 171:3a7713b1edbc 318 #endif