]> git.donarmstrong.com Git - qmk_firmware.git/blob - tool/mbed/mbed-sdk/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11UXX/TARGET_OC_MBUINO/PeripheralNames.h
Squashed 'tmk_core/' changes from 7967731..b9e0ea0
[qmk_firmware.git] / tool / mbed / mbed-sdk / libraries / mbed / targets / hal / TARGET_NXP / TARGET_LPC11UXX / TARGET_OC_MBUINO / 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_USART_BASE
27 } UARTName;
28
29 typedef enum {
30     I2C_0 = (int)LPC_I2C_BASE
31 } I2CName;
32
33 typedef enum {
34     ADC0_0 = 0,
35     ADC0_1,
36     ADC0_2,
37     ADC0_3,
38     ADC0_4,
39     ADC0_5,
40     ADC0_6,
41     ADC0_7
42 } ADCName;
43
44 typedef enum {
45     SPI_0 = (int)LPC_SSP0_BASE,
46     SPI_1 = (int)LPC_SSP1_BASE
47 } SPIName;
48
49 typedef enum {
50     PWM_1 = 0,
51     PWM_2,
52     PWM_3,
53     PWM_4,
54     PWM_5,
55     PWM_6,
56     PWM_7,
57     PWM_8,
58     PWM_9,
59     PWM_10,
60     PWM_11,
61     PWM_12,
62     PWM_13
63 } PWMName;
64
65 #define STDIO_UART_TX     USBTX
66 #define STDIO_UART_RX     USBRX
67 #define STDIO_UART        UART_0
68
69 // Default peripherals
70 #define MBED_SPI0         P0_9, P0_8, P0_6, P0_2        // MOSI, MISO, CLK, SEL
71 #define MBED_SPI1         P0_21, P0_22, P1_15, P01_19   // MOSI, MISO, CLK, SEL
72
73 #define MBED_UART0        USBTX, USBRX
74 #define MBED_UARTUSB      USBTX, USBRX
75
76 #define MBED_I2C0         P0_5, P0_4
77
78 #define MBED_ANALOGIN0    P0_11
79 #define MBED_ANALOGIN1    P0_12
80 #define MBED_ANALOGIN2    P0_13
81 #define MBED_ANALOGIN3    P0_14
82 #define MBED_ANALOGIN4    P0_15
83 #define MBED_ANALOGIN5    P0_16
84 #define MBED_ANALOGIN6    P0_22
85 #define MBED_ANALOGIN7    P0_23
86
87 #ifdef __cplusplus
88 }
89 #endif
90
91 #endif