]> git.donarmstrong.com Git - qmk_firmware.git/blob - tmk_core/tool/mbed/mbed-sdk/libraries/mbed/targets/hal/TARGET_Freescale/TARGET_KPSDK_MCUS/TARGET_K22F/PeripheralPins.c
Merge commit '1fe4406f374291ab2e86e95a97341fd9c475fcb8'
[qmk_firmware.git] / tmk_core / tool / mbed / mbed-sdk / libraries / mbed / targets / hal / TARGET_Freescale / TARGET_KPSDK_MCUS / TARGET_K22F / PeripheralPins.c
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  
17 #include "PeripheralPins.h"
18
19 /************RTC***************/
20 const PinMap PinMap_RTC[] = {
21     {NC, OSC32KCLK, 0},
22 };
23
24 /************ADC***************/
25 const PinMap PinMap_ADC[] = {
26     {PTC2,  ADC0_SE4b, 0},
27     {PTC8,  ADC1_SE4b, 0},
28     {PTC9,  ADC1_SE5b, 0},
29     {PTD1,  ADC0_SE5b, 0},
30     {PTC10, ADC1_SE6b, 0},
31     {PTD5,  ADC0_SE6b, 0},
32     {PTC11, ADC1_SE7b, 0},
33     {PTD6,  ADC0_SE7b, 0},
34     {PTB0 , ADC0_SE8 , 0},
35     {PTB1 , ADC0_SE9 , 0},
36     {PTB2 , ADC0_SE12, 0},
37     {PTB3 , ADC0_SE13, 0},
38     {PTC0 , ADC0_SE14, 0},
39     {PTB10, ADC1_SE14, 0},
40     {PTB11, ADC1_SE15, 0},
41     {PTC1 , ADC0_SE15, 0},
42     {PTA17, ADC1_SE17, 0},
43     //{PTE24, ADC0_SE17, 0}, //I2C pull up
44     //{PTE25, ADC0_SE18, 0}, //I2C pull up
45     {NC   , NC       , 0}
46 };
47
48 /************DAC***************/
49 const PinMap PinMap_DAC[] = {
50     {DAC0_OUT, DAC_0, 0},
51     {NC      , NC   , 0}
52 };
53
54 /************I2C***************/
55 const PinMap PinMap_I2C_SDA[] = {
56     {PTB1 , I2C_0 , 2},
57     {PTB3 , I2C_0 , 2},
58     {PTC11, I2C_1 , 2},
59     {PTD3 , I2C_0 , 7},
60     {PTD9 , I2C_0 , 2},
61     {PTE0 , I2C_1 , 6},
62     {PTE25, I2C_0 , 5},
63     {NC   , NC   , 0}
64 };
65
66 const PinMap PinMap_I2C_SCL[] = {
67     {PTB0 , I2C_0 , 2},
68     {PTB2 , I2C_0 , 2},
69     {PTC10, I2C_1 , 2},
70     {PTD2 , I2C_0 , 7},
71     {PTD8 , I2C_0 , 2},
72     {PTE1 , I2C_1 , 6},
73     {PTE24, I2C_0 , 5},
74     {NC   , NC   , 0}
75 };
76
77 /************UART***************/
78 const PinMap PinMap_UART_TX[] = {
79     {PTA2 , UART_0, 2},
80     {PTA14, UART_0, 3},
81     {PTB17, UART_0, 3},
82     {PTD7 , UART_0, 3},
83     {PTC4 , UART_1, 3},
84     {PTE0 , UART_1, 3},
85     {PTD3 , UART_2, 3},
86     {NC   ,  NC   , 0}
87 };
88
89 const PinMap PinMap_UART_RX[] = {
90     {PTA1 , UART_0, 2},
91     {PTA15, UART_0, 3},
92     {PTB16, UART_0, 3},
93     {PTD6 , UART_0, 3},
94     {PTC3 , UART_1, 3},
95     {PTE1 , UART_1, 3},
96     {PTD2 , UART_2, 3},
97     {NC   ,  NC    , 0}
98 };
99
100 /************SPI***************/
101 const PinMap PinMap_SPI_SCLK[] = {
102     {PTD1 , SPI_0, 2},
103     {PTE2 , SPI_1, 2},
104     {PTA15, SPI_0, 2},
105     {PTB11, SPI_1, 2},
106     {PTC5 , SPI_0, 2},
107     {PTD5 , SPI_1, 7},
108     {NC   , NC   , 0}
109 };
110
111 const PinMap PinMap_SPI_MOSI[] = {
112     {PTD2 , SPI_0, 2},
113     {PTE1 , SPI_1, 2},
114     {PTE3 , SPI_1, 7},
115     {PTA16, SPI_0, 2},
116     {PTB16, SPI_1, 2},
117     {PTC6 , SPI_0, 2},
118     {PTD6 , SPI_1, 7},
119     {NC   , NC   , 0}
120 };
121
122 const PinMap PinMap_SPI_MISO[] = {
123     {PTD3 , SPI_0, 2},
124     {PTE1 , SPI_1, 7},
125     {PTE3 , SPI_1, 2},
126     {PTA17, SPI_0, 2},
127     {PTB17, SPI_1, 2},
128     {PTC7 , SPI_0, 2},
129     {PTD7 , SPI_1, 7},
130     {NC   , NC   , 0}
131 };
132
133 const PinMap PinMap_SPI_SSEL[] = {
134     {PTD0 , SPI_0, 2},
135     {PTE4 , SPI_1, 2},
136     {PTA14, SPI_0, 2},
137     {PTB10, SPI_1, 2},
138     {PTC4 , SPI_0, 2},
139     {PTD4 , SPI_1, 7},
140     {NC   , NC   , 0}
141 };
142
143 /************PWM***************/
144 const PinMap PinMap_PWM[] = {
145     {PTA0 , PWM_05, 3},
146     {PTA1 , PWM_06, 3},
147     {PTA2 , PWM_07, 3},
148     {PTA3 , PWM_00, 3},
149     {PTA4 , PWM_01, 3},
150     {PTA5 , PWM_02, 3},
151     {PTA10, PWM_20, 3},
152     {PTA11, PWM_21, 3},
153     {PTA12, PWM_10, 3},
154     {PTA13, PWM_11, 3},
155     
156     {PTB0 , PWM_10, 3},
157     {PTB1 , PWM_11, 3},
158     {PTB18, PWM_20, 3},
159     {PTB19, PWM_21, 3},
160     
161     {PTC1 , PWM_00, 4},
162     {PTC2 , PWM_01, 4},
163     {PTC3 , PWM_02, 4},
164     {PTC4 , PWM_03, 4},
165     {PTC5 , PWM_02, 7},
166     
167     {PTD0 , PWM_30, 4},
168     {PTD1 , PWM_31, 4},
169     {PTD2 , PWM_32, 4},
170     {PTD3 , PWM_33, 4},
171     {PTD4 , PWM_04, 4},
172     {PTD5 , PWM_05, 4},
173     {PTD6 , PWM_06, 4},
174     {PTD7 , PWM_07, 4},
175     
176     {PTE5 , PWM_30, 6},
177     {PTE6 , PWM_31, 6},
178     {NC   ,  NC   , 0}
179 };