drivers: pinmux: provide support for stm32f0 and nucleo f030r8 board.

Fixes #3923

Signed-off-by: Maciej Debski <maciej.debski@rndity.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
This commit is contained in:
Maciej Debski 2017-08-09 11:22:51 +02:00 committed by Kumar Gala
commit f93e0bed4b
2 changed files with 37 additions and 1 deletions

View file

@ -99,7 +99,9 @@ void stm32_setup_pins(const struct pin_config *pinconf,
/* common pinmux device name for all STM32 chips */
#define STM32_PINMUX_NAME "stm32-pinmux"
#ifdef CONFIG_SOC_SERIES_STM32F1X
#ifdef CONFIG_SOC_SERIES_STM32F0X
#include "pinmux_stm32f0.h"
#elif CONFIG_SOC_SERIES_STM32F1X
#include "pinmux_stm32f1.h"
#elif CONFIG_SOC_SERIES_STM32F3X
#include "pinmux_stm32f3.h"

View file

@ -0,0 +1,34 @@
/*
* Copyright (c) 2017 RnDity Sp. z o.o.
*
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef _STM32F0_PINMUX_H_
#define _STM32F0_PINMUX_H_
/**
* @file Header for STM32F0 pin multiplexing helper
*/
#define STM32F0_PINMUX_FUNC_PB6_USART1_TX \
(STM32_PINMUX_ALT_FUNC_0 | STM32_PUSHPULL_NOPULL)
#define STM32F0_PINMUX_FUNC_PB7_USART1_RX \
(STM32_PINMUX_ALT_FUNC_0 | STM32_PUPDR_NO_PULL)
#define STM32F0_PINMUX_FUNC_PA9_USART1_TX \
(STM32_PINMUX_ALT_FUNC_1 | STM32_PUSHPULL_NOPULL)
#define STM32F0_PINMUX_FUNC_PA10_USART1_RX \
(STM32_PINMUX_ALT_FUNC_1 | STM32_PUPDR_NO_PULL)
#define STM32F0_PINMUX_FUNC_PA2_USART2_TX \
(STM32_PINMUX_ALT_FUNC_1 | STM32_PUSHPULL_NOPULL)
#define STM32F0_PINMUX_FUNC_PA3_USART2_RX \
(STM32_PINMUX_ALT_FUNC_1 | STM32_PUPDR_NO_PULL)
#define STM32F0_PINMUX_FUNC_PA14_USART2_TX \
(STM32_PINMUX_ALT_FUNC_1 | STM32_PUSHPULL_NOPULL)
#define STM32F0_PINMUX_FUNC_PA15_USART2_RX \
(STM32_PINMUX_ALT_FUNC_1 | STM32_PUPDR_NO_PULL)
#endif /* _STM32F0_PINMUX_H_ */