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-2015 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_PERIPHERALNAMES_H
Zaitsev 10:41552d038a69 17 #define MBED_PERIPHERALNAMES_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 UART_0 = (int)LPC_UART0_BASE,
Zaitsev 10:41552d038a69 27 UART_1 = (int)LPC_UART1_BASE,
Zaitsev 10:41552d038a69 28 UART_2 = (int)LPC_UART2_BASE,
Zaitsev 10:41552d038a69 29 UART_3 = (int)LPC_UART3_BASE
Zaitsev 10:41552d038a69 30 } UARTName;
Zaitsev 10:41552d038a69 31
Zaitsev 10:41552d038a69 32 typedef enum {
Zaitsev 10:41552d038a69 33 ADC0_0 = 0,
Zaitsev 10:41552d038a69 34 ADC0_1,
Zaitsev 10:41552d038a69 35 ADC0_2,
Zaitsev 10:41552d038a69 36 ADC0_3,
Zaitsev 10:41552d038a69 37 ADC0_4,
Zaitsev 10:41552d038a69 38 ADC0_5,
Zaitsev 10:41552d038a69 39 ADC0_6,
Zaitsev 10:41552d038a69 40 ADC0_7
Zaitsev 10:41552d038a69 41 } ADCName;
Zaitsev 10:41552d038a69 42
Zaitsev 10:41552d038a69 43 typedef enum {
Zaitsev 10:41552d038a69 44 DAC_0 = 0
Zaitsev 10:41552d038a69 45 } DACName;
Zaitsev 10:41552d038a69 46
Zaitsev 10:41552d038a69 47 typedef enum {
Zaitsev 10:41552d038a69 48 SPI_0 = (int)LPC_SSP0_BASE,
Zaitsev 10:41552d038a69 49 SPI_1 = (int)LPC_SSP1_BASE
Zaitsev 10:41552d038a69 50 } SPIName;
Zaitsev 10:41552d038a69 51
Zaitsev 10:41552d038a69 52 typedef enum {
Zaitsev 10:41552d038a69 53 I2C_0 = (int)LPC_I2C0_BASE,
Zaitsev 10:41552d038a69 54 I2C_1 = (int)LPC_I2C1_BASE,
Zaitsev 10:41552d038a69 55 I2C_2 = (int)LPC_I2C2_BASE
Zaitsev 10:41552d038a69 56 } I2CName;
Zaitsev 10:41552d038a69 57
Zaitsev 10:41552d038a69 58 typedef enum {
Zaitsev 10:41552d038a69 59 PWM_1 = 1,
Zaitsev 10:41552d038a69 60 PWM_2,
Zaitsev 10:41552d038a69 61 PWM_3,
Zaitsev 10:41552d038a69 62 PWM_4,
Zaitsev 10:41552d038a69 63 PWM_5,
Zaitsev 10:41552d038a69 64 PWM_6
Zaitsev 10:41552d038a69 65 } PWMName;
Zaitsev 10:41552d038a69 66
Zaitsev 10:41552d038a69 67 typedef enum {
Zaitsev 10:41552d038a69 68 CAN_1 = (int)LPC_CAN1_BASE,
Zaitsev 10:41552d038a69 69 CAN_2 = (int)LPC_CAN2_BASE
Zaitsev 10:41552d038a69 70 } CANName;
Zaitsev 10:41552d038a69 71
Zaitsev 10:41552d038a69 72 #define STDIO_UART_TX USBTX
Zaitsev 10:41552d038a69 73 #define STDIO_UART_RX USBRX
Zaitsev 10:41552d038a69 74 #define STDIO_UART UART_2
Zaitsev 10:41552d038a69 75
Zaitsev 10:41552d038a69 76 // Default peripherals
Zaitsev 10:41552d038a69 77 #define MBED_SPI0 p5, p6, p7, p8
Zaitsev 10:41552d038a69 78 //#define MBED_SPI1 p11, p12, p13, p14
Zaitsev 10:41552d038a69 79
Zaitsev 10:41552d038a69 80 #define MBED_UART0 p9, p10
Zaitsev 10:41552d038a69 81 #define MBED_UART1 p13, p14
Zaitsev 10:41552d038a69 82 #define MBED_UART2 p15, p16
Zaitsev 10:41552d038a69 83 #define MBED_UARTUSB USBTX, USBRX
Zaitsev 10:41552d038a69 84
Zaitsev 10:41552d038a69 85 #define MBED_I2C0 p17, p18
Zaitsev 10:41552d038a69 86 //#define MBED_I2C1 p9, p10
Zaitsev 10:41552d038a69 87
Zaitsev 10:41552d038a69 88 #define MBED_CAN0 p19, p20
Zaitsev 10:41552d038a69 89
Zaitsev 10:41552d038a69 90 #define MBED_ANALOGOUT0 p21
Zaitsev 10:41552d038a69 91
Zaitsev 10:41552d038a69 92 #define MBED_ANALOGIN0 p22
Zaitsev 10:41552d038a69 93 #define MBED_ANALOGIN1 p23
Zaitsev 10:41552d038a69 94 //#define MBED_ANALOGIN2 p17
Zaitsev 10:41552d038a69 95 //#define MBED_ANALOGIN3 p18
Zaitsev 10:41552d038a69 96 //#define MBED_ANALOGIN4 p19
Zaitsev 10:41552d038a69 97 //#define MBED_ANALOGIN5 p20
Zaitsev 10:41552d038a69 98
Zaitsev 10:41552d038a69 99 #define MBED_PWMOUT0 p24
Zaitsev 10:41552d038a69 100 #define MBED_PWMOUT1 p25
Zaitsev 10:41552d038a69 101 #define MBED_PWMOUT2 p26
Zaitsev 10:41552d038a69 102 #define MBED_PWMOUT3 p27
Zaitsev 10:41552d038a69 103 //#define MBED_PWMOUT4 p22
Zaitsev 10:41552d038a69 104 //#define MBED_PWMOUT5 p21
Zaitsev 10:41552d038a69 105
Zaitsev 10:41552d038a69 106 #define MBED_USB_D_PLUS p28
Zaitsev 10:41552d038a69 107 #define MBED_USB_D_MINUS p29
Zaitsev 10:41552d038a69 108
Zaitsev 10:41552d038a69 109 #define MBED_MCICLK p30
Zaitsev 10:41552d038a69 110 #define MBED_MCICMD p31
Zaitsev 10:41552d038a69 111 #define MBED_MCIDAT0 p32
Zaitsev 10:41552d038a69 112 #define MBED_MCIDAT1 p33
Zaitsev 10:41552d038a69 113 #define MBED_MCIDAT2 p34
Zaitsev 10:41552d038a69 114 #define MBED_MCIDAT3 p35
Zaitsev 10:41552d038a69 115
Zaitsev 10:41552d038a69 116 #ifdef __cplusplus
Zaitsev 10:41552d038a69 117 }
Zaitsev 10:41552d038a69 118 #endif
Zaitsev 10:41552d038a69 119
Zaitsev 10:41552d038a69 120 #endif