]> git.donarmstrong.com Git - qmk_firmware.git/blob - tmk_core/tool/mbed/mbed-sdk/libraries/mbed/targets/hal/TARGET_Freescale/TARGET_K20XX/TARGET_TEENSY3_1/PeripheralPins.c
Merge commit '1fe4406f374291ab2e86e95a97341fd9c475fcb8'
[qmk_firmware.git] / tmk_core / tool / mbed / mbed-sdk / libraries / mbed / targets / hal / TARGET_Freescale / TARGET_K20XX / TARGET_TEENSY3_1 / PeripheralPins.c
1
2 /* mbed Microcontroller Library
3  * Copyright (c) 2006-2015 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     {PTC2, ADC0_SE4b, 0},
23     {PTD1, ADC0_SE5b, 0},
24     {PTD5, ADC0_SE6b, 0},
25     {PTD6, ADC0_SE7b, 0},
26     {PTB0, ADC0_SE8,  0},
27     {PTB1, ADC0_SE9,  0},
28     {PTB2, ADC0_SE12, 0},
29     {PTB3, ADC0_SE13, 0},
30     {PTC0, ADC0_SE14, 0},
31     {PTC1, ADC0_SE15, 0},
32     {PTC8, ADC1_SE4b, 0},
33     {PTC9, ADC1_SE5b, 0},
34     {PTC10,ADC1_SE6b, 0},
35     {PTC11,ADC1_SE7b, 0},    
36     {NC,   NC,        0}
37 };
38
39 /************DAC***************/
40 const PinMap PinMap_DAC[] = {
41     {DAC0_OUT, DAC_0, 0},
42     {NC      , NC   , 0}
43 };
44
45 /************I2C***************/
46 const PinMap PinMap_I2C_SDA[] = {
47     {PTB1,  I2C_0, 2},
48     {PTB3,  I2C_0, 2},
49     {PTE0,  I2C_1, 2},
50     {PTC11, I2C_1, 2},    
51     {NC  ,  NC   , 0}
52 };
53
54 const PinMap PinMap_I2C_SCL[] = {
55     {PTB0,  I2C_0, 2},
56     {PTB2,  I2C_0, 2},
57     {PTE1,  I2C_1, 2},
58     {PTC10, I2C_1, 2},
59     {NC  ,  NC,    0}
60 };
61
62 /************UART***************/
63 const PinMap PinMap_UART_TX[] = {
64     {PTB17, UART_0, 3},
65     {PTC4 , UART_1, 3},
66     {PTD3 , UART_2, 3},
67     {PTD7 , UART_0, 3},
68     {PTE0 , UART_1, 3},
69     {NC   , NC    , 0}
70 };
71
72 const PinMap PinMap_UART_RX[] = {
73     {PTB16, UART_0, 3},
74     {PTC3 , UART_1, 3},
75     {PTD2 , UART_2, 3},
76     {PTD6 , UART_0, 3},
77     {PTE1 , UART_1, 3},
78     {NC   , NC    , 0}
79 };
80
81 /************SPI***************/
82 const PinMap PinMap_SPI_SCLK[] = { // SCK
83     {PTC5, SPI_0, 2},
84     {PTD1, SPI_0, 2},
85     {NC  , NC   , 0}
86 };
87
88 const PinMap PinMap_SPI_MOSI[] = { // DOUT
89     {PTD2, SPI_0, 2},
90     {PTC6, SPI_0, 2},
91     {NC  , NC   , 0}
92 };
93
94 const PinMap PinMap_SPI_MISO[] = { // DIN
95     {PTD3, SPI_0, 2},
96     {PTC7, SPI_0, 2},
97     {NC  , NC   , 0}
98 };
99
100 const PinMap PinMap_SPI_SSEL[] = { // CS
101     {PTD0, SPI_0, 2},
102     {PTC4, SPI_0, 2},
103     {PTD4, SPI_0, 2},
104     {PTC3, SPI_0, 2},
105     {PTC2, SPI_0, 2},
106     {PTD5, SPI_0, 2},
107     {PTD6, SPI_0, 2},
108     {PTC1, SPI_0, 2},
109     {PTC0, SPI_0, 2}
110 };
111
112 /************PWM***************/
113 const PinMap PinMap_PWM[] = {
114     // LEDs
115     {LED_RED  , PWM_3 , 4}, // PTC3, FTM0 CH2
116     {LED_GREEN, PWM_5,  4}, // PTD4, FTM0 CH4
117     {LED_BLUE , PWM_8 , 3}, // PTA2, FTM0 CH7
118
119     {PTA0,  PWM_6 , 3}, // PTA0, FTM0 CH5
120     {PTA1,  PWM_7 , 3}, // PTA1, FTM0 CH6
121     {PTA3,  PWM_1 , 3}, // PTA3, FTM0 CH0
122     {PTA4,  PWM_2 , 3}, // PTA4, FTM0 CH1
123     {PTA5,  PWM_3 , 3}, // PTA5, FTM0 CH2
124     {PTA12, PWM_9 , 3}, // PTA12, FTM1 CH0
125     {PTA13, PWM_10, 3}, // PTA13, FTM1 CH1
126     {PTB0,  PWM_9 , 3}, // PTB0, FTM1 CH0
127     {PTB1,  PWM_10, 3}, // PTB1, FTM1 CH1
128     {PTC1,  PWM_1 , 4}, // PTC1, FTM0 CH0
129     {PTC2,  PWM_2 , 4}, // PTC2, FTM0 CH1
130     {PTC3,  PWM_3 , 4}, // PTC3, FTM0 CH2
131     {PTD4,  PWM_4 , 4}, // PTD4, FTM0 CH3
132     {PTD5,  PWM_6 , 4}, // PTD5, FTM0 CH6
133     {PTD6,  PWM_7 , 4}, // PTD6, FTM0 CH6
134     {PTD7,  PWM_8 , 4}, // PTD7, FTM0 CH7
135
136     {NC , NC    , 0}
137 };