re-enabling serial
[clinton/Smoothieware.git] / gcc4mbed / external / mbed / .svn / text-base / PeripheralNames.h.svn-base
1 /* mbed Microcontroller Library - PeripheralNames
2 * Copyright (C) 2008-2009 ARM Limited. All rights reserved.
3 *
4 * Provides the mappings for peripherals
5 * Implementation specific to the LPC1768/LPC2368
6 * sford
7 */
8
9 #ifndef MBED_PERIPHERALNAMES_H
10 #define MBED_PERIPHERALNAMES_H
11
12 #include "cmsis.h"
13
14 #ifdef __cplusplus
15 extern "C" {
16 #endif
17
18 typedef enum UARTName UARTName;
19 enum UARTName {
20 UART_0 = (int)LPC_UART0_BASE
21 , UART_1 = (int)LPC_UART1_BASE
22 , UART_2 = (int)LPC_UART2_BASE
23 , UART_3 = (int)LPC_UART3_BASE
24 };
25
26 typedef enum ADCName ADCName;
27 enum ADCName {
28 ADC0_0 = 0
29 , ADC0_1
30 , ADC0_2
31 , ADC0_3
32 , ADC0_4
33 , ADC0_5
34 , ADC0_6
35 , ADC0_7
36 };
37
38 typedef enum DACName DACName;
39 enum DACName {
40 DAC_0 = 0
41 };
42
43 typedef enum SPIName SPIName;
44 enum SPIName {
45 SPI_0 = (int)LPC_SSP0_BASE
46 , SPI_1 = (int)LPC_SSP1_BASE
47 };
48
49 typedef enum I2CName I2CName;
50 enum I2CName {
51 I2C_0 = (int)LPC_I2C0_BASE
52 , I2C_1 = (int)LPC_I2C1_BASE
53 , I2C_2 = (int)LPC_I2C2_BASE
54 };
55
56 typedef enum PWMName PWMName;
57 enum PWMName {
58 PWM_1 = 1
59 , PWM_2
60 , PWM_3
61 , PWM_4
62 , PWM_5
63 , PWM_6
64 };
65
66 typedef enum TimerName TimerName;
67 enum TimerName {
68 TIMER_0 = (int)LPC_TIM0_BASE
69 , TIMER_1 = (int)LPC_TIM1_BASE
70 , TIMER_2 = (int)LPC_TIM2_BASE
71 , TIMER_3 = (int)LPC_TIM3_BASE
72 };
73
74 typedef enum CANName CANName;
75 enum CANName {
76 CAN_1 = (int)LPC_CAN1_BASE,
77 CAN_2 = (int)LPC_CAN2_BASE
78 };
79
80 #define STDIO_UART_TX USBTX
81 #define STDIO_UART_RX USBRX
82 #define STDIO_UART UART_0
83 #define US_TICKER_TIMER TIMER_3
84 #define US_TICKER_TIMER_IRQn TIMER3_IRQn
85
86 #ifdef __cplusplus
87 }
88 #endif
89
90 #endif