USB Serial application

Fork of USBSerial_HelloWorld by Samuel Mokrani

Committer:
Zaitsev
Date:
Sat Dec 16 10:26:48 2017 +0000
Revision:
11:b3f2a8bdac4d
Parent:
10:41552d038a69
A copy for D.S;

Who changed what in which revision?

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