mbed library sources

Dependents:   frdm_kl05z_gpio_test

Fork of mbed-src by mbed official

Committer:
shaoziyang
Date:
Sat Sep 13 14:25:46 2014 +0000
Revision:
323:9e901b0a5aa1
Parent:
113:65a335a675de
test with CLOCK_SETUP = 0

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mbed_official 59:ef93cc6bbf65 1 /* mbed Microcontroller Library
mbed_official 59:ef93cc6bbf65 2 * Copyright (c) 2006-2013 ARM Limited
mbed_official 59:ef93cc6bbf65 3 *
mbed_official 59:ef93cc6bbf65 4 * Licensed under the Apache License, Version 2.0 (the "License");
mbed_official 59:ef93cc6bbf65 5 * you may not use this file except in compliance with the License.
mbed_official 59:ef93cc6bbf65 6 * You may obtain a copy of the License at
mbed_official 59:ef93cc6bbf65 7 *
mbed_official 59:ef93cc6bbf65 8 * http://www.apache.org/licenses/LICENSE-2.0
mbed_official 59:ef93cc6bbf65 9 *
mbed_official 59:ef93cc6bbf65 10 * Unless required by applicable law or agreed to in writing, software
mbed_official 59:ef93cc6bbf65 11 * distributed under the License is distributed on an "AS IS" BASIS,
mbed_official 59:ef93cc6bbf65 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
mbed_official 59:ef93cc6bbf65 13 * See the License for the specific language governing permissions and
mbed_official 59:ef93cc6bbf65 14 * limitations under the License.
mbed_official 59:ef93cc6bbf65 15 */
mbed_official 59:ef93cc6bbf65 16 #ifndef MBED_PINNAMES_H
mbed_official 59:ef93cc6bbf65 17 #define MBED_PINNAMES_H
mbed_official 59:ef93cc6bbf65 18
mbed_official 59:ef93cc6bbf65 19 #include "cmsis.h"
mbed_official 59:ef93cc6bbf65 20
mbed_official 59:ef93cc6bbf65 21 #ifdef __cplusplus
mbed_official 59:ef93cc6bbf65 22 extern "C" {
mbed_official 59:ef93cc6bbf65 23 #endif
mbed_official 59:ef93cc6bbf65 24
mbed_official 59:ef93cc6bbf65 25 typedef enum {
mbed_official 59:ef93cc6bbf65 26 PIN_INPUT,
mbed_official 59:ef93cc6bbf65 27 PIN_OUTPUT
mbed_official 59:ef93cc6bbf65 28 } PinDirection;
mbed_official 59:ef93cc6bbf65 29
mbed_official 59:ef93cc6bbf65 30 #define PORT_SHIFT 5
mbed_official 59:ef93cc6bbf65 31
mbed_official 59:ef93cc6bbf65 32 typedef enum {
mbed_official 59:ef93cc6bbf65 33 // LPC11U Pin Names
mbed_official 59:ef93cc6bbf65 34 P0_0 = 0,
mbed_official 59:ef93cc6bbf65 35 P0_1 = 1,
mbed_official 59:ef93cc6bbf65 36 P0_2 = 2,
mbed_official 59:ef93cc6bbf65 37 P0_3 = 3,
mbed_official 59:ef93cc6bbf65 38 P0_4 = 4,
mbed_official 59:ef93cc6bbf65 39 P0_5 = 5,
mbed_official 59:ef93cc6bbf65 40 P0_6 = 6,
mbed_official 59:ef93cc6bbf65 41 P0_7 = 7,
mbed_official 59:ef93cc6bbf65 42 P0_8 = 8,
mbed_official 59:ef93cc6bbf65 43 P0_9 = 9,
mbed_official 59:ef93cc6bbf65 44 P0_10 = 10,
mbed_official 59:ef93cc6bbf65 45 P0_11 = 11,
mbed_official 59:ef93cc6bbf65 46 P0_12 = 12,
mbed_official 59:ef93cc6bbf65 47 P0_13 = 13,
mbed_official 59:ef93cc6bbf65 48 P0_14 = 14,
mbed_official 59:ef93cc6bbf65 49 P0_15 = 15,
mbed_official 59:ef93cc6bbf65 50 P0_16 = 16,
mbed_official 59:ef93cc6bbf65 51 P0_17 = 17,
mbed_official 59:ef93cc6bbf65 52 P0_18 = 18,
mbed_official 59:ef93cc6bbf65 53 P0_19 = 19,
mbed_official 59:ef93cc6bbf65 54 P0_20 = 20,
mbed_official 59:ef93cc6bbf65 55 P0_21 = 21,
mbed_official 59:ef93cc6bbf65 56 P0_22 = 22,
mbed_official 59:ef93cc6bbf65 57 P0_23 = 23,
mbed_official 59:ef93cc6bbf65 58 P0_24 = 24,
mbed_official 59:ef93cc6bbf65 59 P0_25 = 25,
mbed_official 59:ef93cc6bbf65 60 P0_26 = 26,
mbed_official 59:ef93cc6bbf65 61 P0_27 = 27,
mbed_official 59:ef93cc6bbf65 62
mbed_official 59:ef93cc6bbf65 63 P1_0 = 32,
mbed_official 59:ef93cc6bbf65 64 P1_1 = 33,
mbed_official 59:ef93cc6bbf65 65 P1_2 = 34,
mbed_official 59:ef93cc6bbf65 66 P1_3 = 35,
mbed_official 59:ef93cc6bbf65 67 P1_4 = 36,
mbed_official 59:ef93cc6bbf65 68 P1_5 = 37,
mbed_official 59:ef93cc6bbf65 69 P1_6 = 38,
mbed_official 59:ef93cc6bbf65 70 P1_7 = 39,
mbed_official 59:ef93cc6bbf65 71 P1_8 = 40,
mbed_official 59:ef93cc6bbf65 72 P1_9 = 41,
mbed_official 59:ef93cc6bbf65 73 P1_10 = 42,
mbed_official 59:ef93cc6bbf65 74 P1_11 = 43,
mbed_official 59:ef93cc6bbf65 75 P1_12 = 44,
mbed_official 59:ef93cc6bbf65 76 P1_13 = 45,
mbed_official 59:ef93cc6bbf65 77 P1_14 = 46,
mbed_official 59:ef93cc6bbf65 78 P1_15 = 47,
mbed_official 59:ef93cc6bbf65 79 P1_16 = 48,
mbed_official 59:ef93cc6bbf65 80 P1_17 = 49,
mbed_official 59:ef93cc6bbf65 81 P1_18 = 50,
mbed_official 59:ef93cc6bbf65 82 P1_19 = 51,
mbed_official 59:ef93cc6bbf65 83 P1_20 = 52,
mbed_official 59:ef93cc6bbf65 84 P1_21 = 53,
mbed_official 59:ef93cc6bbf65 85 P1_22 = 54,
mbed_official 59:ef93cc6bbf65 86 P1_23 = 55,
mbed_official 59:ef93cc6bbf65 87 P1_24 = 56,
mbed_official 59:ef93cc6bbf65 88 P1_25 = 57,
mbed_official 59:ef93cc6bbf65 89 P1_26 = 58,
mbed_official 59:ef93cc6bbf65 90 P1_27 = 59,
mbed_official 59:ef93cc6bbf65 91 P1_28 = 60,
mbed_official 59:ef93cc6bbf65 92 P1_29 = 61,
mbed_official 59:ef93cc6bbf65 93
mbed_official 59:ef93cc6bbf65 94 P1_31 = 63,
mbed_official 59:ef93cc6bbf65 95
mbed_official 59:ef93cc6bbf65 96 // mbed DIP Pin Names
mbed_official 59:ef93cc6bbf65 97 p3 = P0_7,
mbed_official 59:ef93cc6bbf65 98 p4 = P0_8,
mbed_official 59:ef93cc6bbf65 99 p5 = P0_9,
mbed_official 59:ef93cc6bbf65 100 p6 = P0_10,
mbed_official 59:ef93cc6bbf65 101 p7 = P0_22,
mbed_official 59:ef93cc6bbf65 102 p8 = P0_11,
mbed_official 59:ef93cc6bbf65 103 p9 = P0_12,
mbed_official 59:ef93cc6bbf65 104 p10 = P0_13,
mbed_official 59:ef93cc6bbf65 105 p11 = P0_14,
mbed_official 59:ef93cc6bbf65 106 p12 = P0_15,
mbed_official 59:ef93cc6bbf65 107 p13 = P0_16,
mbed_official 59:ef93cc6bbf65 108 p14 = P0_23,
mbed_official 59:ef93cc6bbf65 109 p15 = P1_15,
mbed_official 59:ef93cc6bbf65 110 p16 = P0_17,
mbed_official 59:ef93cc6bbf65 111 p17 = P0_18,
mbed_official 59:ef93cc6bbf65 112 p18 = P0_19,
mbed_official 59:ef93cc6bbf65 113 p19 = P0_1,
mbed_official 59:ef93cc6bbf65 114 p20 = P1_19,
mbed_official 59:ef93cc6bbf65 115 p21 = P0_0,
mbed_official 59:ef93cc6bbf65 116 p22 = P0_20,
mbed_official 59:ef93cc6bbf65 117 p23 = P0_2,
mbed_official 59:ef93cc6bbf65 118 p24 = P0_3,
mbed_official 59:ef93cc6bbf65 119 p25 = P0_4,
mbed_official 59:ef93cc6bbf65 120 p26 = P0_5,
mbed_official 59:ef93cc6bbf65 121 p27 = P0_21,
mbed_official 59:ef93cc6bbf65 122 p28 = P0_6,
mbed_official 59:ef93cc6bbf65 123
mbed_official 59:ef93cc6bbf65 124 // Other mbed Pin Names
mbed_official 59:ef93cc6bbf65 125 LED1 = P0_7,
mbed_official 59:ef93cc6bbf65 126 LED2 = P0_7,
mbed_official 59:ef93cc6bbf65 127 LED3 = P0_7,
mbed_official 59:ef93cc6bbf65 128 LED4 = P0_7,
mbed_official 59:ef93cc6bbf65 129
mbed_official 59:ef93cc6bbf65 130 UART_TX = P0_19,
mbed_official 59:ef93cc6bbf65 131 UART_RX = P0_18,
mbed_official 59:ef93cc6bbf65 132
mbed_official 59:ef93cc6bbf65 133 // Not connected
mbed_official 59:ef93cc6bbf65 134 NC = (int)0xFFFFFFFF,
mbed_official 59:ef93cc6bbf65 135 } PinName;
mbed_official 59:ef93cc6bbf65 136
mbed_official 59:ef93cc6bbf65 137 typedef enum {
mbed_official 59:ef93cc6bbf65 138 CHANNEL0 = FLEX_INT0_IRQn,
mbed_official 59:ef93cc6bbf65 139 CHANNEL1 = FLEX_INT1_IRQn,
mbed_official 59:ef93cc6bbf65 140 CHANNEL2 = FLEX_INT2_IRQn,
mbed_official 59:ef93cc6bbf65 141 CHANNEL3 = FLEX_INT3_IRQn,
mbed_official 59:ef93cc6bbf65 142 CHANNEL4 = FLEX_INT4_IRQn,
mbed_official 59:ef93cc6bbf65 143 CHANNEL5 = FLEX_INT5_IRQn,
mbed_official 59:ef93cc6bbf65 144 CHANNEL6 = FLEX_INT6_IRQn,
mbed_official 59:ef93cc6bbf65 145 CHANNEL7 = FLEX_INT7_IRQn
mbed_official 59:ef93cc6bbf65 146 } Channel;
mbed_official 59:ef93cc6bbf65 147
mbed_official 59:ef93cc6bbf65 148 typedef enum {
mbed_official 59:ef93cc6bbf65 149 PullUp = 2,
mbed_official 59:ef93cc6bbf65 150 PullDown = 1,
mbed_official 59:ef93cc6bbf65 151 PullNone = 0,
mbed_official 59:ef93cc6bbf65 152 Repeater = 3,
mbed_official 113:65a335a675de 153 OpenDrain = 4,
mbed_official 113:65a335a675de 154 PullDefault = PullDown
mbed_official 59:ef93cc6bbf65 155 } PinMode;
mbed_official 59:ef93cc6bbf65 156
mbed_official 59:ef93cc6bbf65 157 #ifdef __cplusplus
mbed_official 59:ef93cc6bbf65 158 }
mbed_official 59:ef93cc6bbf65 159 #endif
mbed_official 59:ef93cc6bbf65 160
mbed_official 59:ef93cc6bbf65 161 #endif