mbed library sources
Dependents: frdm_kl05z_gpio_test
Fork of mbed-src by
targets/hal/TARGET_Freescale/TARGET_KLXX/TARGET_KL46Z/PeripheralPins.c@86:26fc69fd3b6c, 2014-02-08 (annotated)
- Committer:
- mbed_official
- Date:
- Sat Feb 08 12:00:07 2014 +0000
- Revision:
- 86:26fc69fd3b6c
- Parent:
- 82:0b31dbcd4769
- Child:
- 108:4cb9db2ced35
Synchronized with git revision 8c4fcca8c8e600391a5ccb90a3f889019733d082
Full URL: https://github.com/mbedmicro/mbed/commit/8c4fcca8c8e600391a5ccb90a3f889019733d082/
PWM update for Freescale Targets
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
mbed_official | 82:0b31dbcd4769 | 1 | /* mbed Microcontroller Library |
mbed_official | 82:0b31dbcd4769 | 2 | * Copyright (c) 2006-2013 ARM Limited |
mbed_official | 82:0b31dbcd4769 | 3 | * |
mbed_official | 82:0b31dbcd4769 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
mbed_official | 82:0b31dbcd4769 | 5 | * you may not use this file except in compliance with the License. |
mbed_official | 82:0b31dbcd4769 | 6 | * You may obtain a copy of the License at |
mbed_official | 82:0b31dbcd4769 | 7 | * |
mbed_official | 82:0b31dbcd4769 | 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
mbed_official | 82:0b31dbcd4769 | 9 | * |
mbed_official | 82:0b31dbcd4769 | 10 | * Unless required by applicable law or agreed to in writing, software |
mbed_official | 82:0b31dbcd4769 | 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
mbed_official | 82:0b31dbcd4769 | 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
mbed_official | 82:0b31dbcd4769 | 13 | * See the License for the specific language governing permissions and |
mbed_official | 82:0b31dbcd4769 | 14 | * limitations under the License. |
mbed_official | 82:0b31dbcd4769 | 15 | */ |
mbed_official | 82:0b31dbcd4769 | 16 | |
mbed_official | 82:0b31dbcd4769 | 17 | #include "PeripheralPins.h" |
mbed_official | 82:0b31dbcd4769 | 18 | |
mbed_official | 82:0b31dbcd4769 | 19 | /************RTC***************/ |
mbed_official | 82:0b31dbcd4769 | 20 | const PinMap PinMap_RTC[] = { |
mbed_official | 82:0b31dbcd4769 | 21 | {PTC1, RTC_CLKIN, 2}, |
mbed_official | 82:0b31dbcd4769 | 22 | }; |
mbed_official | 82:0b31dbcd4769 | 23 | |
mbed_official | 82:0b31dbcd4769 | 24 | /************ADC***************/ |
mbed_official | 82:0b31dbcd4769 | 25 | const PinMap PinMap_ADC[] = { |
mbed_official | 82:0b31dbcd4769 | 26 | {PTE20, ADC0_SE0, 0}, |
mbed_official | 82:0b31dbcd4769 | 27 | {PTE22, ADC0_SE3, 0}, |
mbed_official | 82:0b31dbcd4769 | 28 | {PTE21, ADC0_SE4a, 0}, |
mbed_official | 82:0b31dbcd4769 | 29 | {PTE29, ADC0_SE4b, 0}, |
mbed_official | 82:0b31dbcd4769 | 30 | {PTE30, ADC0_SE23, 0}, |
mbed_official | 82:0b31dbcd4769 | 31 | {PTE23, ADC0_SE7a, 0}, |
mbed_official | 82:0b31dbcd4769 | 32 | {PTB0, ADC0_SE8, 0}, |
mbed_official | 82:0b31dbcd4769 | 33 | {PTB1, ADC0_SE9, 0}, |
mbed_official | 82:0b31dbcd4769 | 34 | {PTB2, ADC0_SE12, 0}, |
mbed_official | 82:0b31dbcd4769 | 35 | {PTB3, ADC0_SE13, 0}, |
mbed_official | 82:0b31dbcd4769 | 36 | {PTC0, ADC0_SE14, 0}, |
mbed_official | 82:0b31dbcd4769 | 37 | {PTC1, ADC0_SE15, 0}, |
mbed_official | 82:0b31dbcd4769 | 38 | {PTC2, ADC0_SE11, 0}, |
mbed_official | 82:0b31dbcd4769 | 39 | {PTD1, ADC0_SE5b, 0}, |
mbed_official | 82:0b31dbcd4769 | 40 | {PTD5, ADC0_SE6b, 0}, |
mbed_official | 82:0b31dbcd4769 | 41 | {PTD6, ADC0_SE7b, 0}, |
mbed_official | 82:0b31dbcd4769 | 42 | {NC, NC, 0} |
mbed_official | 82:0b31dbcd4769 | 43 | }; |
mbed_official | 82:0b31dbcd4769 | 44 | |
mbed_official | 82:0b31dbcd4769 | 45 | /************DAC***************/ |
mbed_official | 82:0b31dbcd4769 | 46 | const PinMap PinMap_DAC[] = { |
mbed_official | 82:0b31dbcd4769 | 47 | {PTE30, DAC_0, 0}, |
mbed_official | 82:0b31dbcd4769 | 48 | {NC , NC , 0} |
mbed_official | 82:0b31dbcd4769 | 49 | }; |
mbed_official | 82:0b31dbcd4769 | 50 | |
mbed_official | 82:0b31dbcd4769 | 51 | /************I2C***************/ |
mbed_official | 82:0b31dbcd4769 | 52 | const PinMap PinMap_I2C_SDA[] = { |
mbed_official | 82:0b31dbcd4769 | 53 | {PTE25, I2C_0, 5}, |
mbed_official | 82:0b31dbcd4769 | 54 | {PTC9, I2C_0, 2}, |
mbed_official | 82:0b31dbcd4769 | 55 | {PTE0, I2C_1, 6}, |
mbed_official | 82:0b31dbcd4769 | 56 | {PTB1, I2C_0, 2}, |
mbed_official | 82:0b31dbcd4769 | 57 | {PTB3, I2C_0, 2}, |
mbed_official | 82:0b31dbcd4769 | 58 | {PTC11, I2C_1, 2}, |
mbed_official | 82:0b31dbcd4769 | 59 | {PTC2, I2C_1, 2}, |
mbed_official | 82:0b31dbcd4769 | 60 | {PTA4, I2C_1, 2}, |
mbed_official | 82:0b31dbcd4769 | 61 | {NC , NC , 0} |
mbed_official | 82:0b31dbcd4769 | 62 | }; |
mbed_official | 82:0b31dbcd4769 | 63 | |
mbed_official | 82:0b31dbcd4769 | 64 | const PinMap PinMap_I2C_SCL[] = { |
mbed_official | 82:0b31dbcd4769 | 65 | {PTE24, I2C_0, 5}, |
mbed_official | 82:0b31dbcd4769 | 66 | {PTC8, I2C_0, 2}, |
mbed_official | 82:0b31dbcd4769 | 67 | {PTE1, I2C_1, 6}, |
mbed_official | 82:0b31dbcd4769 | 68 | {PTB0, I2C_0, 2}, |
mbed_official | 82:0b31dbcd4769 | 69 | {PTB2, I2C_0, 2}, |
mbed_official | 82:0b31dbcd4769 | 70 | {PTC10, I2C_1, 2}, |
mbed_official | 82:0b31dbcd4769 | 71 | {PTC1, I2C_1, 2}, |
mbed_official | 82:0b31dbcd4769 | 72 | {NC , NC, 0} |
mbed_official | 82:0b31dbcd4769 | 73 | }; |
mbed_official | 82:0b31dbcd4769 | 74 | |
mbed_official | 82:0b31dbcd4769 | 75 | /************UART***************/ |
mbed_official | 82:0b31dbcd4769 | 76 | const PinMap PinMap_UART_TX[] = { |
mbed_official | 82:0b31dbcd4769 | 77 | {PTA2, UART_0, 2}, |
mbed_official | 82:0b31dbcd4769 | 78 | {PTA14, UART_0, 3}, |
mbed_official | 82:0b31dbcd4769 | 79 | {PTC4, UART_1, 3}, |
mbed_official | 82:0b31dbcd4769 | 80 | {PTD3, UART_2, 3}, |
mbed_official | 82:0b31dbcd4769 | 81 | {PTD5, UART_2, 3}, |
mbed_official | 82:0b31dbcd4769 | 82 | {PTD7, UART_0, 3}, |
mbed_official | 82:0b31dbcd4769 | 83 | {PTE0, UART_1, 3}, |
mbed_official | 82:0b31dbcd4769 | 84 | {PTE16, UART_2, 3}, |
mbed_official | 82:0b31dbcd4769 | 85 | {PTE20, UART_0, 4}, |
mbed_official | 82:0b31dbcd4769 | 86 | {PTE22, UART_2, 4}, |
mbed_official | 82:0b31dbcd4769 | 87 | {NC , NC , 0} |
mbed_official | 82:0b31dbcd4769 | 88 | }; |
mbed_official | 82:0b31dbcd4769 | 89 | |
mbed_official | 82:0b31dbcd4769 | 90 | const PinMap PinMap_UART_RX[] = { |
mbed_official | 82:0b31dbcd4769 | 91 | {PTA1, UART_0, 2}, |
mbed_official | 82:0b31dbcd4769 | 92 | {PTA15, UART_0, 3}, |
mbed_official | 82:0b31dbcd4769 | 93 | {PTC3, UART_1, 3}, |
mbed_official | 82:0b31dbcd4769 | 94 | {PTD2, UART_2, 3}, |
mbed_official | 82:0b31dbcd4769 | 95 | {PTD4, UART_2, 3}, |
mbed_official | 82:0b31dbcd4769 | 96 | {PTD6, UART_0, 3}, |
mbed_official | 82:0b31dbcd4769 | 97 | {PTE1, UART_1, 3}, |
mbed_official | 82:0b31dbcd4769 | 98 | {PTE17, UART_2, 3}, |
mbed_official | 82:0b31dbcd4769 | 99 | {PTE21, UART_0, 4}, |
mbed_official | 82:0b31dbcd4769 | 100 | {PTE23, UART_2, 4}, |
mbed_official | 82:0b31dbcd4769 | 101 | {NC , NC , 0} |
mbed_official | 82:0b31dbcd4769 | 102 | }; |
mbed_official | 82:0b31dbcd4769 | 103 | |
mbed_official | 82:0b31dbcd4769 | 104 | /************SPI***************/ |
mbed_official | 82:0b31dbcd4769 | 105 | const PinMap PinMap_SPI_SCLK[] = { |
mbed_official | 82:0b31dbcd4769 | 106 | {PTA15, SPI_0, 2}, |
mbed_official | 82:0b31dbcd4769 | 107 | {PTB9, SPI_1, 2}, |
mbed_official | 82:0b31dbcd4769 | 108 | {PTB11, SPI_1, 2}, |
mbed_official | 82:0b31dbcd4769 | 109 | {PTC5, SPI_0, 2}, |
mbed_official | 82:0b31dbcd4769 | 110 | {PTD1, SPI_0, 2}, |
mbed_official | 82:0b31dbcd4769 | 111 | {PTD5, SPI_1, 2}, |
mbed_official | 82:0b31dbcd4769 | 112 | {PTE2, SPI_1, 2}, |
mbed_official | 82:0b31dbcd4769 | 113 | {PTE17, SPI_0, 2}, |
mbed_official | 82:0b31dbcd4769 | 114 | {NC , NC , 0} |
mbed_official | 82:0b31dbcd4769 | 115 | }; |
mbed_official | 82:0b31dbcd4769 | 116 | |
mbed_official | 82:0b31dbcd4769 | 117 | const PinMap PinMap_SPI_MOSI[] = { |
mbed_official | 82:0b31dbcd4769 | 118 | {PTA16, SPI_0, 2}, |
mbed_official | 82:0b31dbcd4769 | 119 | {PTA17, SPI_0, 5}, |
mbed_official | 82:0b31dbcd4769 | 120 | {PTB16, SPI_1, 2}, |
mbed_official | 82:0b31dbcd4769 | 121 | {PTB17, SPI_1, 5}, |
mbed_official | 82:0b31dbcd4769 | 122 | {PTC6, SPI_0, 2}, |
mbed_official | 82:0b31dbcd4769 | 123 | {PTC7, SPI_0, 5}, |
mbed_official | 82:0b31dbcd4769 | 124 | {PTD2, SPI_0, 2}, |
mbed_official | 82:0b31dbcd4769 | 125 | {PTD3, SPI_0, 5}, |
mbed_official | 82:0b31dbcd4769 | 126 | {PTD6, SPI_1, 2}, |
mbed_official | 82:0b31dbcd4769 | 127 | {PTD7, SPI_1, 5}, |
mbed_official | 82:0b31dbcd4769 | 128 | {PTE1, SPI_1, 2}, |
mbed_official | 82:0b31dbcd4769 | 129 | {PTE3, SPI_1, 5}, |
mbed_official | 82:0b31dbcd4769 | 130 | {PTE18, SPI_0, 2}, |
mbed_official | 82:0b31dbcd4769 | 131 | {PTE19, SPI_0, 5}, |
mbed_official | 82:0b31dbcd4769 | 132 | {NC , NC , 0} |
mbed_official | 82:0b31dbcd4769 | 133 | }; |
mbed_official | 82:0b31dbcd4769 | 134 | |
mbed_official | 82:0b31dbcd4769 | 135 | const PinMap PinMap_SPI_MISO[] = { |
mbed_official | 82:0b31dbcd4769 | 136 | {PTA16, SPI_0, 5}, |
mbed_official | 82:0b31dbcd4769 | 137 | {PTA17, SPI_0, 2}, |
mbed_official | 82:0b31dbcd4769 | 138 | {PTB16, SPI_1, 5}, |
mbed_official | 82:0b31dbcd4769 | 139 | {PTB17, SPI_1, 2}, |
mbed_official | 82:0b31dbcd4769 | 140 | {PTC6, SPI_0, 5}, |
mbed_official | 82:0b31dbcd4769 | 141 | {PTC7, SPI_0, 2}, |
mbed_official | 82:0b31dbcd4769 | 142 | {PTD2, SPI_0, 5}, |
mbed_official | 82:0b31dbcd4769 | 143 | {PTD3, SPI_0, 2}, |
mbed_official | 82:0b31dbcd4769 | 144 | {PTD6, SPI_1, 5}, |
mbed_official | 82:0b31dbcd4769 | 145 | {PTD7, SPI_1, 2}, |
mbed_official | 82:0b31dbcd4769 | 146 | {PTE1, SPI_1, 5}, |
mbed_official | 82:0b31dbcd4769 | 147 | {PTE3, SPI_1, 2}, |
mbed_official | 82:0b31dbcd4769 | 148 | {PTE18, SPI_0, 5}, |
mbed_official | 82:0b31dbcd4769 | 149 | {PTE19, SPI_0, 2}, |
mbed_official | 82:0b31dbcd4769 | 150 | {NC , NC , 0} |
mbed_official | 82:0b31dbcd4769 | 151 | }; |
mbed_official | 82:0b31dbcd4769 | 152 | |
mbed_official | 82:0b31dbcd4769 | 153 | const PinMap PinMap_SPI_SSEL[] = { |
mbed_official | 82:0b31dbcd4769 | 154 | {PTA14, SPI_0, 2}, |
mbed_official | 82:0b31dbcd4769 | 155 | {PTB10, SPI_1, 2}, |
mbed_official | 82:0b31dbcd4769 | 156 | {PTC4, SPI_0, 2}, |
mbed_official | 82:0b31dbcd4769 | 157 | {PTD0, SPI_0, 2}, |
mbed_official | 82:0b31dbcd4769 | 158 | {PTD4, SPI_1, 2}, |
mbed_official | 82:0b31dbcd4769 | 159 | {PTE4, SPI_1, 2}, |
mbed_official | 82:0b31dbcd4769 | 160 | {PTE16, SPI_0, 2}, |
mbed_official | 82:0b31dbcd4769 | 161 | {NC , NC , 0} |
mbed_official | 82:0b31dbcd4769 | 162 | }; |
mbed_official | 82:0b31dbcd4769 | 163 | |
mbed_official | 82:0b31dbcd4769 | 164 | /************PWM***************/ |
mbed_official | 82:0b31dbcd4769 | 165 | const PinMap PinMap_PWM[] = { |
mbed_official | 86:26fc69fd3b6c | 166 | {PTA0, PWM_6, 3}, // PTA0 , TPM0 CH5 |
mbed_official | 86:26fc69fd3b6c | 167 | {PTA1, PWM_9 , 3}, // PTA1 , TPM2 CH0 |
mbed_official | 86:26fc69fd3b6c | 168 | {PTA2, PWM_10, 3}, // PTA2 , TPM2 CH1 |
mbed_official | 86:26fc69fd3b6c | 169 | {PTA3, PWM_1, 3}, // PTA3 , TPM0 CH0 |
mbed_official | 86:26fc69fd3b6c | 170 | {PTA4, PWM_2 , 3}, // PTA4 , TPM0 CH1 |
mbed_official | 86:26fc69fd3b6c | 171 | {PTA5, PWM_3 , 3}, // PTA5 , TPM0 CH2 |
mbed_official | 86:26fc69fd3b6c | 172 | {PTA6, PWM_4, 3}, // PTA6 , TPM0 CH3 |
mbed_official | 86:26fc69fd3b6c | 173 | {PTA7, PWM_5, 3}, // PTA7 , TPM0 CH4 |
mbed_official | 86:26fc69fd3b6c | 174 | {PTA12, PWM_7 , 3}, // PTA12, TPM1 CH0 |
mbed_official | 86:26fc69fd3b6c | 175 | {PTA13, PWM_8 , 3}, // PTA13, TPM1 CH1 |
mbed_official | 86:26fc69fd3b6c | 176 | |
mbed_official | 86:26fc69fd3b6c | 177 | {PTB0, PWM_7, 3}, // PTB0 , TPM1 CH0 |
mbed_official | 86:26fc69fd3b6c | 178 | {PTB1, PWM_8, 3}, // PTB1 , TPM1 CH1 |
mbed_official | 86:26fc69fd3b6c | 179 | {PTB2, PWM_9, 3}, // PTB2 , TPM2 CH0 |
mbed_official | 86:26fc69fd3b6c | 180 | {PTB3, PWM_10, 3}, // PTB3 , TPM2 CH1 |
mbed_official | 86:26fc69fd3b6c | 181 | {PTB18, PWM_9, 3}, // PTB18, TPM2 CH0 |
mbed_official | 86:26fc69fd3b6c | 182 | {PTB19, PWM_10, 3}, // PTB18, TPM2 CH1 |
mbed_official | 82:0b31dbcd4769 | 183 | |
mbed_official | 86:26fc69fd3b6c | 184 | {PTC1, PWM_1, 4}, // PTC1 , TPM0 CH0 |
mbed_official | 86:26fc69fd3b6c | 185 | {PTC2, PWM_2, 4}, // PTC2 , TPM0 CH1 |
mbed_official | 86:26fc69fd3b6c | 186 | {PTC3, PWM_3, 4}, // PTC3 , TPM0 CH2 |
mbed_official | 86:26fc69fd3b6c | 187 | {PTC4, PWM_4, 4}, // PTC4 , TPM0 CH3 |
mbed_official | 86:26fc69fd3b6c | 188 | {PTC8, PWM_5 , 3}, // PTC8 , TPM0 CH4 |
mbed_official | 86:26fc69fd3b6c | 189 | {PTC9, PWM_6 , 3}, // PTC9 , TPM0 CH5 |
mbed_official | 86:26fc69fd3b6c | 190 | |
mbed_official | 86:26fc69fd3b6c | 191 | {PTD0, PWM_1 , 4}, // PTD0 , TPM0 CH0 |
mbed_official | 86:26fc69fd3b6c | 192 | {PTD1, PWM_2 , 4}, // PTD0 , TPM0 CH1 |
mbed_official | 86:26fc69fd3b6c | 193 | {PTD2, PWM_3 , 4}, // PTD2 , TPM0 CH2 |
mbed_official | 86:26fc69fd3b6c | 194 | {PTD3, PWM_4 , 4}, // PTD3 , TPM0 CH3 |
mbed_official | 86:26fc69fd3b6c | 195 | {PTD4, PWM_5 , 4}, // PTD4 , TPM0 CH4 |
mbed_official | 86:26fc69fd3b6c | 196 | {PTD5, PWM_6 , 4}, // PTD5 , TPM0 CH5 |
mbed_official | 82:0b31dbcd4769 | 197 | |
mbed_official | 86:26fc69fd3b6c | 198 | {PTE20, PWM_7, 3}, // PTE20, TPM1 CH0 |
mbed_official | 86:26fc69fd3b6c | 199 | {PTE21, PWM_8, 3}, // PTE21, TPM1 CH1 |
mbed_official | 86:26fc69fd3b6c | 200 | {PTE22, PWM_9, 3}, // PTE22, TPM2 CH0 |
mbed_official | 86:26fc69fd3b6c | 201 | {PTE23, PWM_10, 3}, // PTE23, TPM2 CH1 |
mbed_official | 86:26fc69fd3b6c | 202 | {PTE24, PWM_1, 3}, // PTE24, TPM0 CH0 |
mbed_official | 86:26fc69fd3b6c | 203 | {PTE25, PWM_2, 3}, // PTE25, TPM0 CH1 |
mbed_official | 86:26fc69fd3b6c | 204 | {PTE26, PWM_6, 3}, // PTE26, TPM0 CH5 |
mbed_official | 86:26fc69fd3b6c | 205 | {PTE29, PWM_3, 3}, // PTE29, TPM0 CH2 |
mbed_official | 86:26fc69fd3b6c | 206 | {PTE30, PWM_4, 3}, // PTE30, TPM0 CH3 |
mbed_official | 86:26fc69fd3b6c | 207 | {PTE31, PWM_5, 3}, // PTE31, TPM0 CH4 |
mbed_official | 86:26fc69fd3b6c | 208 | {NC , NC, 0} |
mbed_official | 82:0b31dbcd4769 | 209 | }; |