2016-12-21 16:56:20 +08:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2017 RnDity Sp. z o.o.
|
|
|
|
*
|
2017-01-19 23:38:51 +08:00
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
2016-12-21 16:56:20 +08:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _STM32F3_PINMUX_H_
|
|
|
|
#define _STM32F3_PINMUX_H_
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @file Header for STM32F3 pin multiplexing helper
|
|
|
|
*/
|
|
|
|
|
2017-10-27 23:11:22 +08:00
|
|
|
#define STM32F3_PINMUX_FUNC_PA9_USART1_TX (STM32_PINMUX_ALT_FUNC_7 | STM32_PUSHPULL_PULLUP)
|
|
|
|
#define STM32F3_PINMUX_FUNC_PA10_USART1_RX (STM32_PINMUX_ALT_FUNC_7 | STM32_PUSHPULL_PULLUP)
|
2016-12-21 16:56:20 +08:00
|
|
|
|
2017-10-27 23:11:22 +08:00
|
|
|
#define STM32F3_PINMUX_FUNC_PC4_USART1_TX (STM32_PINMUX_ALT_FUNC_7 | STM32_PUSHPULL_PULLUP)
|
|
|
|
#define STM32F3_PINMUX_FUNC_PC5_USART1_RX (STM32_PINMUX_ALT_FUNC_7 | STM32_PUSHPULL_PULLUP)
|
2017-09-07 19:55:08 +08:00
|
|
|
|
2017-10-27 23:11:22 +08:00
|
|
|
#define STM32F3_PINMUX_FUNC_PA2_USART2_TX (STM32_PINMUX_ALT_FUNC_7 | STM32_PUSHPULL_PULLUP)
|
|
|
|
#define STM32F3_PINMUX_FUNC_PA3_USART2_RX (STM32_PINMUX_ALT_FUNC_7 | STM32_PUSHPULL_PULLUP)
|
2016-12-21 16:56:20 +08:00
|
|
|
|
|
|
|
#ifndef CONFIG_SOC_STM32F334X8
|
2017-10-27 23:11:22 +08:00
|
|
|
#define STM32F3_PINMUX_FUNC_PD5_USART2_TX (STM32_PINMUX_ALT_FUNC_7 | STM32_PUSHPULL_PULLUP)
|
|
|
|
#define STM32F3_PINMUX_FUNC_PD6_USART2_RX (STM32_PINMUX_ALT_FUNC_7 | STM32_PUSHPULL_PULLUP)
|
2016-12-21 16:56:20 +08:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#if CONFIG_SOC_STM32F303XC
|
2017-12-05 02:56:02 +08:00
|
|
|
#define STM32F3_PINMUX_FUNC_PA9_I2C2_SCL (STM32_PINMUX_ALT_FUNC_4 | STM32_OPENDRAIN_PULLUP)
|
|
|
|
#define STM32F3_PINMUX_FUNC_PA10_I2C2_SDA (STM32_PINMUX_ALT_FUNC_4 | STM32_OPENDRAIN_PULLUP)
|
2017-07-26 00:59:23 +08:00
|
|
|
#define STM32F3_PINMUX_FUNC_PB6_I2C1_SCL (STM32_PINMUX_ALT_FUNC_4 | STM32_OPENDRAIN_PULLUP)
|
|
|
|
#define STM32F3_PINMUX_FUNC_PB7_I2C1_SDA (STM32_PINMUX_ALT_FUNC_4 | STM32_OPENDRAIN_PULLUP)
|
2017-10-27 23:11:22 +08:00
|
|
|
#define STM32F3_PINMUX_FUNC_PB10_USART3_TX (STM32_PINMUX_ALT_FUNC_7 | STM32_PUSHPULL_PULLUP)
|
|
|
|
#define STM32F3_PINMUX_FUNC_PB11_USART3_RX (STM32_PINMUX_ALT_FUNC_7 | STM32_PUSHPULL_PULLUP)
|
2017-07-26 00:59:23 +08:00
|
|
|
#define STM32F3_PINMUX_FUNC_PF0_I2C2_SDA (STM32_PINMUX_ALT_FUNC_4 | STM32_OPENDRAIN_PULLUP)
|
|
|
|
#define STM32F3_PINMUX_FUNC_PF1_I2C2_SCL (STM32_PINMUX_ALT_FUNC_4 | STM32_OPENDRAIN_PULLUP)
|
2016-12-21 16:56:20 +08:00
|
|
|
#elif CONFIG_SOC_STM32F334X8
|
2017-10-27 23:11:22 +08:00
|
|
|
#define STM32F3_PINMUX_FUNC_PB8_USART3_RX (STM32_PINMUX_ALT_FUNC_7 | STM32_PUSHPULL_PULLUP)
|
|
|
|
#define STM32F3_PINMUX_FUNC_PB9_USART3_TX (STM32_PINMUX_ALT_FUNC_7 | STM32_PUSHPULL_PULLUP)
|
|
|
|
#define STM32F3_PINMUX_FUNC_PB10_USART3_TX (STM32_PINMUX_ALT_FUNC_7 | STM32_PUSHPULL_PULLUP)
|
|
|
|
#define STM32F3_PINMUX_FUNC_PB11_USART3_RX (STM32_PINMUX_ALT_FUNC_7 | STM32_PUSHPULL_PULLUP)
|
2016-12-21 16:56:20 +08:00
|
|
|
#elif CONFIG_SOC_STM32F373XC
|
2017-10-27 23:11:22 +08:00
|
|
|
#define STM32F3_PINMUX_FUNC_PB8_USART3_TX (STM32_PINMUX_ALT_FUNC_7 | STM32_PUSHPULL_PULLUP)
|
|
|
|
#define STM32F3_PINMUX_FUNC_PB9_USART3_RX (STM32_PINMUX_ALT_FUNC_7 | STM32_PUSHPULL_PULLUP)
|
|
|
|
#define STM32F3_PINMUX_FUNC_PB10_USART3_TX (STM32_PINMUX_ALT_FUNC_7 | STM32_PUSHPULL_PULLUP)
|
2016-12-21 16:56:20 +08:00
|
|
|
#endif
|
|
|
|
|
2017-10-27 23:11:22 +08:00
|
|
|
#define STM32F3_PINMUX_FUNC_PA4_SPI1_NSS (STM32_PINMUX_ALT_FUNC_5 | STM32_PUSHPULL_NOPULL)
|
|
|
|
#define STM32F3_PINMUX_FUNC_PA5_SPI1_SCK (STM32_PINMUX_ALT_FUNC_5 | STM32_PUSHPULL_NOPULL)
|
|
|
|
#define STM32F3_PINMUX_FUNC_PA6_SPI1_MISO (STM32_PINMUX_ALT_FUNC_5 | STM32_PUSHPULL_NOPULL)
|
|
|
|
#define STM32F3_PINMUX_FUNC_PA7_SPI1_MOSI (STM32_PINMUX_ALT_FUNC_5 | STM32_PUSHPULL_NOPULL)
|
2017-05-23 20:58:19 +08:00
|
|
|
|
2017-10-27 23:11:22 +08:00
|
|
|
#define STM32F3_PINMUX_FUNC_PB8_I2C1_SCL (STM32_PINMUX_ALT_FUNC_4 | STM32_OPENDRAIN_PULLUP)
|
|
|
|
#define STM32F3_PINMUX_FUNC_PB9_I2C1_SDA (STM32_PINMUX_ALT_FUNC_4 | STM32_OPENDRAIN_PULLUP)
|
2017-06-23 17:56:34 +08:00
|
|
|
|
2018-02-03 23:40:16 +08:00
|
|
|
#define STM32F3_PINMUX_FUNC_PB12_SPI2_NSS (STM32_PINMUX_ALT_FUNC_5 | STM32_PUSHPULL_NOPULL)
|
|
|
|
#define STM32F3_PINMUX_FUNC_PB13_SPI2_SCK (STM32_PINMUX_ALT_FUNC_5 | STM32_PUSHPULL_NOPULL)
|
|
|
|
#define STM32F3_PINMUX_FUNC_PB14_SPI2_MISO (STM32_PINMUX_ALT_FUNC_5 | STM32_PUSHPULL_NOPULL)
|
|
|
|
#define STM32F3_PINMUX_FUNC_PB15_SPI2_MOSI (STM32_PINMUX_ALT_FUNC_5 | STM32_PUSHPULL_NOPULL)
|
|
|
|
|
2016-12-21 16:56:20 +08:00
|
|
|
#endif /* _STM32F3_PINMUX_H_ */
|