t
Fork of mbed-dev by
targets/TARGET_Silicon_Labs/TARGET_EFM32/TARGET_EFM32WG/PeripheralPins.c@178:c26431f84b0d, 2017-11-09 (annotated)
- Committer:
- amithy
- Date:
- Thu Nov 09 22:14:37 2017 +0000
- Revision:
- 178:c26431f84b0d
- Parent:
- 150:02e0a0aed4ec
test export
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
<> | 150:02e0a0aed4ec | 1 | /***************************************************************************//** |
<> | 150:02e0a0aed4ec | 2 | * @file PeripheralPins.c |
<> | 150:02e0a0aed4ec | 3 | ******************************************************************************* |
<> | 150:02e0a0aed4ec | 4 | * @section License |
<> | 150:02e0a0aed4ec | 5 | * <b>(C) Copyright 2015 Silicon Labs, http://www.silabs.com</b> |
<> | 150:02e0a0aed4ec | 6 | ******************************************************************************* |
<> | 150:02e0a0aed4ec | 7 | * |
<> | 150:02e0a0aed4ec | 8 | * SPDX-License-Identifier: Apache-2.0 |
<> | 150:02e0a0aed4ec | 9 | * |
<> | 150:02e0a0aed4ec | 10 | * Licensed under the Apache License, Version 2.0 (the "License"); you may |
<> | 150:02e0a0aed4ec | 11 | * not use this file except in compliance with the License. |
<> | 150:02e0a0aed4ec | 12 | * You may obtain a copy of the License at |
<> | 150:02e0a0aed4ec | 13 | * |
<> | 150:02e0a0aed4ec | 14 | * http://www.apache.org/licenses/LICENSE-2.0 |
<> | 150:02e0a0aed4ec | 15 | * |
<> | 150:02e0a0aed4ec | 16 | * Unless required by applicable law or agreed to in writing, software |
<> | 150:02e0a0aed4ec | 17 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
<> | 150:02e0a0aed4ec | 18 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
<> | 150:02e0a0aed4ec | 19 | * See the License for the specific language governing permissions and |
<> | 150:02e0a0aed4ec | 20 | * limitations under the License. |
<> | 150:02e0a0aed4ec | 21 | * |
<> | 150:02e0a0aed4ec | 22 | ******************************************************************************/ |
<> | 150:02e0a0aed4ec | 23 | |
<> | 150:02e0a0aed4ec | 24 | #include "PeripheralPins.h" |
<> | 150:02e0a0aed4ec | 25 | |
<> | 150:02e0a0aed4ec | 26 | /************ADC***************/ |
<> | 150:02e0a0aed4ec | 27 | /* The third "function" value is used to select the correct ADC channel */ |
<> | 150:02e0a0aed4ec | 28 | const PinMap PinMap_ADC[] = { |
<> | 150:02e0a0aed4ec | 29 | {PD0, ADC_0, ADC_SINGLECTRL_INPUTSEL_CH0}, |
<> | 150:02e0a0aed4ec | 30 | {PD1, ADC_0, ADC_SINGLECTRL_INPUTSEL_CH1}, |
<> | 150:02e0a0aed4ec | 31 | {PD2, ADC_0, ADC_SINGLECTRL_INPUTSEL_CH2}, |
<> | 150:02e0a0aed4ec | 32 | {PD3, ADC_0, ADC_SINGLECTRL_INPUTSEL_CH3}, |
<> | 150:02e0a0aed4ec | 33 | {PD4, ADC_0, ADC_SINGLECTRL_INPUTSEL_CH4}, |
<> | 150:02e0a0aed4ec | 34 | {PD5, ADC_0, ADC_SINGLECTRL_INPUTSEL_CH5}, |
<> | 150:02e0a0aed4ec | 35 | {PD6, ADC_0, ADC_SINGLECTRL_INPUTSEL_CH6}, |
<> | 150:02e0a0aed4ec | 36 | {PD7, ADC_0, ADC_SINGLECTRL_INPUTSEL_CH7}, |
<> | 150:02e0a0aed4ec | 37 | {NC , NC , NC} |
<> | 150:02e0a0aed4ec | 38 | }; |
<> | 150:02e0a0aed4ec | 39 | |
<> | 150:02e0a0aed4ec | 40 | /************DAC***************/ |
<> | 150:02e0a0aed4ec | 41 | const PinMap PinMap_DAC[] = { |
<> | 150:02e0a0aed4ec | 42 | {PB11, DAC_0, 0}, |
<> | 150:02e0a0aed4ec | 43 | {PB12, DAC_0, 1}, |
<> | 150:02e0a0aed4ec | 44 | {NC , NC , NC} |
<> | 150:02e0a0aed4ec | 45 | }; |
<> | 150:02e0a0aed4ec | 46 | |
<> | 150:02e0a0aed4ec | 47 | /************I2C SCL***********/ |
<> | 150:02e0a0aed4ec | 48 | const PinMap PinMap_I2C_SCL[] = { |
<> | 150:02e0a0aed4ec | 49 | /* I2C0 */ |
<> | 150:02e0a0aed4ec | 50 | {PA1, I2C_0, 0}, |
<> | 150:02e0a0aed4ec | 51 | {PD7, I2C_0, 1}, |
<> | 150:02e0a0aed4ec | 52 | {PC7, I2C_0, 2}, |
<> | 150:02e0a0aed4ec | 53 | {PD15, I2C_0, 3}, |
<> | 150:02e0a0aed4ec | 54 | {PC1, I2C_0, 4}, |
<> | 150:02e0a0aed4ec | 55 | {PF1, I2C_0, 5}, |
<> | 150:02e0a0aed4ec | 56 | {PE13, I2C_0, 6}, |
<> | 150:02e0a0aed4ec | 57 | |
<> | 150:02e0a0aed4ec | 58 | /* I2C1 */ |
<> | 150:02e0a0aed4ec | 59 | {PC5, I2C_1, 0}, |
<> | 150:02e0a0aed4ec | 60 | {PB12, I2C_1, 1}, |
<> | 150:02e0a0aed4ec | 61 | {PE1, I2C_1, 2}, |
<> | 150:02e0a0aed4ec | 62 | |
<> | 150:02e0a0aed4ec | 63 | /* Not connected */ |
<> | 150:02e0a0aed4ec | 64 | {NC , NC , NC} |
<> | 150:02e0a0aed4ec | 65 | }; |
<> | 150:02e0a0aed4ec | 66 | |
<> | 150:02e0a0aed4ec | 67 | /************I2C SDA***********/ |
<> | 150:02e0a0aed4ec | 68 | const PinMap PinMap_I2C_SDA[] = { |
<> | 150:02e0a0aed4ec | 69 | /* I2C0 */ |
<> | 150:02e0a0aed4ec | 70 | {PA0, I2C_0, 0}, |
<> | 150:02e0a0aed4ec | 71 | {PD6, I2C_0, 1}, |
<> | 150:02e0a0aed4ec | 72 | {PC6, I2C_0, 2}, |
<> | 150:02e0a0aed4ec | 73 | {PD14, I2C_0, 3}, |
<> | 150:02e0a0aed4ec | 74 | {PC0, I2C_0, 4}, |
<> | 150:02e0a0aed4ec | 75 | {PF0, I2C_0, 5}, |
<> | 150:02e0a0aed4ec | 76 | {PE12, I2C_0, 6}, |
<> | 150:02e0a0aed4ec | 77 | |
<> | 150:02e0a0aed4ec | 78 | /* I2C1 */ |
<> | 150:02e0a0aed4ec | 79 | {PC4, I2C_1, 0}, |
<> | 150:02e0a0aed4ec | 80 | {PB11, I2C_1, 1}, |
<> | 150:02e0a0aed4ec | 81 | {PE0, I2C_1, 2}, |
<> | 150:02e0a0aed4ec | 82 | |
<> | 150:02e0a0aed4ec | 83 | /* Not connected */ |
<> | 150:02e0a0aed4ec | 84 | {NC , NC , NC} |
<> | 150:02e0a0aed4ec | 85 | }; |
<> | 150:02e0a0aed4ec | 86 | |
<> | 150:02e0a0aed4ec | 87 | /************PWM***************/ |
<> | 150:02e0a0aed4ec | 88 | const PinMap PinMap_PWM[] = { |
<> | 150:02e0a0aed4ec | 89 | {PA8, PWM_CH0, 0}, |
<> | 150:02e0a0aed4ec | 90 | {PA9, PWM_CH1, 0}, |
<> | 150:02e0a0aed4ec | 91 | {PA10, PWM_CH2, 0}, |
<> | 150:02e0a0aed4ec | 92 | {PA12, PWM_CH0, 1}, |
<> | 150:02e0a0aed4ec | 93 | {PA13, PWM_CH1, 1}, |
<> | 150:02e0a0aed4ec | 94 | {PA14, PWM_CH2, 1}, |
<> | 150:02e0a0aed4ec | 95 | {PC8, PWM_CH0, 2}, |
<> | 150:02e0a0aed4ec | 96 | {PC9, PWM_CH1, 2}, |
<> | 150:02e0a0aed4ec | 97 | {PC10, PWM_CH2, 2}, |
<> | 150:02e0a0aed4ec | 98 | {NC , NC , 0} |
<> | 150:02e0a0aed4ec | 99 | }; |
<> | 150:02e0a0aed4ec | 100 | |
<> | 150:02e0a0aed4ec | 101 | /*************SPI**************/ |
<> | 150:02e0a0aed4ec | 102 | const PinMap PinMap_SPI_MOSI[] = { |
<> | 150:02e0a0aed4ec | 103 | /* USART0 */ |
<> | 150:02e0a0aed4ec | 104 | {PE10, SPI_0, 0}, |
<> | 150:02e0a0aed4ec | 105 | {PE7, SPI_0, 1}, |
<> | 150:02e0a0aed4ec | 106 | {PC11, SPI_0, 2}, |
<> | 150:02e0a0aed4ec | 107 | {PC0, SPI_0, 5}, |
<> | 150:02e0a0aed4ec | 108 | /* USART1 */ |
<> | 150:02e0a0aed4ec | 109 | {PD0, SPI_1, 1}, |
<> | 150:02e0a0aed4ec | 110 | {PD7, SPI_1, 2}, |
<> | 150:02e0a0aed4ec | 111 | /* USART2 */ |
<> | 150:02e0a0aed4ec | 112 | {PC2, SPI_2, 0}, |
<> | 150:02e0a0aed4ec | 113 | {PB3, SPI_2, 1}, |
<> | 150:02e0a0aed4ec | 114 | /* Not connected */ |
<> | 150:02e0a0aed4ec | 115 | {NC , NC , NC} |
<> | 150:02e0a0aed4ec | 116 | }; |
<> | 150:02e0a0aed4ec | 117 | |
<> | 150:02e0a0aed4ec | 118 | const PinMap PinMap_SPI_MISO[] = { |
<> | 150:02e0a0aed4ec | 119 | /* USART0 */ |
<> | 150:02e0a0aed4ec | 120 | {PE11, SPI_0, 0}, |
<> | 150:02e0a0aed4ec | 121 | {PE6, SPI_0, 1}, |
<> | 150:02e0a0aed4ec | 122 | {PC10, SPI_0, 2}, |
<> | 150:02e0a0aed4ec | 123 | {PC1, SPI_0, 5}, |
<> | 150:02e0a0aed4ec | 124 | /* USART1 */ |
<> | 150:02e0a0aed4ec | 125 | {PD1, SPI_1, 1}, |
<> | 150:02e0a0aed4ec | 126 | {PD6, SPI_1, 2}, |
<> | 150:02e0a0aed4ec | 127 | /* USART2 */ |
<> | 150:02e0a0aed4ec | 128 | {PC3, SPI_2, 0}, |
<> | 150:02e0a0aed4ec | 129 | {PB4, SPI_2, 1}, |
<> | 150:02e0a0aed4ec | 130 | /* Not connected */ |
<> | 150:02e0a0aed4ec | 131 | {NC , NC , NC} |
<> | 150:02e0a0aed4ec | 132 | }; |
<> | 150:02e0a0aed4ec | 133 | |
<> | 150:02e0a0aed4ec | 134 | const PinMap PinMap_SPI_CLK[] = { |
<> | 150:02e0a0aed4ec | 135 | /* USART0 */ |
<> | 150:02e0a0aed4ec | 136 | {PE12, SPI_0, 0}, |
<> | 150:02e0a0aed4ec | 137 | {PE5, SPI_0, 1}, |
<> | 150:02e0a0aed4ec | 138 | {PC9, SPI_0, 2}, |
<> | 150:02e0a0aed4ec | 139 | {PB13, SPI_0, 5}, |
<> | 150:02e0a0aed4ec | 140 | /* USART1 */ |
<> | 150:02e0a0aed4ec | 141 | {PD2, SPI_1, 1}, |
<> | 150:02e0a0aed4ec | 142 | {PF0, SPI_1, 2}, |
<> | 150:02e0a0aed4ec | 143 | /* USART2 */ |
<> | 150:02e0a0aed4ec | 144 | {PC4, SPI_2, 0}, |
<> | 150:02e0a0aed4ec | 145 | {PB5, SPI_2, 1}, |
<> | 150:02e0a0aed4ec | 146 | /* Not connected */ |
<> | 150:02e0a0aed4ec | 147 | {NC , NC , NC} |
<> | 150:02e0a0aed4ec | 148 | }; |
<> | 150:02e0a0aed4ec | 149 | |
<> | 150:02e0a0aed4ec | 150 | const PinMap PinMap_SPI_CS[] = { |
<> | 150:02e0a0aed4ec | 151 | /* USART0 */ |
<> | 150:02e0a0aed4ec | 152 | {PE13, SPI_0, 0}, |
<> | 150:02e0a0aed4ec | 153 | {PE4, SPI_0, 1}, |
<> | 150:02e0a0aed4ec | 154 | {PC8, SPI_0, 2}, |
<> | 150:02e0a0aed4ec | 155 | {PB14, SPI_0, 5}, |
<> | 150:02e0a0aed4ec | 156 | /* USART1 */ |
<> | 150:02e0a0aed4ec | 157 | {PD3, SPI_1, 1}, |
<> | 150:02e0a0aed4ec | 158 | {PF1, SPI_1, 2}, |
<> | 150:02e0a0aed4ec | 159 | /* USART2 */ |
<> | 150:02e0a0aed4ec | 160 | {PC5, SPI_2, 0}, |
<> | 150:02e0a0aed4ec | 161 | {PB6, SPI_2, 1}, |
<> | 150:02e0a0aed4ec | 162 | /* Not connected */ |
<> | 150:02e0a0aed4ec | 163 | {NC , NC , NC} |
<> | 150:02e0a0aed4ec | 164 | }; |
<> | 150:02e0a0aed4ec | 165 | |
<> | 150:02e0a0aed4ec | 166 | /************UART**************/ |
<> | 150:02e0a0aed4ec | 167 | const PinMap PinMap_UART_TX[] = { |
<> | 150:02e0a0aed4ec | 168 | /* UART0 */ |
<> | 150:02e0a0aed4ec | 169 | {PF6, UART_0, 0}, |
<> | 150:02e0a0aed4ec | 170 | {PE0, UART_0, 1}, |
<> | 150:02e0a0aed4ec | 171 | /* UART1 */ |
<> | 150:02e0a0aed4ec | 172 | {PF10, UART_1, 1}, |
<> | 150:02e0a0aed4ec | 173 | {PB9, UART_1, 2}, |
<> | 150:02e0a0aed4ec | 174 | {PE2, UART_1, 3}, |
<> | 150:02e0a0aed4ec | 175 | /* USART0 */ |
<> | 150:02e0a0aed4ec | 176 | {PE10, USART_0, 0}, |
<> | 150:02e0a0aed4ec | 177 | {PE7, USART_0, 1}, |
<> | 150:02e0a0aed4ec | 178 | {PC11, USART_0, 2}, |
<> | 150:02e0a0aed4ec | 179 | {PE13, USART_0, 3}, |
<> | 150:02e0a0aed4ec | 180 | {PB7, USART_0, 4}, |
<> | 150:02e0a0aed4ec | 181 | /* USART1 */ |
<> | 150:02e0a0aed4ec | 182 | {PC0, USART_1, 0}, |
<> | 150:02e0a0aed4ec | 183 | {PD0, USART_1, 1}, |
<> | 150:02e0a0aed4ec | 184 | {PD7, USART_1, 2}, |
<> | 150:02e0a0aed4ec | 185 | /* USART2 */ |
<> | 150:02e0a0aed4ec | 186 | {PC2, USART_2, 0}, |
<> | 150:02e0a0aed4ec | 187 | {PB3, USART_2, 1}, |
<> | 150:02e0a0aed4ec | 188 | /* LEUART0 */ |
<> | 150:02e0a0aed4ec | 189 | {PD4, LEUART_0, 0}, |
<> | 150:02e0a0aed4ec | 190 | {PB13, LEUART_0, 1}, |
<> | 150:02e0a0aed4ec | 191 | {PE14, LEUART_0, 2}, |
<> | 150:02e0a0aed4ec | 192 | {PF0, LEUART_0, 3}, |
<> | 150:02e0a0aed4ec | 193 | {PF2, LEUART_0, 4}, |
<> | 150:02e0a0aed4ec | 194 | /* LEUART1 */ |
<> | 150:02e0a0aed4ec | 195 | {PC6, LEUART_1, 0}, |
<> | 150:02e0a0aed4ec | 196 | {PA5, LEUART_1, 1}, |
<> | 150:02e0a0aed4ec | 197 | /* Not connected */ |
<> | 150:02e0a0aed4ec | 198 | {NC , NC , NC} |
<> | 150:02e0a0aed4ec | 199 | }; |
<> | 150:02e0a0aed4ec | 200 | |
<> | 150:02e0a0aed4ec | 201 | const PinMap PinMap_UART_RX[] = { |
<> | 150:02e0a0aed4ec | 202 | /* UART0 */ |
<> | 150:02e0a0aed4ec | 203 | {PF7, UART_0, 0}, |
<> | 150:02e0a0aed4ec | 204 | {PE1, UART_0, 1}, |
<> | 150:02e0a0aed4ec | 205 | /* UART1 */ |
<> | 150:02e0a0aed4ec | 206 | {PF11, UART_1, 1}, |
<> | 150:02e0a0aed4ec | 207 | {PB10, UART_1, 2}, |
<> | 150:02e0a0aed4ec | 208 | {PE3, UART_1, 3}, |
<> | 150:02e0a0aed4ec | 209 | /* USART0 */ |
<> | 150:02e0a0aed4ec | 210 | {PE11, USART_0, 0}, |
<> | 150:02e0a0aed4ec | 211 | {PE6, USART_0, 1}, |
<> | 150:02e0a0aed4ec | 212 | {PC10, USART_0, 2}, |
<> | 150:02e0a0aed4ec | 213 | {PE12, USART_0, 3}, |
<> | 150:02e0a0aed4ec | 214 | {PB8, USART_0, 4}, |
<> | 150:02e0a0aed4ec | 215 | /* USART1 */ |
<> | 150:02e0a0aed4ec | 216 | {PC1, USART_1, 0}, |
<> | 150:02e0a0aed4ec | 217 | {PD1, USART_1, 1}, |
<> | 150:02e0a0aed4ec | 218 | {PD6, USART_1, 2}, |
<> | 150:02e0a0aed4ec | 219 | /* USART2 */ |
<> | 150:02e0a0aed4ec | 220 | {PC3, USART_2, 0}, |
<> | 150:02e0a0aed4ec | 221 | {PB4, USART_2, 1}, |
<> | 150:02e0a0aed4ec | 222 | /* LEUART0 */ |
<> | 150:02e0a0aed4ec | 223 | {PD5, LEUART_0, 0}, |
<> | 150:02e0a0aed4ec | 224 | {PB14, LEUART_0, 1}, |
<> | 150:02e0a0aed4ec | 225 | {PE15, LEUART_0, 2}, |
<> | 150:02e0a0aed4ec | 226 | {PF1, LEUART_0, 3}, |
<> | 150:02e0a0aed4ec | 227 | {PA0, LEUART_0, 4}, |
<> | 150:02e0a0aed4ec | 228 | /* LEUART1 */ |
<> | 150:02e0a0aed4ec | 229 | {PC7, LEUART_1, 0}, |
<> | 150:02e0a0aed4ec | 230 | {PA6, LEUART_1, 1}, |
<> | 150:02e0a0aed4ec | 231 | /* Not connected */ |
<> | 150:02e0a0aed4ec | 232 | {NC , NC , NC} |
<> | 150:02e0a0aed4ec | 233 | }; |