mbed library sources modify the rtc/i2c

Dependents:   SSD1306_smart_watch

Fork of mbed-src by eunkyoung kim

Committer:
eunkyoungkim
Date:
Mon Jun 29 05:49:52 2015 +0000
Revision:
577:545d200432a1
Parent:
545:5112d5ae6723
modify the i2c.c/i2c.h

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mbed_official 545:5112d5ae6723 1 /* mbed Microcontroller Library
mbed_official 545:5112d5ae6723 2 *******************************************************************************
mbed_official 545:5112d5ae6723 3 * Copyright (c) 2015, STMicroelectronics
mbed_official 545:5112d5ae6723 4 * All rights reserved.
mbed_official 545:5112d5ae6723 5 *
mbed_official 545:5112d5ae6723 6 * Redistribution and use in source and binary forms, with or without
mbed_official 545:5112d5ae6723 7 * modification, are permitted provided that the following conditions are met:
mbed_official 545:5112d5ae6723 8 *
mbed_official 545:5112d5ae6723 9 * 1. Redistributions of source code must retain the above copyright notice,
mbed_official 545:5112d5ae6723 10 * this list of conditions and the following disclaimer.
mbed_official 545:5112d5ae6723 11 * 2. Redistributions in binary form must reproduce the above copyright notice,
mbed_official 545:5112d5ae6723 12 * this list of conditions and the following disclaimer in the documentation
mbed_official 545:5112d5ae6723 13 * and/or other materials provided with the distribution.
mbed_official 545:5112d5ae6723 14 * 3. Neither the name of STMicroelectronics nor the names of its contributors
mbed_official 545:5112d5ae6723 15 * may be used to endorse or promote products derived from this software
mbed_official 545:5112d5ae6723 16 * without specific prior written permission.
mbed_official 545:5112d5ae6723 17 *
mbed_official 545:5112d5ae6723 18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
mbed_official 545:5112d5ae6723 19 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
mbed_official 545:5112d5ae6723 20 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
mbed_official 545:5112d5ae6723 21 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
mbed_official 545:5112d5ae6723 22 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
mbed_official 545:5112d5ae6723 23 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
mbed_official 545:5112d5ae6723 24 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
mbed_official 545:5112d5ae6723 25 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
mbed_official 545:5112d5ae6723 26 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
mbed_official 545:5112d5ae6723 27 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
mbed_official 545:5112d5ae6723 28 *******************************************************************************
mbed_official 545:5112d5ae6723 29 */
mbed_official 545:5112d5ae6723 30
mbed_official 545:5112d5ae6723 31 #include "PeripheralPins.h"
mbed_official 545:5112d5ae6723 32
mbed_official 545:5112d5ae6723 33 // =====
mbed_official 545:5112d5ae6723 34 // Note: Commented lines are alternative possibilities which are not used per default.
mbed_official 545:5112d5ae6723 35 // If you change them, you will have also to modify the corresponding xxx_api.c file
mbed_official 545:5112d5ae6723 36 // for pwmout, analogin, analogout, ...
mbed_official 545:5112d5ae6723 37 // =====
mbed_official 545:5112d5ae6723 38
mbed_official 545:5112d5ae6723 39 //*** ADC ***
mbed_official 545:5112d5ae6723 40
mbed_official 545:5112d5ae6723 41 const PinMap PinMap_ADC[] = {
mbed_official 545:5112d5ae6723 42 {PA_0, ADC_1, STM_PIN_DATA(STM_MODE_ANALOG, GPIO_NOPULL, 0)}, // ADC_IN0
mbed_official 545:5112d5ae6723 43 {PA_1, ADC_1, STM_PIN_DATA(STM_MODE_ANALOG, GPIO_NOPULL, 0)}, // ADC_IN1
mbed_official 545:5112d5ae6723 44 {PA_2, ADC_1, STM_PIN_DATA(STM_MODE_ANALOG, GPIO_NOPULL, 0)}, // ADC_IN2
mbed_official 545:5112d5ae6723 45 {PA_3, ADC_1, STM_PIN_DATA(STM_MODE_ANALOG, GPIO_NOPULL, 0)}, // ADC_IN3
mbed_official 545:5112d5ae6723 46 {PA_4, ADC_1, STM_PIN_DATA(STM_MODE_ANALOG, GPIO_NOPULL, 0)}, // ADC_IN4
mbed_official 545:5112d5ae6723 47 {PA_5, ADC_1, STM_PIN_DATA(STM_MODE_ANALOG, GPIO_NOPULL, 0)}, // ADC_IN5
mbed_official 545:5112d5ae6723 48 {PA_6, ADC_1, STM_PIN_DATA(STM_MODE_ANALOG, GPIO_NOPULL, 0)}, // ADC_IN6
mbed_official 545:5112d5ae6723 49 {PA_7, ADC_1, STM_PIN_DATA(STM_MODE_ANALOG, GPIO_NOPULL, 0)}, // ADC_IN7
mbed_official 545:5112d5ae6723 50 {PB_0, ADC_1, STM_PIN_DATA(STM_MODE_ANALOG, GPIO_NOPULL, 0)}, // ADC_IN8
mbed_official 545:5112d5ae6723 51 {PB_1, ADC_1, STM_PIN_DATA(STM_MODE_ANALOG, GPIO_NOPULL, 0)}, // ADC_IN9
mbed_official 545:5112d5ae6723 52 {PB_12, ADC_1, STM_PIN_DATA(STM_MODE_ANALOG, GPIO_NOPULL, 0)}, // ADC_IN18
mbed_official 545:5112d5ae6723 53 {PB_13, ADC_1, STM_PIN_DATA(STM_MODE_ANALOG, GPIO_NOPULL, 0)}, // ADC_IN19
mbed_official 545:5112d5ae6723 54 {PB_14, ADC_1, STM_PIN_DATA(STM_MODE_ANALOG, GPIO_NOPULL, 0)}, // ADC_IN20
mbed_official 545:5112d5ae6723 55 {PB_15, ADC_1, STM_PIN_DATA(STM_MODE_ANALOG, GPIO_NOPULL, 0)}, // ADC_IN21
mbed_official 545:5112d5ae6723 56 {PC_0, ADC_1, STM_PIN_DATA(STM_MODE_ANALOG, GPIO_NOPULL, 0)}, // ADC_IN10
mbed_official 545:5112d5ae6723 57 {PC_1, ADC_1, STM_PIN_DATA(STM_MODE_ANALOG, GPIO_NOPULL, 0)}, // ADC_IN11
mbed_official 545:5112d5ae6723 58 {PC_2, ADC_1, STM_PIN_DATA(STM_MODE_ANALOG, GPIO_NOPULL, 0)}, // ADC_IN12
mbed_official 545:5112d5ae6723 59 {PC_3, ADC_1, STM_PIN_DATA(STM_MODE_ANALOG, GPIO_NOPULL, 0)}, // ADC_IN13
mbed_official 545:5112d5ae6723 60 {PC_4, ADC_1, STM_PIN_DATA(STM_MODE_ANALOG, GPIO_NOPULL, 0)}, // ADC_IN14
mbed_official 545:5112d5ae6723 61 {PC_5, ADC_1, STM_PIN_DATA(STM_MODE_ANALOG, GPIO_NOPULL, 0)}, // ADC_IN15
mbed_official 545:5112d5ae6723 62 {NC, NC, 0}
mbed_official 545:5112d5ae6723 63 };
mbed_official 545:5112d5ae6723 64
mbed_official 545:5112d5ae6723 65 //*** DAC ***
mbed_official 545:5112d5ae6723 66
mbed_official 545:5112d5ae6723 67 const PinMap PinMap_DAC[] = {
mbed_official 545:5112d5ae6723 68 {PA_4, DAC_1, STM_PIN_DATA(STM_MODE_ANALOG, GPIO_NOPULL, 0)}, // DAC_OUT1
mbed_official 545:5112d5ae6723 69 {PA_5, DAC_1, STM_PIN_DATA(STM_MODE_ANALOG, GPIO_NOPULL, 0)}, // DAC_OUT2 (Warning: LED1 is also on this pin)
mbed_official 545:5112d5ae6723 70 {NC, NC, 0}
mbed_official 545:5112d5ae6723 71 };
mbed_official 545:5112d5ae6723 72
mbed_official 545:5112d5ae6723 73 //*** I2C ***
mbed_official 545:5112d5ae6723 74
mbed_official 545:5112d5ae6723 75 const PinMap PinMap_I2C_SDA[] = {
mbed_official 545:5112d5ae6723 76 {PB_7, I2C_1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C1)},
mbed_official 545:5112d5ae6723 77 {PB_9, I2C_1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C1)},
mbed_official 545:5112d5ae6723 78 {PB_11, I2C_2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C2)},
mbed_official 545:5112d5ae6723 79 {NC, NC, 0}
mbed_official 545:5112d5ae6723 80 };
mbed_official 545:5112d5ae6723 81
mbed_official 545:5112d5ae6723 82 const PinMap PinMap_I2C_SCL[] = {
mbed_official 545:5112d5ae6723 83 {PB_6, I2C_1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C1)},
mbed_official 545:5112d5ae6723 84 {PB_8, I2C_1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C1)},
mbed_official 545:5112d5ae6723 85 {PB_10, I2C_2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C2)},
mbed_official 545:5112d5ae6723 86 {NC, NC, 0}
mbed_official 545:5112d5ae6723 87 };
mbed_official 545:5112d5ae6723 88
mbed_official 545:5112d5ae6723 89 //*** PWM ***
mbed_official 545:5112d5ae6723 90
mbed_official 545:5112d5ae6723 91 // TIM5 cannot be used because already used by the us_ticker.
mbed_official 545:5112d5ae6723 92 const PinMap PinMap_PWM[] = {
mbed_official 545:5112d5ae6723 93 // {PA_0, PWM_5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5)}, // TIM5_CH1
mbed_official 545:5112d5ae6723 94 {PA_1, PWM_2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2)}, // TIM2_CH2
mbed_official 545:5112d5ae6723 95 // {PA_1, PWM_5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5)}, // TIM5_CH1
mbed_official 545:5112d5ae6723 96 {PA_2, PWM_2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2)}, // TIM2_CH3
mbed_official 545:5112d5ae6723 97 // {PA_2, PWM_5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5)}, // TIM5_CH3
mbed_official 545:5112d5ae6723 98 // {PA_2, PWM_9, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM9)}, // TIM9_CH1
mbed_official 545:5112d5ae6723 99 {PA_3, PWM_2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2)}, // TIM2_CH4
mbed_official 545:5112d5ae6723 100 // {PA_3, PWM_5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5)}, // TIM5_CH4
mbed_official 545:5112d5ae6723 101 // {PA_3, PWM_9, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM9)}, // TIM9_CH2
mbed_official 545:5112d5ae6723 102 {PA_6, PWM_3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3)}, // TIM3_CH1
mbed_official 545:5112d5ae6723 103 // {PA_6, PWM_10, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM10)}, // TIM10_CH1
mbed_official 545:5112d5ae6723 104 {PA_7, PWM_3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3)}, // TIM3_CH2
mbed_official 545:5112d5ae6723 105 // {PA_7, PWM_11, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM11)}, // TIM11_CH1
mbed_official 545:5112d5ae6723 106 {PB_0, PWM_3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3)}, // TIM3_CH3
mbed_official 545:5112d5ae6723 107 {PB_1, PWM_3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3)}, // TIM3_CH4
mbed_official 545:5112d5ae6723 108 {PB_3, PWM_2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2)}, // TIM2_CH2
mbed_official 545:5112d5ae6723 109 {PB_4, PWM_3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3)}, // TIM3_CH1
mbed_official 545:5112d5ae6723 110 {PB_5, PWM_3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3)}, // TIM3_CH2
mbed_official 545:5112d5ae6723 111 {PB_6, PWM_4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4)}, // TIM4_CH1
mbed_official 545:5112d5ae6723 112 {PB_7, PWM_4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4)}, // TIM4_CH2
mbed_official 545:5112d5ae6723 113 {PB_8, PWM_4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4)}, // TIM4_CH3
mbed_official 545:5112d5ae6723 114 // {PB_8, PWM_10, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM10)}, // TIM10_CH1
mbed_official 545:5112d5ae6723 115 {PB_9, PWM_4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4)}, // TIM4_CH4
mbed_official 545:5112d5ae6723 116 // {PB_9, PWM_11, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM11)}, // TIM11_CH1
mbed_official 545:5112d5ae6723 117 {PB_10, PWM_2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2)}, // TIM2_CH3
mbed_official 545:5112d5ae6723 118 {PB_11, PWM_2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2)}, // TIM2_CH4
mbed_official 545:5112d5ae6723 119 {PB_12, PWM_10, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM10)}, // TIM10_CH1
mbed_official 545:5112d5ae6723 120 {PB_13, PWM_9, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM9)}, // TIM9_CH1
mbed_official 545:5112d5ae6723 121 {PB_14, PWM_9, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM9)}, // TIM9_CH2
mbed_official 545:5112d5ae6723 122 {PB_15, PWM_11, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM11)}, // TIM11_CH1
mbed_official 545:5112d5ae6723 123 {PC_6, PWM_3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3)}, // TIM3_CH1
mbed_official 545:5112d5ae6723 124 {PC_7, PWM_3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3)}, // TIM3_CH2
mbed_official 545:5112d5ae6723 125 {PC_8, PWM_3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3)}, // TIM3_CH3
mbed_official 545:5112d5ae6723 126 {PC_9, PWM_3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3)}, // TIM3_CH4
mbed_official 545:5112d5ae6723 127 {NC, NC, 0}
mbed_official 545:5112d5ae6723 128 };
mbed_official 545:5112d5ae6723 129
mbed_official 545:5112d5ae6723 130 //*** SERIAL ***
mbed_official 545:5112d5ae6723 131
mbed_official 545:5112d5ae6723 132 const PinMap PinMap_UART_TX[] = {
mbed_official 545:5112d5ae6723 133 {PA_2, UART_2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)},
mbed_official 545:5112d5ae6723 134 {PA_9, UART_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)},
mbed_official 545:5112d5ae6723 135 {PB_6, UART_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)},
mbed_official 545:5112d5ae6723 136 {PB_10, UART_3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)},
mbed_official 545:5112d5ae6723 137 {PC_10, UART_3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)},
mbed_official 545:5112d5ae6723 138 // {PC_10, UART_4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)},
mbed_official 545:5112d5ae6723 139 // {PC_12, UART_5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART5)},
mbed_official 545:5112d5ae6723 140 {NC, NC, 0}
mbed_official 545:5112d5ae6723 141 };
mbed_official 545:5112d5ae6723 142
mbed_official 545:5112d5ae6723 143 const PinMap PinMap_UART_RX[] = {
mbed_official 545:5112d5ae6723 144 {PA_3, UART_2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)},
mbed_official 545:5112d5ae6723 145 {PA_10, UART_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)},
mbed_official 545:5112d5ae6723 146 {PB_7, UART_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)},
mbed_official 545:5112d5ae6723 147 {PB_11, UART_3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)},
mbed_official 545:5112d5ae6723 148 {PC_11, UART_3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)},
mbed_official 545:5112d5ae6723 149 // {PC_11, UART_4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)},
mbed_official 545:5112d5ae6723 150 // {PD_2, UART_5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART5)},
mbed_official 545:5112d5ae6723 151 {NC, NC, 0}
mbed_official 545:5112d5ae6723 152 };
mbed_official 545:5112d5ae6723 153
mbed_official 545:5112d5ae6723 154 //*** SPI ***
mbed_official 545:5112d5ae6723 155
mbed_official 545:5112d5ae6723 156 const PinMap PinMap_SPI_MOSI[] = {
mbed_official 545:5112d5ae6723 157 {PA_7, SPI_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)},
mbed_official 545:5112d5ae6723 158 {PA_12, SPI_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)},
mbed_official 545:5112d5ae6723 159 {PB_5, SPI_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)},
mbed_official 545:5112d5ae6723 160 // {PB_5, SPI_3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)},
mbed_official 545:5112d5ae6723 161 {PB_15, SPI_2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)},
mbed_official 545:5112d5ae6723 162 {PC_12, SPI_3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)},
mbed_official 545:5112d5ae6723 163 {NC, NC, 0}
mbed_official 545:5112d5ae6723 164 };
mbed_official 545:5112d5ae6723 165
mbed_official 545:5112d5ae6723 166 const PinMap PinMap_SPI_MISO[] = {
mbed_official 545:5112d5ae6723 167 {PA_6, SPI_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)},
mbed_official 545:5112d5ae6723 168 {PA_11, SPI_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)},
mbed_official 545:5112d5ae6723 169 {PB_4, SPI_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)},
mbed_official 545:5112d5ae6723 170 // {PB_4, SPI_3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)},
mbed_official 545:5112d5ae6723 171 {PB_14, SPI_2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)},
mbed_official 545:5112d5ae6723 172 {PC_11, SPI_3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)},
mbed_official 545:5112d5ae6723 173 {NC, NC, 0}
mbed_official 545:5112d5ae6723 174 };
mbed_official 545:5112d5ae6723 175
mbed_official 545:5112d5ae6723 176 const PinMap PinMap_SPI_SCLK[] = {
mbed_official 545:5112d5ae6723 177 {PA_5, SPI_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)},
mbed_official 545:5112d5ae6723 178 {PB_3, SPI_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)},
mbed_official 545:5112d5ae6723 179 // {PB_3, SPI_3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)},
mbed_official 545:5112d5ae6723 180 {PB_13, SPI_2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)},
mbed_official 545:5112d5ae6723 181 {PC_10, SPI_3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)},
mbed_official 545:5112d5ae6723 182 {NC, NC, 0}
mbed_official 545:5112d5ae6723 183 };
mbed_official 545:5112d5ae6723 184
mbed_official 545:5112d5ae6723 185 const PinMap PinMap_SPI_SSEL[] = {
mbed_official 545:5112d5ae6723 186 {PA_4, SPI_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)},
mbed_official 545:5112d5ae6723 187 // {PA_4, SPI_3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)},
mbed_official 545:5112d5ae6723 188 {PA_15, SPI_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)},
mbed_official 545:5112d5ae6723 189 // {PA_15, SPI_3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)},
mbed_official 545:5112d5ae6723 190 {PB_12, SPI_2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)},
mbed_official 545:5112d5ae6723 191 {NC, NC, 0}
mbed_official 545:5112d5ae6723 192 };