|
|
@ -1,7 +1,7 @@ |
|
|
|
/*
|
|
|
|
/*
|
|
|
|
* Copyright (c) 2017 I-SENSE group of ICCS |
|
|
|
* Copyright (c) 2017 I-SENSE group of ICCS |
|
|
|
* |
|
|
|
* |
|
|
|
* SPDX-License-Identifier: Apache-2.0 |
|
|
|
* SPDX-License-Identifier: MIT |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
#include <kernel.h> |
|
|
|
#include <kernel.h> |
|
|
@ -17,11 +17,11 @@ static const struct pin_config pinconf[] = { |
|
|
|
#ifdef CONFIG_UART_1 |
|
|
|
#ifdef CONFIG_UART_1 |
|
|
|
{STM32_PIN_PC4, STM32F3_PINMUX_FUNC_PC4_USART1_TX}, |
|
|
|
{STM32_PIN_PC4, STM32F3_PINMUX_FUNC_PC4_USART1_TX}, |
|
|
|
{STM32_PIN_PC5, STM32F3_PINMUX_FUNC_PC5_USART1_RX}, |
|
|
|
{STM32_PIN_PC5, STM32F3_PINMUX_FUNC_PC5_USART1_RX}, |
|
|
|
#endif /* CONFIG_UART_1 */ |
|
|
|
#endif /* CONFIG_UART_1 */ |
|
|
|
#ifdef CONFIG_UART_2 |
|
|
|
#ifdef CONFIG_UART_2 |
|
|
|
{STM32_PIN_PA2, STM32F3_PINMUX_FUNC_PA2_USART2_TX}, |
|
|
|
{STM32_PIN_PA2, STM32F3_PINMUX_FUNC_PA2_USART2_TX}, |
|
|
|
{STM32_PIN_PA3, STM32F3_PINMUX_FUNC_PA3_USART2_RX}, |
|
|
|
{STM32_PIN_PA3, STM32F3_PINMUX_FUNC_PA3_USART2_RX}, |
|
|
|
#endif /* CONFIG_UART_2 */ |
|
|
|
#endif /* CONFIG_UART_2 */ |
|
|
|
#ifdef CONFIG_I2C_1 |
|
|
|
#ifdef CONFIG_I2C_1 |
|
|
|
{STM32_PIN_PB6, STM32F3_PINMUX_FUNC_PB6_I2C1_SCL}, |
|
|
|
{STM32_PIN_PB6, STM32F3_PINMUX_FUNC_PB6_I2C1_SCL}, |
|
|
|
{STM32_PIN_PB7, STM32F3_PINMUX_FUNC_PB7_I2C1_SDA}, |
|
|
|
{STM32_PIN_PB7, STM32F3_PINMUX_FUNC_PB7_I2C1_SDA}, |
|
|
@ -49,7 +49,7 @@ static const struct pin_config pinconf[] = { |
|
|
|
#ifdef CONFIG_USB_DC_STM32 |
|
|
|
#ifdef CONFIG_USB_DC_STM32 |
|
|
|
{STM32_PIN_PA11, STM32F3_PINMUX_FUNC_PA11_USB_DM}, |
|
|
|
{STM32_PIN_PA11, STM32F3_PINMUX_FUNC_PA11_USB_DM}, |
|
|
|
{STM32_PIN_PA12, STM32F3_PINMUX_FUNC_PA12_USB_DP}, |
|
|
|
{STM32_PIN_PA12, STM32F3_PINMUX_FUNC_PA12_USB_DP}, |
|
|
|
#endif /* CONFIG_USB_DC_STM32 */ |
|
|
|
#endif /* CONFIG_USB_DC_STM32 */ |
|
|
|
#ifdef CONFIG_CAN_1 |
|
|
|
#ifdef CONFIG_CAN_1 |
|
|
|
{STM32_PIN_PD0, STM32F3_PINMUX_FUNC_PD0_CAN1_RX}, |
|
|
|
{STM32_PIN_PD0, STM32F3_PINMUX_FUNC_PD0_CAN1_RX}, |
|
|
|
{STM32_PIN_PD1, STM32F3_PINMUX_FUNC_PD1_CAN1_TX}, |
|
|
|
{STM32_PIN_PD1, STM32F3_PINMUX_FUNC_PD1_CAN1_TX}, |
|
|
@ -66,4 +66,4 @@ static int pinmux_stm32_init(struct device *port) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
SYS_INIT(pinmux_stm32_init, PRE_KERNEL_1, |
|
|
|
SYS_INIT(pinmux_stm32_init, PRE_KERNEL_1, |
|
|
|
CONFIG_PINMUX_STM32_DEVICE_INITIALIZATION_PRIORITY); |
|
|
|
CONFIG_PINMUX_STM32_DEVICE_INITIALIZATION_PRIORITY); |
|
|
|