Skip to content

Commit d052fe7

Browse files
committed
drivers/pinmux: stm32: Add pinmux definitions for stm32wb (LP)U(S)ART
Add definitions for LPUART1 and USART1. Signed-off-by: Erwan Gouriou <[email protected]>
1 parent 8b557ad commit d052fe7

File tree

2 files changed

+52
-0
lines changed

2 files changed

+52
-0
lines changed

drivers/pinmux/stm32/pinmux_stm32.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,8 @@ void stm32_setup_pins(const struct pin_config *pinconf,
115115
#include "pinmux_stm32l0.h"
116116
#elif CONFIG_SOC_SERIES_STM32L4X
117117
#include "pinmux_stm32l4x.h"
118+
#elif CONFIG_SOC_SERIES_STM32WBX
119+
#include "pinmux_stm32wbx.h"
118120
#endif
119121

120122
#endif /* ZEPHYR_DRIVERS_PINMUX_STM32_PINMUX_STM32_H_ */
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
/*
2+
* Copyright (c) 2018 Linaro Limited
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
#ifndef _STM32WBX_PINMUX_H_
8+
#define _STM32WBX_PINMUX_H_
9+
10+
/**
11+
* @file Header for STM32WBX pin multiplexing helper
12+
*/
13+
14+
/* Port A */
15+
#define STM32WBX_PINMUX_FUNC_PA2_LPUART1_TX \
16+
(STM32_PINMUX_ALT_FUNC_8 | STM32_PUSHPULL_PULLUP)
17+
#define STM32WBX_PINMUX_FUNC_PA3_LPUART1_RX \
18+
(STM32_PINMUX_ALT_FUNC_8 | STM32_PUSHPULL_NOPULL)
19+
#define STM32WBX_PINMUX_FUNC_PA9_USART1_TX \
20+
(STM32_PINMUX_ALT_FUNC_7 | STM32_PUSHPULL_PULLUP)
21+
#define STM32WBX_PINMUX_FUNC_PA10_USART1_RX \
22+
(STM32_PINMUX_ALT_FUNC_7 | STM32_PUPDR_NO_PULL)
23+
#define STM32WBX_PINMUX_FUNC_PA12_LPUART1_RX \
24+
(STM32_PINMUX_ALT_FUNC_8 | STM32_PUSHPULL_NOPULL)
25+
26+
/* Port B */
27+
#define STM32WBX_PINMUX_FUNC_PB5_LPUART1_TX \
28+
(STM32_PINMUX_ALT_FUNC_8 | STM32_PUSHPULL_PULLUP)
29+
#define STM32WBX_PINMUX_FUNC_PB6_USART1_TX \
30+
(STM32_PINMUX_ALT_FUNC_7 | STM32_PUSHPULL_PULLUP)
31+
#define STM32WBX_PINMUX_FUNC_PB7_USART1_RX \
32+
(STM32_PINMUX_ALT_FUNC_7 | STM32_PUPDR_NO_PULL)
33+
#define STM32WBX_PINMUX_FUNC_PB10_LPUART1_RX \
34+
(STM32_PINMUX_ALT_FUNC_8 | STM32_PUSHPULL_NOPULL)
35+
#define STM32WBX_PINMUX_FUNC_PB11_LPUART1_TX \
36+
(STM32_PINMUX_ALT_FUNC_8 | STM32_PUSHPULL_PULLUP)
37+
38+
/* Port C */
39+
#define STM32WBX_PINMUX_FUNC_PC0_LPUART1_RX \
40+
(STM32_PINMUX_ALT_FUNC_8 | STM32_PUSHPULL_NOPULL)
41+
#define STM32WBX_PINMUX_FUNC_PC1_LPUART1_TX \
42+
(STM32_PINMUX_ALT_FUNC_8 | STM32_PUSHPULL_PULLUP)
43+
44+
/* Port D */
45+
46+
/* Port E */
47+
48+
/* Port H */
49+
50+
#endif /* _STM32WBX_PINMUX_H_ */

0 commit comments

Comments
 (0)