mbed library sources

Dependents:   Encrypted my_mbed lklk CyaSSL_DTLS_Cellular ... more

Superseded

This library was superseded by mbed-dev - https://os.mbed.com/users/mbed_official/code/mbed-dev/.

Development branch of the mbed library sources. This library is kept in synch with the latest changes from the mbed SDK and it is not guaranteed to work.

If you are looking for a stable and tested release, please import one of the official mbed library releases:

Import librarymbed

The official Mbed 2 C/C++ SDK provides the software platform and libraries to build your applications.

Committer:
mbed_official
Date:
Fri Sep 25 14:15:10 2015 +0100
Revision:
627:4fa1328d9c60
Parent:
548:1abac31e188e
Synchronized with git revision fe238a91ab7a4d1d72c4cab9da04967c619d54ad

Full URL: https://github.com/mbedmicro/mbed/commit/fe238a91ab7a4d1d72c4cab9da04967c619d54ad/

Silicon Labs - Add support for low-power async Serial

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mbed_official 627:4fa1328d9c60 1 /***************************************************************************//**
mbed_official 627:4fa1328d9c60 2 * @file PeripheralPins.c
mbed_official 627:4fa1328d9c60 3 *******************************************************************************
mbed_official 627:4fa1328d9c60 4 * @section License
mbed_official 627:4fa1328d9c60 5 * <b>(C) Copyright 2015 Silicon Labs, http://www.silabs.com</b>
mbed_official 627:4fa1328d9c60 6 *******************************************************************************
mbed_official 525:c320967f86b9 7 *
mbed_official 627:4fa1328d9c60 8 * Permission is granted to anyone to use this software for any purpose,
mbed_official 627:4fa1328d9c60 9 * including commercial applications, and to alter it and redistribute it
mbed_official 627:4fa1328d9c60 10 * freely, subject to the following restrictions:
mbed_official 525:c320967f86b9 11 *
mbed_official 627:4fa1328d9c60 12 * 1. The origin of this software must not be misrepresented; you must not
mbed_official 627:4fa1328d9c60 13 * claim that you wrote the original software.
mbed_official 627:4fa1328d9c60 14 * 2. Altered source versions must be plainly marked as such, and must not be
mbed_official 627:4fa1328d9c60 15 * misrepresented as being the original software.
mbed_official 627:4fa1328d9c60 16 * 3. This notice may not be removed or altered from any source distribution.
mbed_official 525:c320967f86b9 17 *
mbed_official 627:4fa1328d9c60 18 * DISCLAIMER OF WARRANTY/LIMITATION OF REMEDIES: Silicon Labs has no
mbed_official 627:4fa1328d9c60 19 * obligation to support this Software. Silicon Labs is providing the
mbed_official 627:4fa1328d9c60 20 * Software "AS IS", with no express or implied warranties of any kind,
mbed_official 627:4fa1328d9c60 21 * including, but not limited to, any implied warranties of merchantability
mbed_official 627:4fa1328d9c60 22 * or fitness for any particular purpose or warranties against infringement
mbed_official 627:4fa1328d9c60 23 * of any proprietary rights of a third party.
mbed_official 627:4fa1328d9c60 24 *
mbed_official 627:4fa1328d9c60 25 * Silicon Labs will not be liable for any consequential, incidental, or
mbed_official 627:4fa1328d9c60 26 * special damages, or any other relief, or for any claim by any third party,
mbed_official 627:4fa1328d9c60 27 * arising from your use of this Software.
mbed_official 627:4fa1328d9c60 28 *
mbed_official 627:4fa1328d9c60 29 ******************************************************************************/
mbed_official 525:c320967f86b9 30
mbed_official 525:c320967f86b9 31 #include "PeripheralPins.h"
mbed_official 525:c320967f86b9 32
mbed_official 525:c320967f86b9 33 /************ADC***************/
mbed_official 525:c320967f86b9 34 /* The third "function" value is used to select the correct ADC channel */
mbed_official 525:c320967f86b9 35 const PinMap PinMap_ADC[] = {
mbed_official 525:c320967f86b9 36 {PD0, ADC_0, ADC_SINGLECTRL_INPUTSEL_CH0},
mbed_official 525:c320967f86b9 37 {PD1, ADC_0, ADC_SINGLECTRL_INPUTSEL_CH1},
mbed_official 525:c320967f86b9 38 {PD2, ADC_0, ADC_SINGLECTRL_INPUTSEL_CH2},
mbed_official 525:c320967f86b9 39 {PD3, ADC_0, ADC_SINGLECTRL_INPUTSEL_CH3},
mbed_official 525:c320967f86b9 40 {PD4, ADC_0, ADC_SINGLECTRL_INPUTSEL_CH4},
mbed_official 525:c320967f86b9 41 {PD5, ADC_0, ADC_SINGLECTRL_INPUTSEL_CH5},
mbed_official 525:c320967f86b9 42 {PD6, ADC_0, ADC_SINGLECTRL_INPUTSEL_CH6},
mbed_official 525:c320967f86b9 43 {PD7, ADC_0, ADC_SINGLECTRL_INPUTSEL_CH7},
mbed_official 525:c320967f86b9 44 {NC , NC , NC}
mbed_official 525:c320967f86b9 45 };
mbed_official 525:c320967f86b9 46
mbed_official 525:c320967f86b9 47 /************DAC***************/
mbed_official 525:c320967f86b9 48 const PinMap PinMap_DAC[] = {
mbed_official 525:c320967f86b9 49 {PB11, DAC_0, 0},
mbed_official 525:c320967f86b9 50 {PB12, DAC_0, 1},
mbed_official 525:c320967f86b9 51 {NC , NC , NC}
mbed_official 525:c320967f86b9 52 };
mbed_official 525:c320967f86b9 53
mbed_official 525:c320967f86b9 54 /************I2C SCL***********/
mbed_official 525:c320967f86b9 55 const PinMap PinMap_I2C_SCL[] = {
mbed_official 525:c320967f86b9 56 /* I2C0 */
mbed_official 525:c320967f86b9 57 {PA1, I2C_0, 0},
mbed_official 525:c320967f86b9 58 {PD7, I2C_0, 1},
mbed_official 525:c320967f86b9 59 {PC7, I2C_0, 2},
mbed_official 525:c320967f86b9 60 {PD15, I2C_0, 3},
mbed_official 525:c320967f86b9 61 {PC1, I2C_0, 4},
mbed_official 525:c320967f86b9 62 {PF1, I2C_0, 5},
mbed_official 525:c320967f86b9 63 {PE13, I2C_0, 6},
mbed_official 525:c320967f86b9 64
mbed_official 548:1abac31e188e 65 /* I2C1 */
mbed_official 525:c320967f86b9 66 {PC5, I2C_1, 0},
mbed_official 525:c320967f86b9 67 {PB12, I2C_1, 1},
mbed_official 525:c320967f86b9 68 {PE1, I2C_1, 2},
mbed_official 525:c320967f86b9 69
mbed_official 525:c320967f86b9 70 /* Not connected */
mbed_official 525:c320967f86b9 71 {NC , NC , NC}
mbed_official 525:c320967f86b9 72 };
mbed_official 525:c320967f86b9 73
mbed_official 525:c320967f86b9 74 /************I2C SDA***********/
mbed_official 525:c320967f86b9 75 const PinMap PinMap_I2C_SDA[] = {
mbed_official 525:c320967f86b9 76 /* I2C0 */
mbed_official 525:c320967f86b9 77 {PA0, I2C_0, 0},
mbed_official 525:c320967f86b9 78 {PD6, I2C_0, 1},
mbed_official 525:c320967f86b9 79 {PC6, I2C_0, 2},
mbed_official 525:c320967f86b9 80 {PD14, I2C_0, 3},
mbed_official 525:c320967f86b9 81 {PC0, I2C_0, 4},
mbed_official 525:c320967f86b9 82 {PF0, I2C_0, 5},
mbed_official 525:c320967f86b9 83 {PE12, I2C_0, 6},
mbed_official 525:c320967f86b9 84
mbed_official 548:1abac31e188e 85 /* I2C1 */
mbed_official 525:c320967f86b9 86 {PC4, I2C_1, 0},
mbed_official 525:c320967f86b9 87 {PB11, I2C_1, 1},
mbed_official 525:c320967f86b9 88 {PE0, I2C_1, 2},
mbed_official 525:c320967f86b9 89
mbed_official 525:c320967f86b9 90 /* Not connected */
mbed_official 525:c320967f86b9 91 {NC , NC , NC}
mbed_official 525:c320967f86b9 92 };
mbed_official 525:c320967f86b9 93
mbed_official 525:c320967f86b9 94 /************PWM***************/
mbed_official 525:c320967f86b9 95 const PinMap PinMap_PWM[] = {
mbed_official 525:c320967f86b9 96 {PA12, PWM_CH0, 0},
mbed_official 525:c320967f86b9 97 {PA13, PWM_CH1, 0},
mbed_official 525:c320967f86b9 98 {PA14, PWM_CH2, 0},
mbed_official 525:c320967f86b9 99 {NC , NC , 0}
mbed_official 525:c320967f86b9 100 };
mbed_official 525:c320967f86b9 101
mbed_official 525:c320967f86b9 102 /*************SPI**************/
mbed_official 525:c320967f86b9 103 const PinMap PinMap_SPI_MOSI[] = {
mbed_official 548:1abac31e188e 104 /* USART0 */
mbed_official 548:1abac31e188e 105 {PE10, SPI_0, 0},
mbed_official 548:1abac31e188e 106 {PE7, SPI_0, 1},
mbed_official 548:1abac31e188e 107 {PC11, SPI_0, 2},
mbed_official 548:1abac31e188e 108 {PC0, SPI_0, 5},
mbed_official 548:1abac31e188e 109 /* USART1 */
mbed_official 548:1abac31e188e 110 {PD0, SPI_1, 1},
mbed_official 548:1abac31e188e 111 {PD7, SPI_1, 2},
mbed_official 548:1abac31e188e 112 /* USART2 */
mbed_official 548:1abac31e188e 113 {PC2, SPI_2, 0},
mbed_official 548:1abac31e188e 114 {PB3, SPI_2, 1},
mbed_official 548:1abac31e188e 115 /* Not connected */
mbed_official 548:1abac31e188e 116 {NC , NC , NC}
mbed_official 525:c320967f86b9 117 };
mbed_official 525:c320967f86b9 118
mbed_official 525:c320967f86b9 119 const PinMap PinMap_SPI_MISO[] = {
mbed_official 548:1abac31e188e 120 /* USART0 */
mbed_official 548:1abac31e188e 121 {PE11, SPI_0, 0},
mbed_official 548:1abac31e188e 122 {PE6, SPI_0, 1},
mbed_official 548:1abac31e188e 123 {PC10, SPI_0, 2},
mbed_official 548:1abac31e188e 124 {PC1, SPI_0, 5},
mbed_official 548:1abac31e188e 125 /* USART1 */
mbed_official 548:1abac31e188e 126 {PD1, SPI_1, 1},
mbed_official 548:1abac31e188e 127 {PD6, SPI_1, 2},
mbed_official 548:1abac31e188e 128 /* USART2 */
mbed_official 548:1abac31e188e 129 {PC3, SPI_2, 0},
mbed_official 548:1abac31e188e 130 {PB4, SPI_2, 1},
mbed_official 548:1abac31e188e 131 /* Not connected */
mbed_official 548:1abac31e188e 132 {NC , NC , NC}
mbed_official 525:c320967f86b9 133 };
mbed_official 525:c320967f86b9 134
mbed_official 525:c320967f86b9 135 const PinMap PinMap_SPI_CLK[] = {
mbed_official 548:1abac31e188e 136 /* USART0 */
mbed_official 548:1abac31e188e 137 {PE12, SPI_0, 0},
mbed_official 548:1abac31e188e 138 {PE5, SPI_0, 1},
mbed_official 548:1abac31e188e 139 {PC9, SPI_0, 2},
mbed_official 548:1abac31e188e 140 {PB13, SPI_0, 5},
mbed_official 548:1abac31e188e 141 /* USART1 */
mbed_official 548:1abac31e188e 142 {PD2, SPI_1, 1},
mbed_official 548:1abac31e188e 143 {PF0, SPI_1, 2},
mbed_official 548:1abac31e188e 144 /* USART2 */
mbed_official 548:1abac31e188e 145 {PC4, SPI_2, 0},
mbed_official 548:1abac31e188e 146 {PB5, SPI_2, 1},
mbed_official 548:1abac31e188e 147 /* Not connected */
mbed_official 548:1abac31e188e 148 {NC , NC , NC}
mbed_official 525:c320967f86b9 149 };
mbed_official 525:c320967f86b9 150
mbed_official 525:c320967f86b9 151 const PinMap PinMap_SPI_CS[] = {
mbed_official 548:1abac31e188e 152 /* USART0 */
mbed_official 548:1abac31e188e 153 {PE13, SPI_0, 0},
mbed_official 548:1abac31e188e 154 {PE4, SPI_0, 1},
mbed_official 548:1abac31e188e 155 {PC8, SPI_0, 2},
mbed_official 548:1abac31e188e 156 {PB14, SPI_0, 5},
mbed_official 548:1abac31e188e 157 /* USART1 */
mbed_official 548:1abac31e188e 158 {PD3, SPI_1, 1},
mbed_official 548:1abac31e188e 159 {PF1, SPI_1, 2},
mbed_official 548:1abac31e188e 160 /* USART2 */
mbed_official 548:1abac31e188e 161 {PC5, SPI_2, 0},
mbed_official 548:1abac31e188e 162 {PB6, SPI_2, 1},
mbed_official 548:1abac31e188e 163 /* Not connected */
mbed_official 548:1abac31e188e 164 {NC , NC , NC}
mbed_official 525:c320967f86b9 165 };
mbed_official 525:c320967f86b9 166
mbed_official 525:c320967f86b9 167 /************UART**************/
mbed_official 525:c320967f86b9 168 const PinMap PinMap_UART_TX[] = {
mbed_official 548:1abac31e188e 169 /* UART0 */
mbed_official 548:1abac31e188e 170 {PF6, UART_0, 0},
mbed_official 548:1abac31e188e 171 {PE0, UART_0, 1},
mbed_official 548:1abac31e188e 172 /* UART1 */
mbed_official 548:1abac31e188e 173 {PF10, UART_1, 1},
mbed_official 548:1abac31e188e 174 {PB9, UART_1, 2},
mbed_official 548:1abac31e188e 175 {PE2, UART_1, 3},
mbed_official 548:1abac31e188e 176 /* USART0 */
mbed_official 548:1abac31e188e 177 {PE10, USART_0, 0},
mbed_official 548:1abac31e188e 178 {PE7, USART_0, 1},
mbed_official 548:1abac31e188e 179 {PC11, USART_0, 2},
mbed_official 548:1abac31e188e 180 {PE13, USART_0, 3},
mbed_official 548:1abac31e188e 181 {PB7, USART_0, 4},
mbed_official 548:1abac31e188e 182 /* USART1 */
mbed_official 548:1abac31e188e 183 {PC0, USART_1, 0},
mbed_official 548:1abac31e188e 184 {PD0, USART_1, 1},
mbed_official 548:1abac31e188e 185 {PD7, USART_1, 2},
mbed_official 548:1abac31e188e 186 /* USART2 */
mbed_official 548:1abac31e188e 187 {PC2, USART_2, 0},
mbed_official 548:1abac31e188e 188 {PB3, USART_2, 1},
mbed_official 548:1abac31e188e 189 /* LEUART0 */
mbed_official 548:1abac31e188e 190 {PD4, LEUART_0, 0},
mbed_official 548:1abac31e188e 191 {PB13, LEUART_0, 1},
mbed_official 548:1abac31e188e 192 {PE14, LEUART_0, 2},
mbed_official 548:1abac31e188e 193 {PF0, LEUART_0, 3},
mbed_official 548:1abac31e188e 194 {PF2, LEUART_0, 4},
mbed_official 548:1abac31e188e 195 /* LEUART1 */
mbed_official 548:1abac31e188e 196 {PC6, LEUART_1, 0},
mbed_official 548:1abac31e188e 197 {PA5, LEUART_1, 1},
mbed_official 548:1abac31e188e 198 /* Not connected */
mbed_official 548:1abac31e188e 199 {NC , NC , NC}
mbed_official 525:c320967f86b9 200 };
mbed_official 525:c320967f86b9 201
mbed_official 525:c320967f86b9 202 const PinMap PinMap_UART_RX[] = {
mbed_official 548:1abac31e188e 203 /* UART0 */
mbed_official 548:1abac31e188e 204 {PF7, UART_0, 0},
mbed_official 548:1abac31e188e 205 {PE1, UART_0, 1},
mbed_official 548:1abac31e188e 206 /* UART1 */
mbed_official 548:1abac31e188e 207 {PF11, UART_1, 1},
mbed_official 548:1abac31e188e 208 {PB10, UART_1, 2},
mbed_official 548:1abac31e188e 209 {PE3, UART_1, 3},
mbed_official 548:1abac31e188e 210 /* USART0 */
mbed_official 548:1abac31e188e 211 {PE11, USART_0, 0},
mbed_official 548:1abac31e188e 212 {PE6, USART_0, 1},
mbed_official 548:1abac31e188e 213 {PC10, USART_0, 2},
mbed_official 548:1abac31e188e 214 {PE12, USART_0, 3},
mbed_official 548:1abac31e188e 215 {PB8, USART_0, 4},
mbed_official 548:1abac31e188e 216 /* USART1 */
mbed_official 548:1abac31e188e 217 {PC1, USART_1, 0},
mbed_official 548:1abac31e188e 218 {PD1, USART_1, 1},
mbed_official 548:1abac31e188e 219 {PD6, USART_1, 2},
mbed_official 548:1abac31e188e 220 /* USART2 */
mbed_official 548:1abac31e188e 221 {PC3, USART_2, 0},
mbed_official 548:1abac31e188e 222 {PB4, USART_2, 1},
mbed_official 548:1abac31e188e 223 /* LEUART0 */
mbed_official 548:1abac31e188e 224 {PD5, LEUART_0, 0},
mbed_official 548:1abac31e188e 225 {PB14, LEUART_0, 1},
mbed_official 548:1abac31e188e 226 {PE15, LEUART_0, 2},
mbed_official 548:1abac31e188e 227 {PF1, LEUART_0, 3},
mbed_official 548:1abac31e188e 228 {PA0, LEUART_0, 4},
mbed_official 548:1abac31e188e 229 /* LEUART1 */
mbed_official 548:1abac31e188e 230 {PC7, LEUART_1, 0},
mbed_official 548:1abac31e188e 231 {PA6, LEUART_1, 1},
mbed_official 548:1abac31e188e 232 /* Not connected */
mbed_official 548:1abac31e188e 233 {NC , NC , NC}
mbed_official 525:c320967f86b9 234 };