Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: Nucleo_Hello_Encoder BLE_iBeaconScan AM1805_DEMO DISCO-F429ZI_ExportTemplate1 ... more
targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F437xG/TARGET_UBLOX_C030/PeripheralPins.c@162:e13f6fdb2ac4, 2017-04-12 (annotated)
- Committer:
- <>
- Date:
- Wed Apr 12 16:21:43 2017 +0100
- Revision:
- 162:e13f6fdb2ac4
- Child:
- 163:74e0ce7f98e8
This updates the lib to the mbed lib v140
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| <> | 162:e13f6fdb2ac4 | 1 | /* mbed Microcontroller Library |
| <> | 162:e13f6fdb2ac4 | 2 | ******************************************************************************* |
| <> | 162:e13f6fdb2ac4 | 3 | * Copyright (c) 2014, STMicroelectronics |
| <> | 162:e13f6fdb2ac4 | 4 | * All rights reserved. |
| <> | 162:e13f6fdb2ac4 | 5 | * |
| <> | 162:e13f6fdb2ac4 | 6 | * Redistribution and use in source and binary forms, with or without |
| <> | 162:e13f6fdb2ac4 | 7 | * modification, are permitted provided that the following conditions are met: |
| <> | 162:e13f6fdb2ac4 | 8 | * |
| <> | 162:e13f6fdb2ac4 | 9 | * 1. Redistributions of source code must retain the above copyright notice, |
| <> | 162:e13f6fdb2ac4 | 10 | * this list of conditions and the following disclaimer. |
| <> | 162:e13f6fdb2ac4 | 11 | * 2. Redistributions in binary form must reproduce the above copyright notice, |
| <> | 162:e13f6fdb2ac4 | 12 | * this list of conditions and the following disclaimer in the documentation |
| <> | 162:e13f6fdb2ac4 | 13 | * and/or other materials provided with the distribution. |
| <> | 162:e13f6fdb2ac4 | 14 | * 3. Neither the name of STMicroelectronics nor the names of its contributors |
| <> | 162:e13f6fdb2ac4 | 15 | * may be used to endorse or promote products derived from this software |
| <> | 162:e13f6fdb2ac4 | 16 | * without specific prior written permission. |
| <> | 162:e13f6fdb2ac4 | 17 | * |
| <> | 162:e13f6fdb2ac4 | 18 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
| <> | 162:e13f6fdb2ac4 | 19 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
| <> | 162:e13f6fdb2ac4 | 20 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
| <> | 162:e13f6fdb2ac4 | 21 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE |
| <> | 162:e13f6fdb2ac4 | 22 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
| <> | 162:e13f6fdb2ac4 | 23 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
| <> | 162:e13f6fdb2ac4 | 24 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
| <> | 162:e13f6fdb2ac4 | 25 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
| <> | 162:e13f6fdb2ac4 | 26 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| <> | 162:e13f6fdb2ac4 | 27 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| <> | 162:e13f6fdb2ac4 | 28 | ******************************************************************************* |
| <> | 162:e13f6fdb2ac4 | 29 | */ |
| <> | 162:e13f6fdb2ac4 | 30 | |
| <> | 162:e13f6fdb2ac4 | 31 | #include "PeripheralPins.h" |
| <> | 162:e13f6fdb2ac4 | 32 | // ===== |
| <> | 162:e13f6fdb2ac4 | 33 | // Note: Commented lines are alternative possibilities which are not used per default. |
| <> | 162:e13f6fdb2ac4 | 34 | // If you change them, you will have also to modify the corresponding xxx_api.c file |
| <> | 162:e13f6fdb2ac4 | 35 | // for pwmout, analogin, analogout, ... |
| <> | 162:e13f6fdb2ac4 | 36 | // ===== |
| <> | 162:e13f6fdb2ac4 | 37 | |
| <> | 162:e13f6fdb2ac4 | 38 | //*** ADC *** |
| <> | 162:e13f6fdb2ac4 | 39 | |
| <> | 162:e13f6fdb2ac4 | 40 | const PinMap PinMap_ADC[] = { |
| <> | 162:e13f6fdb2ac4 | 41 | {PA_3, ADC_1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 3, 0)}, // ADC1_IN3 |
| <> | 162:e13f6fdb2ac4 | 42 | {PA_4, ADC_1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 4, 0)}, // ADC1_IN4 |
| <> | 162:e13f6fdb2ac4 | 43 | {PA_6, ADC_1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 6, 0)}, // ADC1_IN6 |
| <> | 162:e13f6fdb2ac4 | 44 | {PB_0, ADC_1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 8, 0)}, // ADC1_IN8 |
| <> | 162:e13f6fdb2ac4 | 45 | {PC_0, ADC_1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 10, 0)}, // ADC1_IN10 |
| <> | 162:e13f6fdb2ac4 | 46 | {PC_3, ADC_1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 13, 0)}, // ADC1_IN13 |
| <> | 162:e13f6fdb2ac4 | 47 | {NC, NC, 0} |
| <> | 162:e13f6fdb2ac4 | 48 | }; |
| <> | 162:e13f6fdb2ac4 | 49 | |
| <> | 162:e13f6fdb2ac4 | 50 | //*** I2C *** |
| <> | 162:e13f6fdb2ac4 | 51 | |
| <> | 162:e13f6fdb2ac4 | 52 | |
| <> | 162:e13f6fdb2ac4 | 53 | const PinMap PinMap_I2C_SDA[] = { |
| <> | 162:e13f6fdb2ac4 | 54 | {PB_7, I2C_1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C1)}, |
| <> | 162:e13f6fdb2ac4 | 55 | {PC_9, I2C_3, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C3)}, |
| <> | 162:e13f6fdb2ac4 | 56 | {NC, NC, 0} |
| <> | 162:e13f6fdb2ac4 | 57 | }; |
| <> | 162:e13f6fdb2ac4 | 58 | |
| <> | 162:e13f6fdb2ac4 | 59 | const PinMap PinMap_I2C_SCL[] = { |
| <> | 162:e13f6fdb2ac4 | 60 | {PB_6, I2C_1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C1)}, |
| <> | 162:e13f6fdb2ac4 | 61 | {PA_8, I2C_3, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C3)}, |
| <> | 162:e13f6fdb2ac4 | 62 | {NC, NC, 0} |
| <> | 162:e13f6fdb2ac4 | 63 | }; |
| <> | 162:e13f6fdb2ac4 | 64 | |
| <> | 162:e13f6fdb2ac4 | 65 | const PinMap PinMap_DAC[] = { |
| <> | 162:e13f6fdb2ac4 | 66 | {PA_5, DAC_1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // DAC_OUT2 - ARDUINO D13 |
| <> | 162:e13f6fdb2ac4 | 67 | {NC, NC, 0} |
| <> | 162:e13f6fdb2ac4 | 68 | }; |
| <> | 162:e13f6fdb2ac4 | 69 | |
| <> | 162:e13f6fdb2ac4 | 70 | //*** PWM *** |
| <> | 162:e13f6fdb2ac4 | 71 | |
| <> | 162:e13f6fdb2ac4 | 72 | const PinMap PinMap_PWM[] = { |
| <> | 162:e13f6fdb2ac4 | 73 | {PE_13, PWM_1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 3, 0)}, // TIM1_CH3 |
| <> | 162:e13f6fdb2ac4 | 74 | {PE_9, PWM_1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 1, 0)}, // TIM1_CH1N |
| <> | 162:e13f6fdb2ac4 | 75 | {PB_1, PWM_3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 4, 0)}, // TIM3_CH4 |
| <> | 162:e13f6fdb2ac4 | 76 | {PD_12, PWM_4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 1, 0)}, // TIM4_CH1 |
| <> | 162:e13f6fdb2ac4 | 77 | {PB_8, PWM_10, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM10, 1, 0)}, // TIM10_CH1 |
| <> | 162:e13f6fdb2ac4 | 78 | {PB_15, PWM_12, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_TIM12, 2, 0)}, // TIM12_CH2 |
| <> | 162:e13f6fdb2ac4 | 79 | {NC, NC, 0} |
| <> | 162:e13f6fdb2ac4 | 80 | }; |
| <> | 162:e13f6fdb2ac4 | 81 | |
| <> | 162:e13f6fdb2ac4 | 82 | //*** SERIAL *** |
| <> | 162:e13f6fdb2ac4 | 83 | |
| <> | 162:e13f6fdb2ac4 | 84 | const PinMap PinMap_UART_TX[] = { |
| <> | 162:e13f6fdb2ac4 | 85 | {PA_9, UART_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, |
| <> | 162:e13f6fdb2ac4 | 86 | {PD_5, UART_2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, |
| <> | 162:e13f6fdb2ac4 | 87 | {PD_9, UART_3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, |
| <> | 162:e13f6fdb2ac4 | 88 | {PC_6, UART_6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_USART6)}, |
| <> | 162:e13f6fdb2ac4 | 89 | {NC, NC, 0} |
| <> | 162:e13f6fdb2ac4 | 90 | }; |
| <> | 162:e13f6fdb2ac4 | 91 | |
| <> | 162:e13f6fdb2ac4 | 92 | const PinMap PinMap_UART_RX[] = { |
| <> | 162:e13f6fdb2ac4 | 93 | {PA_10, UART_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, |
| <> | 162:e13f6fdb2ac4 | 94 | {PD_6, UART_2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, |
| <> | 162:e13f6fdb2ac4 | 95 | {PD_8, UART_3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, |
| <> | 162:e13f6fdb2ac4 | 96 | {PC_7, UART_6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_USART6)}, |
| <> | 162:e13f6fdb2ac4 | 97 | {NC, NC, 0} |
| <> | 162:e13f6fdb2ac4 | 98 | }; |
| <> | 162:e13f6fdb2ac4 | 99 | |
| <> | 162:e13f6fdb2ac4 | 100 | //*** SPI *** |
| <> | 162:e13f6fdb2ac4 | 101 | |
| <> | 162:e13f6fdb2ac4 | 102 | const PinMap PinMap_SPI_MOSI[] = { |
| <> | 162:e13f6fdb2ac4 | 103 | {PE_6, SPI_4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI4)}, |
| <> | 162:e13f6fdb2ac4 | 104 | {NC, NC, 0} |
| <> | 162:e13f6fdb2ac4 | 105 | }; |
| <> | 162:e13f6fdb2ac4 | 106 | |
| <> | 162:e13f6fdb2ac4 | 107 | const PinMap PinMap_SPI_MISO[] = { |
| <> | 162:e13f6fdb2ac4 | 108 | {PE_5, SPI_4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI4)}, |
| <> | 162:e13f6fdb2ac4 | 109 | {NC, NC, 0} |
| <> | 162:e13f6fdb2ac4 | 110 | }; |
| <> | 162:e13f6fdb2ac4 | 111 | |
| <> | 162:e13f6fdb2ac4 | 112 | const PinMap PinMap_SPI_SCLK[] = { |
| <> | 162:e13f6fdb2ac4 | 113 | {PE_2, SPI_4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI4)}, |
| <> | 162:e13f6fdb2ac4 | 114 | {NC, NC, 0} |
| <> | 162:e13f6fdb2ac4 | 115 | }; |
| <> | 162:e13f6fdb2ac4 | 116 | |
| <> | 162:e13f6fdb2ac4 | 117 | const PinMap PinMap_SPI_SSEL[] = { |
| <> | 162:e13f6fdb2ac4 | 118 | {PE_11, SPI_4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF5_SPI4)}, |
| <> | 162:e13f6fdb2ac4 | 119 | {NC, NC, 0} |
| <> | 162:e13f6fdb2ac4 | 120 | }; |


