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