Skip to content
Permalink
Browse files

drivers/pinmux: stm32: Add pinmux definitions for stm32wb (LP)U(S)ART

Add definitions for LPUART1 and USART1.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
  • Loading branch information...
erwango authored and galak committed Feb 25, 2019
1 parent 1847426 commit 1502349266d78843e1676cddac2e952da3758ce3
Showing with 52 additions and 0 deletions.
  1. +2 −0 drivers/pinmux/stm32/pinmux_stm32.h
  2. +50 −0 drivers/pinmux/stm32/pinmux_stm32wbx.h
@@ -115,6 +115,8 @@ void stm32_setup_pins(const struct pin_config *pinconf,
#include "pinmux_stm32l0.h"
#elif CONFIG_SOC_SERIES_STM32L4X
#include "pinmux_stm32l4x.h"
#elif CONFIG_SOC_SERIES_STM32WBX
#include "pinmux_stm32wbx.h"
#endif

#endif /* ZEPHYR_DRIVERS_PINMUX_STM32_PINMUX_STM32_H_ */
@@ -0,0 +1,50 @@
/*
* Copyright (c) 2018 Linaro Limited
*
* SPDX-License-Identifier: Apache-2.0
*/

#ifndef _STM32WBX_PINMUX_H_
#define _STM32WBX_PINMUX_H_

/**
* @file Header for STM32WBX pin multiplexing helper
*/

/* Port A */
#define STM32WBX_PINMUX_FUNC_PA2_LPUART1_TX \
(STM32_PINMUX_ALT_FUNC_8 | STM32_PUSHPULL_PULLUP)
#define STM32WBX_PINMUX_FUNC_PA3_LPUART1_RX \
(STM32_PINMUX_ALT_FUNC_8 | STM32_PUSHPULL_NOPULL)
#define STM32WBX_PINMUX_FUNC_PA9_USART1_TX \
(STM32_PINMUX_ALT_FUNC_7 | STM32_PUSHPULL_PULLUP)
#define STM32WBX_PINMUX_FUNC_PA10_USART1_RX \
(STM32_PINMUX_ALT_FUNC_7 | STM32_PUPDR_NO_PULL)
#define STM32WBX_PINMUX_FUNC_PA12_LPUART1_RX \
(STM32_PINMUX_ALT_FUNC_8 | STM32_PUSHPULL_NOPULL)

/* Port B */
#define STM32WBX_PINMUX_FUNC_PB5_LPUART1_TX \
(STM32_PINMUX_ALT_FUNC_8 | STM32_PUSHPULL_PULLUP)
#define STM32WBX_PINMUX_FUNC_PB6_USART1_TX \
(STM32_PINMUX_ALT_FUNC_7 | STM32_PUSHPULL_PULLUP)
#define STM32WBX_PINMUX_FUNC_PB7_USART1_RX \
(STM32_PINMUX_ALT_FUNC_7 | STM32_PUPDR_NO_PULL)
#define STM32WBX_PINMUX_FUNC_PB10_LPUART1_RX \
(STM32_PINMUX_ALT_FUNC_8 | STM32_PUSHPULL_NOPULL)
#define STM32WBX_PINMUX_FUNC_PB11_LPUART1_TX \
(STM32_PINMUX_ALT_FUNC_8 | STM32_PUSHPULL_PULLUP)

/* Port C */
#define STM32WBX_PINMUX_FUNC_PC0_LPUART1_RX \
(STM32_PINMUX_ALT_FUNC_8 | STM32_PUSHPULL_NOPULL)
#define STM32WBX_PINMUX_FUNC_PC1_LPUART1_TX \
(STM32_PINMUX_ALT_FUNC_8 | STM32_PUSHPULL_PULLUP)

/* Port D */

/* Port E */

/* Port H */

#endif /* _STM32WBX_PINMUX_H_ */

0 comments on commit 1502349

Please sign in to comment.
You can’t perform that action at this time.