]> git.gir.st - tmk_keyboard.git/blob - tool/mbed/mbed-sdk/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC43XX/PeripheralNames.h
Squashed 'tmk_core/' changes from 7967731..b9e0ea0
[tmk_keyboard.git] / tool / mbed / mbed-sdk / libraries / mbed / targets / hal / TARGET_NXP / TARGET_LPC43XX / PeripheralNames.h
1 /* mbed Microcontroller Library
2 * Copyright (c) 2006-2013 ARM Limited
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16 #ifndef MBED_PERIPHERALNAMES_H
17 #define MBED_PERIPHERALNAMES_H
18
19 #include "cmsis.h"
20
21 #ifdef __cplusplus
22 extern "C" {
23 #endif
24
25 typedef enum {
26 UART_0 = (int)LPC_USART0_BASE,
27 UART_1 = (int)LPC_UART1_BASE,
28 UART_2 = (int)LPC_USART2_BASE,
29 UART_3 = (int)LPC_USART3_BASE
30 } UARTName;
31
32 typedef enum {
33 ADC0_0 = 0,
34 ADC0_1,
35 ADC0_2,
36 ADC0_3,
37 ADC0_4,
38 ADC0_5,
39 ADC0_6,
40 ADC0_7,
41 ADC1_0,
42 ADC1_1,
43 ADC1_2,
44 ADC1_3,
45 ADC1_4,
46 ADC1_5,
47 ADC1_6,
48 ADC1_7
49 } ADCName;
50
51 typedef enum {
52 DAC_0 = 0
53 } DACName;
54
55 typedef enum {
56 SPI_0 = (int)LPC_SSP0_BASE,
57 SPI_1 = (int)LPC_SSP1_BASE
58 } SPIName;
59
60 typedef enum {
61 I2C_0 = (int)LPC_I2C0_BASE,
62 I2C_1 = (int)LPC_I2C1_BASE
63 } I2CName;
64
65 typedef enum {
66 PWM_0,
67 PWM_1,
68 PWM_2,
69 PWM_3,
70 PWM_4,
71 PWM_5,
72 PWM_6,
73 PWM_7,
74 PWM_8,
75 PWM_9,
76 PWM_10,
77 PWM_11,
78 PWM_12,
79 PWM_13,
80 PWM_14,
81 PWM_15
82 } PWMName;
83
84 typedef enum {
85 CAN_0 = (int)LPC_C_CAN0_BASE,
86 CAN_1 = (int)LPC_C_CAN1_BASE
87 } CANName;
88
89 #define STDIO_UART_TX USBTX
90 #define STDIO_UART_RX USBRX
91 #define STDIO_UART UART_2
92
93 // Default peripherals
94 #define MBED_SPI0 SPI0_MOSI, SPI0_MISO, SPI0_SCK, SPI0_SSEL
95 #define MBED_SPI1 SPI1_MOSI, SPI1_MISO, SPI1_SCK, SPI1_SSEL
96
97 #define MBED_UART0 UART0_TX, UART0_RX
98 #define MBED_UART1 UART1_TX, UART1_RX
99 #define MBED_UART2 UART2_TX, UART2_RX
100 #define MBED_UART3 UART3_TX, UART3_RX
101 #define MBED_UARTUSB USBTX, USBRX
102
103 #define COM1 MBED_UART0
104 #define COM2 MBED_UART1
105 #define COM3 MBED_UART2
106 #define COM4 MBED_UART3
107
108 #define MBED_I2C0 I2C0_SDA, I2C0_SCL
109 #define MBED_I2C1 I2C1_SDA, I2C1_SCL
110
111 #define MBED_CAN0 p30, p29
112
113 #define MBED_ANALOGOUT0 DAC0
114
115 #define MBED_ANALOGIN0 ADC0
116 #define MBED_ANALOGIN1 ADC1
117 #define MBED_ANALOGIN2 ADC2
118 #define MBED_ANALOGIN3 ADC3
119 #define MBED_ANALOGIN4 ADC4
120 #define MBED_ANALOGIN5 ADC5
121 #define MBED_ANALOGIN6 ADC6
122 #define MBED_ANALOGIN7 ADC7
123
124 #define MBED_PWMOUT0 p26
125 #define MBED_PWMOUT1 p25
126 #define MBED_PWMOUT2 p24
127 #define MBED_PWMOUT3 p23
128 #define MBED_PWMOUT4 p22
129 #define MBED_PWMOUT5 p21
130
131 #ifdef __cplusplus
132 }
133 #endif
134
135 #endif
Imprint / Impressum