zephyr/drivers/pinmux/stm32/pinmux_stm32f7.h

184 lines
5.5 KiB
C

/*
* Copyright (c) 2018 Yurii Hamann
*
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef _STM32F7_PINMUX_H_
#define _STM32F7_PINMUX_H_
/**
* @file Header for STM32F7 pin multiplexing helper
*/
/* Port A */
#define STM32F7_PINMUX_FUNC_PA0_USART2_CTS \
(STM32_PINMUX_ALT_FUNC_7 | STM32_PUSHPULL_PULLUP)
#define STM32F7_PINMUX_FUNC_PA0_UART4_TX \
(STM32_PINMUX_ALT_FUNC_8 | STM32_PUSHPULL_PULLUP)
#define STM32F7_PINMUX_FUNC_PA1_USART2_RTS \
(STM32_PINMUX_ALT_FUNC_7 | STM32_PUSHPULL_PULLUP)
#define STM32F7_PINMUX_FUNC_PA1_UART4_RX \
(STM32_PINMUX_ALT_FUNC_8 | STM32_PUSHPULL_PULLUP)
#define STM32F7_PINMUX_FUNC_PA2_USART2_TX \
(STM32_PINMUX_ALT_FUNC_7 | STM32_PUSHPULL_PULLUP)
#define STM32F7_PINMUX_FUNC_PA3_USART2_RX \
(STM32_PINMUX_ALT_FUNC_7 | STM32_PUSHPULL_PULLUP)
#define STM32F7_PINMUX_FUNC_PA9_USART1_TX \
(STM32_PINMUX_ALT_FUNC_7 | STM32_PUSHPULL_PULLUP)
#define STM32F7_PINMUX_FUNC_PA10_USART1_RX \
(STM32_PINMUX_ALT_FUNC_7 | STM32_PUSHPULL_PULLUP)
#define STM32F7_PINMUX_FUNC_PA11_USART1_CTS \
(STM32_PINMUX_ALT_FUNC_7 | STM32_PUSHPULL_PULLUP)
#define STM32F7_PINMUX_FUNC_PA12_USART1_RTS \
(STM32_PINMUX_ALT_FUNC_7 | STM32_PUSHPULL_PULLUP)
#define STM32F7_PINMUX_FUNC_PA15_USART4_RTS \
(STM32_PINMUX_ALT_FUNC_8 | STM32_PUSHPULL_PULLUP)
/* Port B */
#define STM32F7_PINMUX_FUNC_PB0_UART4_CTS \
(STM32_PINMUX_ALT_FUNC_8 | STM32_PUSHPULL_PULLUP)
#define STM32F7_PINMUX_FUNC_PB6_USART1_TX \
(STM32_PINMUX_ALT_FUNC_7 | STM32_PUSHPULL_PULLUP)
#define STM32F7_PINMUX_FUNC_PB7_USART1_RX \
(STM32_PINMUX_ALT_FUNC_7 | STM32_PUSHPULL_PULLUP)
#define STM32F7_PINMUX_FUNC_PB10_USART3_TX \
(STM32_PINMUX_ALT_FUNC_7 | STM32_PUSHPULL_PULLUP)
#define STM32F7_PINMUX_FUNC_PB11_USART3_RX \
(STM32_PINMUX_ALT_FUNC_7 | STM32_PUSHPULL_PULLUP)
#define STM32F7_PINMUX_FUNC_PB13_UART3_CTS \
(STM32_PINMUX_ALT_FUNC_7 | STM32_PUSHPULL_NOPULL)
#define STM32F7_PINMUX_FUNC_PB14_UART3_RTS \
(STM32_PINMUX_ALT_FUNC_7 | STM32_PUSHPULL_NOPULL)
/* Port C */
#define STM32F7_PINMUX_FUNC_PC6_USART6_TX \
(STM32_PINMUX_ALT_FUNC_8 | STM32_PUSHPULL_PULLUP)
#define STM32F7_PINMUX_FUNC_PC7_USART6_RX \
(STM32_PINMUX_ALT_FUNC_8 | STM32_PUSHPULL_PULLUP)
#define STM32F7_PINMUX_FUNC_PC8_UART5_RTS \
(STM32_PINMUX_ALT_FUNC_7 | STM32_PUSHPULL_PULLUP)
#define STM32F7_PINMUX_FUNC_PC9_UART5_CTS \
(STM32_PINMUX_ALT_FUNC_7 | STM32_PUSHPULL_PULLUP)
#define STM32F7_PINMUX_FUNC_PC10_USART3_TX \
(STM32_PINMUX_ALT_FUNC_7 | STM32_PUSHPULL_NOPULL)
#define STM32F7_PINMUX_FUNC_PC10_UART4_TX \
(STM32_PINMUX_ALT_FUNC_8 | STM32_PUSHPULL_NOPULL)
#define STM32F7_PINMUX_FUNC_PC11_USART3_RX \
(STM32_PINMUX_ALT_FUNC_7 | STM32_PUSHPULL_PULLUP)
#define STM32F7_PINMUX_FUNC_PC11_UART4_RX \
(STM32_PINMUX_ALT_FUNC_8 | STM32_PUSHPULL_PULLUP)
#define STM32F7_PINMUX_FUNC_PC12_UART5_TX \
(STM32_PINMUX_ALT_FUNC_8 | STM32_PUSHPULL_PULLUP)
/* Port D */
#define STM32F7_PINMUX_FUNC_PD2_UART5_RX \
(STM32_PINMUX_ALT_FUNC_8 | STM32_PUSHPULL_PULLUP)
#define STM32F7_PINMUX_FUNC_PD3_USART2_CTS \
(STM32_PINMUX_ALT_FUNC_7 | STM32_PUSHPULL_NOPULL)
#define STM32F7_PINMUX_FUNC_PD4_USART2_RTS \
(STM32_PINMUX_ALT_FUNC_7 | STM32_PUSHPULL_NOPULL)
#define STM32F7_PINMUX_FUNC_PD5_USART2_TX \
(STM32_PINMUX_ALT_FUNC_7 | STM32_PUSHPULL_NOPULL)
#define STM32F7_PINMUX_FUNC_PD6_USART2_RX \
(STM32_PINMUX_ALT_FUNC_7 | STM32_PUSHPULL_PULLUP)
#define STM32F7_PINMUX_FUNC_PD8_USART3_TX \
(STM32_PINMUX_ALT_FUNC_7 | STM32_PUSHPULL_NOPULL)
#define STM32F7_PINMUX_FUNC_PD9_USART3_RX \
(STM32_PINMUX_ALT_FUNC_7 | STM32_PUSHPULL_PULLUP)
#define STM32F7_PINMUX_FUNC_PD11_USART3_CTS \
(STM32_PINMUX_ALT_FUNC_7 | STM32_PUSHPULL_PULLUP)
#define STM32F7_PINMUX_FUNC_PD12_USART3_RTS \
(STM32_PINMUX_ALT_FUNC_7 | STM32_PUSHPULL_PULLUP)
#define STM32F7_PINMUX_FUNC_PD14_UART8_CTS \
(STM32_PINMUX_ALT_FUNC_8 | STM32_PUSHPULL_PULLUP)
#define STM32F7_PINMUX_FUNC_PD15_UART8_RTS \
(STM32_PINMUX_ALT_FUNC_8 | STM32_PUSHPULL_PULLUP)
/* Port E */
#define STM32F7_PINMUX_FUNC_PE0_UART8_RX \
(STM32_PINMUX_ALT_FUNC_8 | STM32_PUSHPULL_PULLUP)
#define STM32F7_PINMUX_FUNC_PE1_UART8_TX \
(STM32_PINMUX_ALT_FUNC_8 | STM32_PUSHPULL_PULLUP)
#define STM32F7_PINMUX_FUNC_PE7_UART7_RX \
(STM32_PINMUX_ALT_FUNC_8 | STM32_PUSHPULL_PULLUP)
#define STM32F7_PINMUX_FUNC_PE8_UART7_TX \
(STM32_PINMUX_ALT_FUNC_8 | STM32_PUSHPULL_PULLUP)
#define STM32F7_PINMUX_FUNC_PE9_UART7_RTS \
(STM32_PINMUX_ALT_FUNC_8 | STM32_PUSHPULL_PULLUP)
#define STM32F7_PINMUX_FUNC_PE10_UART7_CTS \
(STM32_PINMUX_ALT_FUNC_8 | STM32_PUSHPULL_PULLUP)
/* Port F */
#define STM32F7_PINMUX_FUNC_PF6_UART7_RX \
(STM32_PINMUX_ALT_FUNC_8 | STM32_PUSHPULL_PULLUP)
#define STM32F7_PINMUX_FUNC_PF7_UART7_TX \
(STM32_PINMUX_ALT_FUNC_8 | STM32_PUSHPULL_PULLUP)
#define STM32F7_PINMUX_FUNC_PF8_UART7_RTS \
(STM32_PINMUX_ALT_FUNC_8 | STM32_PUSHPULL_PULLUP)
#define STM32F7_PINMUX_FUNC_PF9_UART7_CTS \
(STM32_PINMUX_ALT_FUNC_8 | STM32_PUSHPULL_PULLUP)
/* Port G */
#define STM32F7_PINMUX_FUNC_PG8_USART6_RTS \
(STM32_PINMUX_ALT_FUNC_8 | STM32_PUSHPULL_PULLUP)
#define STM32F7_PINMUX_FUNC_PG9_USART6_RX \
(STM32_PINMUX_ALT_FUNC_8 | STM32_PUSHPULL_PULLUP)
#define STM32F7_PINMUX_FUNC_PG12_USART6_RTS \
(STM32_PINMUX_ALT_FUNC_8 | STM32_PUSHPULL_PULLUP)
#define STM32F7_PINMUX_FUNC_PG13_USART6_CTS \
(STM32_PINMUX_ALT_FUNC_8 | STM32_PUSHPULL_PULLUP)
#define STM32F7_PINMUX_FUNC_PG14_USART6_TX \
(STM32_PINMUX_ALT_FUNC_8 | STM32_PUSHPULL_PULLUP)
#define STM32F7_PINMUX_FUNC_PG15_USART6_CTS \
(STM32_PINMUX_ALT_FUNC_8 | STM32_PUSHPULL_PULLUP)
#endif /* _STM32F7_PINMUX_H_ */