mbed library sources

Fork of mbed-src by mbed official

Committer:
mbed_official
Date:
Wed Apr 02 14:45:07 2014 +0100
Revision:
144:936282ac755e
Parent:
113:65a335a675de
Child:
207:05668db47a72
Synchronized with git revision cee49e98373ba8ffe4a02b388aaca8881eaab5c7

Full URL: https://github.com/mbedmicro/mbed/commit/cee49e98373ba8ffe4a02b388aaca8881eaab5c7/

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mbed_official 103:9b881da47c92 1 /* mbed Microcontroller Library
mbed_official 103:9b881da47c92 2 * Copyright (c) 2006-2014 ARM Limited
mbed_official 103:9b881da47c92 3 *
mbed_official 103:9b881da47c92 4 * Licensed under the Apache License, Version 2.0 (the "License");
mbed_official 103:9b881da47c92 5 * you may not use this file except in compliance with the License.
mbed_official 103:9b881da47c92 6 * You may obtain a copy of the License at
mbed_official 103:9b881da47c92 7 *
mbed_official 103:9b881da47c92 8 * http://www.apache.org/licenses/LICENSE-2.0
mbed_official 103:9b881da47c92 9 *
mbed_official 103:9b881da47c92 10 * Unless required by applicable law or agreed to in writing, software
mbed_official 103:9b881da47c92 11 * distributed under the License is distributed on an "AS IS" BASIS,
mbed_official 103:9b881da47c92 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
mbed_official 103:9b881da47c92 13 * See the License for the specific language governing permissions and
mbed_official 103:9b881da47c92 14 * limitations under the License.
mbed_official 103:9b881da47c92 15 */
mbed_official 103:9b881da47c92 16 #ifndef MBED_PINNAMES_H
mbed_official 103:9b881da47c92 17 #define MBED_PINNAMES_H
mbed_official 103:9b881da47c92 18
mbed_official 103:9b881da47c92 19 #include "cmsis.h"
mbed_official 103:9b881da47c92 20
mbed_official 103:9b881da47c92 21 #ifdef __cplusplus
mbed_official 103:9b881da47c92 22 extern "C" {
mbed_official 103:9b881da47c92 23 #endif
mbed_official 103:9b881da47c92 24
mbed_official 103:9b881da47c92 25 typedef enum {
mbed_official 103:9b881da47c92 26 PIN_INPUT,
mbed_official 103:9b881da47c92 27 PIN_OUTPUT
mbed_official 103:9b881da47c92 28 } PinDirection;
mbed_official 103:9b881da47c92 29
mbed_official 103:9b881da47c92 30 typedef enum {
mbed_official 103:9b881da47c92 31 // LPC Pin Names
mbed_official 103:9b881da47c92 32 P0_0 = 0,
mbed_official 103:9b881da47c92 33 P0_1, P0_2, P0_3, P0_4, P0_5, P0_6, P0_7, P0_8, P0_9, P0_10, P0_11, P0_12, P0_13, P0_14, P0_15, P0_16, P0_17, P0_18, P0_19, P0_20, P0_21, P0_22, P0_23, P0_24, P0_25, P0_26, P0_27, P0_28, P0_29, P0_30, P0_31,
mbed_official 103:9b881da47c92 34 P1_0, P1_1, P1_2, P1_3, P1_4, P1_5, P1_6, P1_7, P1_8, P1_9, P1_10, P1_11, P1_12, P1_13, P1_14, P1_15, P1_16, P1_17, P1_18, P1_19, P1_20, P1_21, P1_22, P1_23, P1_24, P1_25, P1_26, P1_27, P1_28, P1_29, P1_30, P1_31,
mbed_official 103:9b881da47c92 35 P2_0, P2_1, P2_2, P2_3, P2_4, P2_5, P2_6, P2_7, P2_8, P2_9, P2_10, P2_11, P2_12,
mbed_official 103:9b881da47c92 36
mbed_official 103:9b881da47c92 37 LED_RED = P0_25,
mbed_official 103:9b881da47c92 38 LED_GREEN = P0_3,
mbed_official 103:9b881da47c92 39 LED_BLUE = P1_1,
mbed_official 103:9b881da47c92 40
mbed_official 103:9b881da47c92 41 // mbed original LED naming
mbed_official 103:9b881da47c92 42 LED1 = LED_BLUE,
mbed_official 103:9b881da47c92 43 LED2 = LED_GREEN,
mbed_official 103:9b881da47c92 44 LED3 = LED_RED,
mbed_official 103:9b881da47c92 45 LED4 = LED_RED,
mbed_official 103:9b881da47c92 46
mbed_official 103:9b881da47c92 47 // Serial to USB pins
mbed_official 103:9b881da47c92 48 USBTX = P0_18,
mbed_official 103:9b881da47c92 49 USBRX = P0_13,
mbed_official 103:9b881da47c92 50
mbed_official 103:9b881da47c92 51 // Arduino Shield Receptacles Names
mbed_official 103:9b881da47c92 52 D0 = P0_13,
mbed_official 103:9b881da47c92 53 D1 = P0_18,
mbed_official 103:9b881da47c92 54 D2 = P0_29,
mbed_official 103:9b881da47c92 55 D3 = P0_9,
mbed_official 103:9b881da47c92 56 D4 = P0_10,
mbed_official 103:9b881da47c92 57 D5 = P0_16, // same port as D13
mbed_official 103:9b881da47c92 58 D6 = P1_3,
mbed_official 103:9b881da47c92 59 D7 = P0_0,
mbed_official 103:9b881da47c92 60 D8 = P0_24,
mbed_official 103:9b881da47c92 61 D9 = P1_0,
mbed_official 103:9b881da47c92 62 D10= P0_27,
mbed_official 103:9b881da47c92 63 D11= P0_28,
mbed_official 103:9b881da47c92 64 D12= P0_12,
mbed_official 103:9b881da47c92 65 D13= P0_16, // same port as D5
mbed_official 144:936282ac755e 66 D14= P0_23,
mbed_official 144:936282ac755e 67 D15= P0_22,
mbed_official 144:936282ac755e 68
mbed_official 103:9b881da47c92 69 A0 = P0_8,
mbed_official 103:9b881da47c92 70 A1 = P0_7,
mbed_official 103:9b881da47c92 71 A2 = P0_6,
mbed_official 103:9b881da47c92 72 A3 = P0_5,
mbed_official 103:9b881da47c92 73 A4 = P0_23, // same port as SDA
mbed_official 103:9b881da47c92 74 A5 = P0_22, // same port as SCL
mbed_official 103:9b881da47c92 75 SDA= P0_23, // same port as A4
mbed_official 103:9b881da47c92 76 SCL= P0_22, // same port as A5
mbed_official 103:9b881da47c92 77
mbed_official 103:9b881da47c92 78 // Not connected
mbed_official 103:9b881da47c92 79 NC = (int)0xFFFFFFFF,
mbed_official 103:9b881da47c92 80 } PinName;
mbed_official 103:9b881da47c92 81
mbed_official 103:9b881da47c92 82 typedef enum {
mbed_official 103:9b881da47c92 83 PullUp = 2,
mbed_official 103:9b881da47c92 84 PullDown = 1,
mbed_official 103:9b881da47c92 85 PullNone = 0,
mbed_official 103:9b881da47c92 86 Repeater = 3,
mbed_official 113:65a335a675de 87 OpenDrain = 4,
mbed_official 113:65a335a675de 88 PullDefault = PullDown
mbed_official 103:9b881da47c92 89 } PinMode;
mbed_official 103:9b881da47c92 90
mbed_official 103:9b881da47c92 91 #define STDIO_UART_TX USBTX
mbed_official 103:9b881da47c92 92 #define STDIO_UART_RX USBRX
mbed_official 103:9b881da47c92 93
mbed_official 103:9b881da47c92 94 typedef struct {
mbed_official 103:9b881da47c92 95 unsigned char n;
mbed_official 103:9b881da47c92 96 unsigned char offset;
mbed_official 103:9b881da47c92 97 } SWM_Map;
mbed_official 103:9b881da47c92 98
mbed_official 103:9b881da47c92 99 #ifdef __cplusplus
mbed_official 103:9b881da47c92 100 }
mbed_official 103:9b881da47c92 101 #endif
mbed_official 103:9b881da47c92 102
mbed_official 103:9b881da47c92 103 #endif