2 /* mbed Microcontroller Library
3 * Copyright (c) 2006-2013 ARM Limited
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
9 * http://www.apache.org/licenses/LICENSE-2.0
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.
18 #include "PeripheralPins.h"
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},
33 /************I2C***************/
34 const PinMap PinMap_I2C_SDA[] = {
39 const PinMap PinMap_I2C_SCL[] = {
44 /************UART***************/
45 const PinMap PinMap_UART_TX[] = {
52 const PinMap PinMap_UART_RX[] = {
59 /************SPI***************/
60 const PinMap PinMap_SPI_SCLK[] = {
69 const PinMap PinMap_SPI_MOSI[] = {
76 const PinMap PinMap_SPI_MISO[] = {
83 const PinMap PinMap_SPI_SSEL[] = {
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
96 const PinMap PinMap_PWM[] = {
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 */
103 {P0_21, PWM_4, 1}, /* MR0 */
104 {P0_22, PWM_5, 2}, {P1_23, PWM_5, 1}, /* MR1 */
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 */
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 */