mbed library sources change for ST sensors and ST BLE
Fork of mbed-src by
targets/hal/TARGET_STM/TARGET_NUCLEO_F411RE/PeripheralPins.c@406:7b834b41c730, 2014-11-18 (annotated)
- Committer:
- mbed_official
- Date:
- Tue Nov 18 10:30:06 2014 +0000
- Revision:
- 406:7b834b41c730
- Child:
- 414:4ec4c5b614b0
Synchronized with git revision 34eccbf435e41c79d1c9b64a1b395c692fd64445
Full URL: https://github.com/mbedmicro/mbed/commit/34eccbf435e41c79d1c9b64a1b395c692fd64445/
Targets: NUCLEO_F4xx - Add PeripheralPins.c/h file
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
mbed_official | 406:7b834b41c730 | 1 | /* mbed Microcontroller Library |
mbed_official | 406:7b834b41c730 | 2 | ******************************************************************************* |
mbed_official | 406:7b834b41c730 | 3 | * Copyright (c) 2014, STMicroelectronics |
mbed_official | 406:7b834b41c730 | 4 | * All rights reserved. |
mbed_official | 406:7b834b41c730 | 5 | * |
mbed_official | 406:7b834b41c730 | 6 | * Redistribution and use in source and binary forms, with or without |
mbed_official | 406:7b834b41c730 | 7 | * modification, are permitted provided that the following conditions are met: |
mbed_official | 406:7b834b41c730 | 8 | * |
mbed_official | 406:7b834b41c730 | 9 | * 1. Redistributions of source code must retain the above copyright notice, |
mbed_official | 406:7b834b41c730 | 10 | * this list of conditions and the following disclaimer. |
mbed_official | 406:7b834b41c730 | 11 | * 2. Redistributions in binary form must reproduce the above copyright notice, |
mbed_official | 406:7b834b41c730 | 12 | * this list of conditions and the following disclaimer in the documentation |
mbed_official | 406:7b834b41c730 | 13 | * and/or other materials provided with the distribution. |
mbed_official | 406:7b834b41c730 | 14 | * 3. Neither the name of STMicroelectronics nor the names of its contributors |
mbed_official | 406:7b834b41c730 | 15 | * may be used to endorse or promote products derived from this software |
mbed_official | 406:7b834b41c730 | 16 | * without specific prior written permission. |
mbed_official | 406:7b834b41c730 | 17 | * |
mbed_official | 406:7b834b41c730 | 18 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
mbed_official | 406:7b834b41c730 | 19 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
mbed_official | 406:7b834b41c730 | 20 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
mbed_official | 406:7b834b41c730 | 21 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE |
mbed_official | 406:7b834b41c730 | 22 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
mbed_official | 406:7b834b41c730 | 23 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
mbed_official | 406:7b834b41c730 | 24 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
mbed_official | 406:7b834b41c730 | 25 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
mbed_official | 406:7b834b41c730 | 26 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
mbed_official | 406:7b834b41c730 | 27 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
mbed_official | 406:7b834b41c730 | 28 | ******************************************************************************* |
mbed_official | 406:7b834b41c730 | 29 | */ |
mbed_official | 406:7b834b41c730 | 30 | |
mbed_official | 406:7b834b41c730 | 31 | #include "PeripheralPins.h" |
mbed_official | 406:7b834b41c730 | 32 | |
mbed_official | 406:7b834b41c730 | 33 | //*** ADC *** |
mbed_official | 406:7b834b41c730 | 34 | |
mbed_official | 406:7b834b41c730 | 35 | const PinMap PinMap_ADC[] = { |
mbed_official | 406:7b834b41c730 | 36 | {PA_0, ADC_1, STM_PIN_DATA(STM_MODE_ANALOG, GPIO_NOPULL, 0)}, // ADC1_IN0 |
mbed_official | 406:7b834b41c730 | 37 | {PA_1, ADC_1, STM_PIN_DATA(STM_MODE_ANALOG, GPIO_NOPULL, 0)}, // ADC1_IN1 |
mbed_official | 406:7b834b41c730 | 38 | {PA_2, ADC_1, STM_PIN_DATA(STM_MODE_ANALOG, GPIO_NOPULL, 0)}, // ADC1_IN2 |
mbed_official | 406:7b834b41c730 | 39 | {PA_3, ADC_1, STM_PIN_DATA(STM_MODE_ANALOG, GPIO_NOPULL, 0)}, // ADC1_IN3 |
mbed_official | 406:7b834b41c730 | 40 | {PA_4, ADC_1, STM_PIN_DATA(STM_MODE_ANALOG, GPIO_NOPULL, 0)}, // ADC1_IN4 |
mbed_official | 406:7b834b41c730 | 41 | {PA_5, ADC_1, STM_PIN_DATA(STM_MODE_ANALOG, GPIO_NOPULL, 0)}, // ADC1_IN5 |
mbed_official | 406:7b834b41c730 | 42 | {PA_6, ADC_1, STM_PIN_DATA(STM_MODE_ANALOG, GPIO_NOPULL, 0)}, // ADC1_IN6 |
mbed_official | 406:7b834b41c730 | 43 | {PA_7, ADC_1, STM_PIN_DATA(STM_MODE_ANALOG, GPIO_NOPULL, 0)}, // ADC1_IN7 |
mbed_official | 406:7b834b41c730 | 44 | {PB_0, ADC_1, STM_PIN_DATA(STM_MODE_ANALOG, GPIO_NOPULL, 0)}, // ADC1_IN8 |
mbed_official | 406:7b834b41c730 | 45 | {PB_1, ADC_1, STM_PIN_DATA(STM_MODE_ANALOG, GPIO_NOPULL, 0)}, // ADC1_IN9 |
mbed_official | 406:7b834b41c730 | 46 | {PC_0, ADC_1, STM_PIN_DATA(STM_MODE_ANALOG, GPIO_NOPULL, 0)}, // ADC1_IN10 |
mbed_official | 406:7b834b41c730 | 47 | {PC_1, ADC_1, STM_PIN_DATA(STM_MODE_ANALOG, GPIO_NOPULL, 0)}, // ADC1_IN11 |
mbed_official | 406:7b834b41c730 | 48 | {PC_2, ADC_1, STM_PIN_DATA(STM_MODE_ANALOG, GPIO_NOPULL, 0)}, // ADC1_IN12 |
mbed_official | 406:7b834b41c730 | 49 | {PC_3, ADC_1, STM_PIN_DATA(STM_MODE_ANALOG, GPIO_NOPULL, 0)}, // ADC1_IN13 |
mbed_official | 406:7b834b41c730 | 50 | {PC_4, ADC_1, STM_PIN_DATA(STM_MODE_ANALOG, GPIO_NOPULL, 0)}, // ADC1_IN14 |
mbed_official | 406:7b834b41c730 | 51 | {PC_5, ADC_1, STM_PIN_DATA(STM_MODE_ANALOG, GPIO_NOPULL, 0)}, // ADC1_IN15 |
mbed_official | 406:7b834b41c730 | 52 | {NC, NC, 0} |
mbed_official | 406:7b834b41c730 | 53 | }; |
mbed_official | 406:7b834b41c730 | 54 | |
mbed_official | 406:7b834b41c730 | 55 | //*** I2C *** |
mbed_official | 406:7b834b41c730 | 56 | |
mbed_official | 406:7b834b41c730 | 57 | const PinMap PinMap_I2C_SDA[] = { |
mbed_official | 406:7b834b41c730 | 58 | {PB_3, I2C_2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF9_I2C2)}, |
mbed_official | 406:7b834b41c730 | 59 | {PB_4, I2C_3, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF9_I2C3)}, |
mbed_official | 406:7b834b41c730 | 60 | {PB_7, I2C_1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C1)}, |
mbed_official | 406:7b834b41c730 | 61 | // {PB_8, I2C_3, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF9_I2C3)}, // Warning: also on SCL |
mbed_official | 406:7b834b41c730 | 62 | {PB_9, I2C_1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C1)}, // ARDUINO |
mbed_official | 406:7b834b41c730 | 63 | // {PB_9, I2C_2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF9_I2C2)}, |
mbed_official | 406:7b834b41c730 | 64 | {PC_9, I2C_3, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C3)}, |
mbed_official | 406:7b834b41c730 | 65 | {NC, NC, 0} |
mbed_official | 406:7b834b41c730 | 66 | }; |
mbed_official | 406:7b834b41c730 | 67 | |
mbed_official | 406:7b834b41c730 | 68 | const PinMap PinMap_I2C_SCL[] = { |
mbed_official | 406:7b834b41c730 | 69 | {PA_8, I2C_3, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C3)}, |
mbed_official | 406:7b834b41c730 | 70 | {PB_6, I2C_1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C1)}, |
mbed_official | 406:7b834b41c730 | 71 | {PB_8, I2C_1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C1)}, // ARDUINO |
mbed_official | 406:7b834b41c730 | 72 | {PB_10, I2C_2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C2)}, |
mbed_official | 406:7b834b41c730 | 73 | {NC, NC, 0} |
mbed_official | 406:7b834b41c730 | 74 | }; |
mbed_official | 406:7b834b41c730 | 75 | |
mbed_official | 406:7b834b41c730 | 76 | //*** PWM *** |
mbed_official | 406:7b834b41c730 | 77 | |
mbed_official | 406:7b834b41c730 | 78 | // TIM5 cannot be used because already used by the us_ticker |
mbed_official | 406:7b834b41c730 | 79 | const PinMap PinMap_PWM[] = { |
mbed_official | 406:7b834b41c730 | 80 | {PA_0, PWM_2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2)}, // TIM2_CH1 |
mbed_official | 406:7b834b41c730 | 81 | // {PA_0, PWM_5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5)}, // TIM5_CH1 |
mbed_official | 406:7b834b41c730 | 82 | {PA_1, PWM_2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2)}, // TIM2_CH2 |
mbed_official | 406:7b834b41c730 | 83 | // {PA_1, PWM_5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5)}, // TIM5_CH2 |
mbed_official | 406:7b834b41c730 | 84 | {PA_2, PWM_2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2)}, // TIM2_CH3 |
mbed_official | 406:7b834b41c730 | 85 | // {PA_2, PWM_5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5)}, // TIM5_CH3 |
mbed_official | 406:7b834b41c730 | 86 | // {PA_2, PWM_9, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM9)}, // TIM9_CH1 |
mbed_official | 406:7b834b41c730 | 87 | {PA_3, PWM_2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2)}, // TIM2_CH4 |
mbed_official | 406:7b834b41c730 | 88 | // {PA_3, PWM_5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5)}, // TIM5_CH4 |
mbed_official | 406:7b834b41c730 | 89 | // {PA_3, PWM_9, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM9)}, // TIM9_CH2 |
mbed_official | 406:7b834b41c730 | 90 | {PA_5, PWM_2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2)}, // TIM2_CH1 |
mbed_official | 406:7b834b41c730 | 91 | {PA_6, PWM_3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3)}, // TIM3_CH1 |
mbed_official | 406:7b834b41c730 | 92 | {PA_7, PWM_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1)}, // TIM1_CH1N - ARDUINO |
mbed_official | 406:7b834b41c730 | 93 | // {PA_7, PWM_3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3)}, // TIM3_CH2 - ARDUINO |
mbed_official | 406:7b834b41c730 | 94 | {PA_8, PWM_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1)}, // TIM1_CH1 |
mbed_official | 406:7b834b41c730 | 95 | {PA_9, PWM_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1)}, // TIM1_CH2 |
mbed_official | 406:7b834b41c730 | 96 | {PA_10, PWM_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1)}, // TIM1_CH3 |
mbed_official | 406:7b834b41c730 | 97 | {PA_11, PWM_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1)}, // TIM1_CH4 |
mbed_official | 406:7b834b41c730 | 98 | {PA_15, PWM_2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2)}, // TIM2_CH1 |
mbed_official | 406:7b834b41c730 | 99 | |
mbed_official | 406:7b834b41c730 | 100 | {PB_0, PWM_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1)}, // TIM1_CH2N |
mbed_official | 406:7b834b41c730 | 101 | // {PB_0, PWM_3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3)}, // TIM3_CH3 |
mbed_official | 406:7b834b41c730 | 102 | {PB_1, PWM_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1)}, // TIM1_CH3N |
mbed_official | 406:7b834b41c730 | 103 | // {PB_1, PWM_3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3)}, // TIM3_CH4 |
mbed_official | 406:7b834b41c730 | 104 | {PB_3, PWM_2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2)}, // TIM2_CH2 - ARDUINO |
mbed_official | 406:7b834b41c730 | 105 | {PB_4, PWM_3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3)}, // TIM3_CH1 - ARDUINO |
mbed_official | 406:7b834b41c730 | 106 | {PB_5, PWM_3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3)}, // TIM3_CH2 |
mbed_official | 406:7b834b41c730 | 107 | {PB_6, PWM_4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4)}, // TIM4_CH1 - ARDUINO |
mbed_official | 406:7b834b41c730 | 108 | {PB_7, PWM_4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4)}, // TIM4_CH2 |
mbed_official | 406:7b834b41c730 | 109 | {PB_8, PWM_4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4)}, // TIM4_CH3 |
mbed_official | 406:7b834b41c730 | 110 | // {PB_8, PWM_10,STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM10)}, // TIM10_CH1 |
mbed_official | 406:7b834b41c730 | 111 | {PB_9, PWM_4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4)}, // TIM4_CH4 |
mbed_official | 406:7b834b41c730 | 112 | // {PB_9, PWM_11,STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM11)}, // TIM11_CH1 |
mbed_official | 406:7b834b41c730 | 113 | {PB_10, PWM_2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2)}, // TIM2_CH3 - ARDUINO |
mbed_official | 406:7b834b41c730 | 114 | {PB_13, PWM_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1)}, // TIM1_CH1N |
mbed_official | 406:7b834b41c730 | 115 | {PB_14, PWM_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1)}, // TIM1_CH2N |
mbed_official | 406:7b834b41c730 | 116 | {PB_15, PWM_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1)}, // TIM1_CH3N |
mbed_official | 406:7b834b41c730 | 117 | |
mbed_official | 406:7b834b41c730 | 118 | {PC_6, PWM_3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3)}, // TIM3_CH1 |
mbed_official | 406:7b834b41c730 | 119 | {PC_7, PWM_3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3)}, // TIM3_CH2 - ARDUINO |
mbed_official | 406:7b834b41c730 | 120 | {PC_8, PWM_3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3)}, // TIM3_CH3 |
mbed_official | 406:7b834b41c730 | 121 | {PC_9, PWM_3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3)}, // TIM3_CH4 |
mbed_official | 406:7b834b41c730 | 122 | |
mbed_official | 406:7b834b41c730 | 123 | {NC, NC, 0} |
mbed_official | 406:7b834b41c730 | 124 | }; |
mbed_official | 406:7b834b41c730 | 125 | |
mbed_official | 406:7b834b41c730 | 126 | //*** SERIAL *** |
mbed_official | 406:7b834b41c730 | 127 | |
mbed_official | 406:7b834b41c730 | 128 | const PinMap PinMap_UART_TX[] = { |
mbed_official | 406:7b834b41c730 | 129 | {PA_2, UART_2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, |
mbed_official | 406:7b834b41c730 | 130 | {PA_9, UART_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, |
mbed_official | 406:7b834b41c730 | 131 | {PA_11, UART_6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_USART6)}, |
mbed_official | 406:7b834b41c730 | 132 | {PA_15, UART_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, |
mbed_official | 406:7b834b41c730 | 133 | {PB_6, UART_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, |
mbed_official | 406:7b834b41c730 | 134 | {PC_6, UART_6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_USART6)}, |
mbed_official | 406:7b834b41c730 | 135 | {NC, NC, 0} |
mbed_official | 406:7b834b41c730 | 136 | }; |
mbed_official | 406:7b834b41c730 | 137 | |
mbed_official | 406:7b834b41c730 | 138 | const PinMap PinMap_UART_RX[] = { |
mbed_official | 406:7b834b41c730 | 139 | {PA_3, UART_2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, |
mbed_official | 406:7b834b41c730 | 140 | {PA_10, UART_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, |
mbed_official | 406:7b834b41c730 | 141 | {PA_12, UART_6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_USART6)}, |
mbed_official | 406:7b834b41c730 | 142 | {PB_3, UART_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, |
mbed_official | 406:7b834b41c730 | 143 | {PB_7, UART_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, |
mbed_official | 406:7b834b41c730 | 144 | {PC_7, UART_6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_USART6)}, |
mbed_official | 406:7b834b41c730 | 145 | {NC, NC, 0} |
mbed_official | 406:7b834b41c730 | 146 | }; |
mbed_official | 406:7b834b41c730 | 147 | |
mbed_official | 406:7b834b41c730 | 148 | //*** SPI *** |
mbed_official | 406:7b834b41c730 | 149 | |
mbed_official | 406:7b834b41c730 | 150 | const PinMap PinMap_SPI_MOSI[] = { |
mbed_official | 406:7b834b41c730 | 151 | {PA_1, SPI_4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI4)}, |
mbed_official | 406:7b834b41c730 | 152 | {PA_7, SPI_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, // ARDUINO |
mbed_official | 406:7b834b41c730 | 153 | {PA_10, SPI_5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI5)}, |
mbed_official | 406:7b834b41c730 | 154 | // {PB_5, SPI_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, |
mbed_official | 406:7b834b41c730 | 155 | {PB_5, SPI_3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, |
mbed_official | 406:7b834b41c730 | 156 | {PB_8, SPI_5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI5)}, |
mbed_official | 406:7b834b41c730 | 157 | {PB_15, SPI_2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, |
mbed_official | 406:7b834b41c730 | 158 | {PC_3, SPI_2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, |
mbed_official | 406:7b834b41c730 | 159 | {PC_12, SPI_3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, |
mbed_official | 406:7b834b41c730 | 160 | {NC, NC, 0} |
mbed_official | 406:7b834b41c730 | 161 | }; |
mbed_official | 406:7b834b41c730 | 162 | |
mbed_official | 406:7b834b41c730 | 163 | const PinMap PinMap_SPI_MISO[] = { |
mbed_official | 406:7b834b41c730 | 164 | {PA_6, SPI_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, // ARDUINO |
mbed_official | 406:7b834b41c730 | 165 | {PA_11, SPI_4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI4)}, |
mbed_official | 406:7b834b41c730 | 166 | {PA_12, SPI_5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI5)}, |
mbed_official | 406:7b834b41c730 | 167 | // {PB_4, SPI_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, |
mbed_official | 406:7b834b41c730 | 168 | {PB_4, SPI_3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, |
mbed_official | 406:7b834b41c730 | 169 | {PB_14, SPI_2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, |
mbed_official | 406:7b834b41c730 | 170 | {PC_2, SPI_2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, |
mbed_official | 406:7b834b41c730 | 171 | {PC_11, SPI_3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, |
mbed_official | 406:7b834b41c730 | 172 | {NC, NC, 0} |
mbed_official | 406:7b834b41c730 | 173 | }; |
mbed_official | 406:7b834b41c730 | 174 | |
mbed_official | 406:7b834b41c730 | 175 | const PinMap PinMap_SPI_SCLK[] = { |
mbed_official | 406:7b834b41c730 | 176 | {PA_5, SPI_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, // ARDUINO |
mbed_official | 406:7b834b41c730 | 177 | {PB_0, SPI_5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI5)}, |
mbed_official | 406:7b834b41c730 | 178 | // {PB_3, SPI_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, |
mbed_official | 406:7b834b41c730 | 179 | {PB_3, SPI_3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, |
mbed_official | 406:7b834b41c730 | 180 | {PB_10, SPI_2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, |
mbed_official | 406:7b834b41c730 | 181 | // {PB_12, SPI_3, STM_PIN_DATA(STM_MODE_INPUT, GPIO_NOPULL, GPIO_AF7_SPI3)}, // Warning: also on NSS |
mbed_official | 406:7b834b41c730 | 182 | {PB_13, SPI_2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, |
mbed_official | 406:7b834b41c730 | 183 | // {PB_13, SPI_4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI4)}, |
mbed_official | 406:7b834b41c730 | 184 | {PC_7, SPI_2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, |
mbed_official | 406:7b834b41c730 | 185 | {PC_10, SPI_3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, |
mbed_official | 406:7b834b41c730 | 186 | {NC, NC, 0} |
mbed_official | 406:7b834b41c730 | 187 | }; |
mbed_official | 406:7b834b41c730 | 188 | |
mbed_official | 406:7b834b41c730 | 189 | const PinMap PinMap_SPI_SSEL[] = { |
mbed_official | 406:7b834b41c730 | 190 | {PA_4, SPI_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF5_SPI1)}, |
mbed_official | 406:7b834b41c730 | 191 | // {PA_4, SPI_3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF6_SPI3)}, |
mbed_official | 406:7b834b41c730 | 192 | {PA_15, SPI_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF5_SPI1)}, |
mbed_official | 406:7b834b41c730 | 193 | // {PA_15, SPI_3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF6_SPI3)}, |
mbed_official | 406:7b834b41c730 | 194 | {PB_1, SPI_5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI5)}, |
mbed_official | 406:7b834b41c730 | 195 | {PB_9, SPI_2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF5_SPI2)}, |
mbed_official | 406:7b834b41c730 | 196 | {PB_12, SPI_2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF5_SPI2)}, // Warning: also on SCLK |
mbed_official | 406:7b834b41c730 | 197 | // {PB_12, SPI_4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF6_SPI4)}, // Warning: also on SCLK |
mbed_official | 406:7b834b41c730 | 198 | {NC, NC, 0} |
mbed_official | 406:7b834b41c730 | 199 | }; |