]> git.gir.st - tmk_keyboard.git/blob - tool/mbed/mbed-sdk/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11UXX/TARGET_ARCH_GPRS/PeripheralPins.c
Squashed 'tmk_core/' changes from 7967731..b9e0ea0
[tmk_keyboard.git] / tool / mbed / mbed-sdk / libraries / mbed / targets / hal / TARGET_NXP / TARGET_LPC11UXX / TARGET_ARCH_GPRS / PeripheralPins.c
1
2 /* mbed Microcontroller Library
3 * Copyright (c) 2006-2013 ARM Limited
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 */
17
18 #include "PeripheralPins.h"
19
20 /************ADC***************/
21 const PinMap PinMap_ADC[] = {
22 {P0_11, ADC0_0, 0x02},
23 {P0_12, ADC0_1, 0x02},
24 {P0_13, ADC0_2, 0x02},
25 {P0_14, ADC0_3, 0x02},
26 {P0_15, ADC0_4, 0x02},
27 {P0_16, ADC0_5, 0x01},
28 {P0_22, ADC0_6, 0x01},
29 {P0_23, ADC0_7, 0x01},
30 {NC , NC , 0 }
31 };
32
33 /************I2C***************/
34 const PinMap PinMap_I2C_SDA[] = {
35 {P0_5, I2C_0, 1},
36 {NC , NC , 0}
37 };
38
39 const PinMap PinMap_I2C_SCL[] = {
40 {P0_4, I2C_0, 1},
41 {NC , NC, 0}
42 };
43
44 /************UART***************/
45 const PinMap PinMap_UART_TX[] = {
46 {P0_19, UART_0, 1},
47 {P1_13, UART_0, 3},
48 {P1_27, UART_0, 2},
49 { NC , NC , 0}
50 };
51
52 const PinMap PinMap_UART_RX[] = {
53 {P0_18, UART_0, 1},
54 {P1_14, UART_0, 3},
55 {P1_26, UART_0, 2},
56 {NC , NC , 0}
57 };
58
59 /************SPI***************/
60 const PinMap PinMap_SPI_SCLK[] = {
61 {P0_6 , SPI_0, 0x02},
62 {P0_10, SPI_0, 0x02},
63 {P1_29, SPI_0, 0x01},
64 {P1_15, SPI_1, 0x03},
65 {P1_20, SPI_1, 0x02},
66 {NC , NC , 0}
67 };
68
69 const PinMap PinMap_SPI_MOSI[] = {
70 {P0_9 , SPI_0, 0x01},
71 {P0_21, SPI_1, 0x02},
72 {P1_22, SPI_1, 0x02},
73 {NC , NC , 0}
74 };
75
76 const PinMap PinMap_SPI_MISO[] = {
77 {P0_8 , SPI_0, 0x01},
78 {P0_22, SPI_1, 0x03},
79 {P1_21, SPI_1, 0x02},
80 {NC , NC , 0}
81 };
82
83 const PinMap PinMap_SPI_SSEL[] = {
84 {P0_2 , SPI_0, 0x01},
85 {P1_19, SPI_1, 0x02},
86 {P1_23, SPI_1, 0x02},
87 {NC , NC , 0}
88 };
89
90 /************PWM***************/
91 /* To have a PWM where we can change both the period and the duty cycle,
92 * we need an entire timer. With the following conventions:
93 * * MR3 is used for the PWM period
94 * * MR0, MR1, MR2 are used for the duty cycle
95 */
96 const PinMap PinMap_PWM[] = {
97 /* CT16B0 */
98 {P0_8 , PWM_1, 2}, {P1_13, PWM_1, 2}, /* MR0 */
99 {P0_9 , PWM_2, 2}, {P1_14, PWM_2, 2}, /* MR1 */
100 {P0_10, PWM_3, 3}, {P1_15, PWM_3, 2}, /* MR2 */
101
102 /* CT16B1 */
103 {P0_21, PWM_4, 1}, /* MR0 */
104 {P0_22, PWM_5, 2}, {P1_23, PWM_5, 1}, /* MR1 */
105
106 /* CT32B0 */
107 {P0_18, PWM_6, 2}, {P1_24, PWM_6, 1}, /* MR0 */
108 {P0_19, PWM_7, 2}, {P1_25, PWM_7, 1}, /* MR1 */
109 {P0_1 , PWM_8, 2}, {P1_26, PWM_8, 1}, /* MR2 */
110
111 /* CT32B1 */
112 {P0_13, PWM_9 , 3}, {P1_0, PWM_9 , 1}, /* MR0 */
113 {P0_14, PWM_10, 3}, {P1_1, PWM_10, 1}, /* MR1 */
114 {P0_15, PWM_11, 3}, {P1_2, PWM_11, 1}, /* MR2 */
115
116 {NC, NC, 0}
117 };
Imprint / Impressum