mbed library sources

Dependents:   bare

Fork of mbed-src by mbed official

Committer:
koiamk
Date:
Thu Mar 27 22:43:30 2014 +0000
Revision:
134:06c344ebdfe8
Parent:
50:b08ceb75017d
oo

Who changed what in which revision?

UserRevisionLine numberNew contents of line
bogdanm 15:4892fe388435 1 /* mbed Microcontroller Library
bogdanm 15:4892fe388435 2 * Copyright (c) 2006-2013 ARM Limited
bogdanm 15:4892fe388435 3 *
bogdanm 15:4892fe388435 4 * Licensed under the Apache License, Version 2.0 (the "License");
bogdanm 15:4892fe388435 5 * you may not use this file except in compliance with the License.
bogdanm 15:4892fe388435 6 * You may obtain a copy of the License at
bogdanm 15:4892fe388435 7 *
bogdanm 15:4892fe388435 8 * http://www.apache.org/licenses/LICENSE-2.0
bogdanm 15:4892fe388435 9 *
bogdanm 15:4892fe388435 10 * Unless required by applicable law or agreed to in writing, software
bogdanm 15:4892fe388435 11 * distributed under the License is distributed on an "AS IS" BASIS,
bogdanm 15:4892fe388435 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
bogdanm 15:4892fe388435 13 * See the License for the specific language governing permissions and
bogdanm 15:4892fe388435 14 * limitations under the License.
bogdanm 15:4892fe388435 15 */
bogdanm 15:4892fe388435 16 #ifndef MBED_PERIPHERALNAMES_H
bogdanm 15:4892fe388435 17 #define MBED_PERIPHERALNAMES_H
bogdanm 15:4892fe388435 18
bogdanm 15:4892fe388435 19 #include "cmsis.h"
bogdanm 15:4892fe388435 20
bogdanm 15:4892fe388435 21 #ifdef __cplusplus
bogdanm 15:4892fe388435 22 extern "C" {
bogdanm 15:4892fe388435 23 #endif
bogdanm 15:4892fe388435 24
bogdanm 15:4892fe388435 25 typedef enum {
bogdanm 15:4892fe388435 26 UART_0 = (int)LPC_UART0_BASE,
bogdanm 15:4892fe388435 27 UART_1 = (int)LPC_UART1_BASE,
bogdanm 15:4892fe388435 28 UART_2 = (int)LPC_UART2_BASE,
bogdanm 15:4892fe388435 29 UART_3 = (int)LPC_UART3_BASE,
bogdanm 15:4892fe388435 30 UART_4 = (int)LPC_UART4_BASE
bogdanm 15:4892fe388435 31 } UARTName;
bogdanm 15:4892fe388435 32
bogdanm 15:4892fe388435 33 typedef enum {
bogdanm 15:4892fe388435 34 ADC0_0 = 0,
bogdanm 15:4892fe388435 35 ADC0_1,
bogdanm 15:4892fe388435 36 ADC0_2,
bogdanm 15:4892fe388435 37 ADC0_3,
bogdanm 15:4892fe388435 38 ADC0_4,
bogdanm 15:4892fe388435 39 ADC0_5,
bogdanm 15:4892fe388435 40 ADC0_6,
bogdanm 15:4892fe388435 41 ADC0_7
bogdanm 15:4892fe388435 42 } ADCName;
bogdanm 15:4892fe388435 43
bogdanm 15:4892fe388435 44 typedef enum {
bogdanm 15:4892fe388435 45 DAC_0 = 0
bogdanm 15:4892fe388435 46 } DACName;
bogdanm 15:4892fe388435 47
bogdanm 15:4892fe388435 48 typedef enum {
bogdanm 15:4892fe388435 49 SPI_0 = (int)LPC_SSP0_BASE,
bogdanm 15:4892fe388435 50 SPI_1 = (int)LPC_SSP1_BASE,
bogdanm 15:4892fe388435 51 SPI_2 = (int)LPC_SSP2_BASE
bogdanm 15:4892fe388435 52 } SPIName;
bogdanm 15:4892fe388435 53
bogdanm 15:4892fe388435 54 typedef enum {
bogdanm 15:4892fe388435 55 I2C_0 = (int)LPC_I2C0_BASE,
bogdanm 15:4892fe388435 56 I2C_1 = (int)LPC_I2C1_BASE,
bogdanm 15:4892fe388435 57 I2C_2 = (int)LPC_I2C2_BASE
bogdanm 15:4892fe388435 58 } I2CName;
bogdanm 15:4892fe388435 59
bogdanm 15:4892fe388435 60 typedef enum {
bogdanm 15:4892fe388435 61 PWM0_1 = 1,
bogdanm 15:4892fe388435 62 PWM0_2,
bogdanm 15:4892fe388435 63 PWM0_3,
bogdanm 15:4892fe388435 64 PWM0_4,
bogdanm 15:4892fe388435 65 PWM0_5,
bogdanm 15:4892fe388435 66 PWM0_6,
bogdanm 15:4892fe388435 67 PWM1_1,
bogdanm 15:4892fe388435 68 PWM1_2,
bogdanm 15:4892fe388435 69 PWM1_3,
bogdanm 15:4892fe388435 70 PWM1_4,
bogdanm 15:4892fe388435 71 PWM1_5,
bogdanm 15:4892fe388435 72 PWM1_6
bogdanm 15:4892fe388435 73 } PWMName;
bogdanm 15:4892fe388435 74
bogdanm 15:4892fe388435 75 typedef enum {
bogdanm 15:4892fe388435 76 CAN_1 = (int)LPC_CAN1_BASE,
bogdanm 15:4892fe388435 77 CAN_2 = (int)LPC_CAN2_BASE
bogdanm 15:4892fe388435 78 } CANName;
bogdanm 15:4892fe388435 79
bogdanm 15:4892fe388435 80 #define STDIO_UART_TX USBTX
bogdanm 15:4892fe388435 81 #define STDIO_UART_RX USBRX
bogdanm 15:4892fe388435 82 #define STDIO_UART UART_0
bogdanm 15:4892fe388435 83
mbed_official 50:b08ceb75017d 84 // Default peripherals
mbed_official 50:b08ceb75017d 85 #define MBED_SPI0 p5, p6, p7
mbed_official 50:b08ceb75017d 86 #define MBED_SPI1 p11, p12, p13, p14
mbed_official 50:b08ceb75017d 87 #define MBED_SPI2 p39, p38, p32, p31
mbed_official 50:b08ceb75017d 88
mbed_official 50:b08ceb75017d 89 #define MBED_UART3 p9, p10
mbed_official 50:b08ceb75017d 90 #define MBED_UART4 p37, p31
mbed_official 50:b08ceb75017d 91 #define MBED_UARTUSB USBTX, USBRX
mbed_official 50:b08ceb75017d 92
mbed_official 50:b08ceb75017d 93 #define MBED_I2C0 p32, p31
mbed_official 50:b08ceb75017d 94 #define MBED_I2C1 p9, p10
mbed_official 50:b08ceb75017d 95
mbed_official 50:b08ceb75017d 96 #define MBED_CAN1 p9, p10
mbed_official 50:b08ceb75017d 97 #define MBED_CAN2 p34, p33
mbed_official 50:b08ceb75017d 98
mbed_official 50:b08ceb75017d 99 #define MBED_ANALOGOUT0 p18
mbed_official 50:b08ceb75017d 100
mbed_official 50:b08ceb75017d 101 #define MBED_ANALOGIN0 p15
mbed_official 50:b08ceb75017d 102 #define MBED_ANALOGIN1 p16
mbed_official 50:b08ceb75017d 103 #define MBED_ANALOGIN2 p17
mbed_official 50:b08ceb75017d 104 #define MBED_ANALOGIN3 p18
mbed_official 50:b08ceb75017d 105 #define MBED_ANALOGIN4 p19
mbed_official 50:b08ceb75017d 106 #define MBED_ANALOGIN5 p20
mbed_official 50:b08ceb75017d 107
mbed_official 50:b08ceb75017d 108 #define MBED_PWMOUT0 p30
mbed_official 50:b08ceb75017d 109 #define MBED_PWMOUT1 p29
mbed_official 50:b08ceb75017d 110 #define MBED_PWMOUT2 p28
mbed_official 50:b08ceb75017d 111 #define MBED_PWMOUT3 p27
mbed_official 50:b08ceb75017d 112 #define MBED_PWMOUT4 p26
mbed_official 50:b08ceb75017d 113 #define MBED_PWMOUT5 p25
mbed_official 50:b08ceb75017d 114
bogdanm 15:4892fe388435 115 #ifdef __cplusplus
bogdanm 15:4892fe388435 116 }
bogdanm 15:4892fe388435 117 #endif
bogdanm 15:4892fe388435 118
bogdanm 15:4892fe388435 119 #endif