2017-08-09 17:22:51 +08:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2017 RnDity Sp. z o.o.
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
*/
|
|
|
|
|
2018-09-15 01:43:44 +08:00
|
|
|
#ifndef ZEPHYR_DRIVERS_PINMUX_STM32_PINMUX_STM32F0_H_
|
|
|
|
#define ZEPHYR_DRIVERS_PINMUX_STM32_PINMUX_STM32F0_H_
|
2017-08-09 17:22:51 +08:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @file Header for STM32F0 pin multiplexing helper
|
|
|
|
*/
|
|
|
|
|
|
|
|
#define STM32F0_PINMUX_FUNC_PB6_USART1_TX \
|
2018-08-18 19:07:39 +08:00
|
|
|
(STM32_PINMUX_ALT_FUNC_0 | STM32_PUSHPULL_PULLUP)
|
2017-08-09 17:22:51 +08:00
|
|
|
#define STM32F0_PINMUX_FUNC_PB7_USART1_RX \
|
|
|
|
(STM32_PINMUX_ALT_FUNC_0 | STM32_PUPDR_NO_PULL)
|
|
|
|
|
|
|
|
#define STM32F0_PINMUX_FUNC_PA9_USART1_TX \
|
2018-08-18 19:07:39 +08:00
|
|
|
(STM32_PINMUX_ALT_FUNC_1 | STM32_PUSHPULL_PULLUP)
|
2017-08-09 17:22:51 +08:00
|
|
|
#define STM32F0_PINMUX_FUNC_PA10_USART1_RX \
|
|
|
|
(STM32_PINMUX_ALT_FUNC_1 | STM32_PUPDR_NO_PULL)
|
|
|
|
|
|
|
|
#define STM32F0_PINMUX_FUNC_PA2_USART2_TX \
|
2018-08-18 19:07:39 +08:00
|
|
|
(STM32_PINMUX_ALT_FUNC_1 | STM32_PUSHPULL_PULLUP)
|
2017-08-09 17:22:51 +08:00
|
|
|
#define STM32F0_PINMUX_FUNC_PA3_USART2_RX \
|
|
|
|
(STM32_PINMUX_ALT_FUNC_1 | STM32_PUPDR_NO_PULL)
|
|
|
|
|
|
|
|
#define STM32F0_PINMUX_FUNC_PA14_USART2_TX \
|
2018-08-18 19:07:39 +08:00
|
|
|
(STM32_PINMUX_ALT_FUNC_1 | STM32_PUSHPULL_PULLUP)
|
2017-08-09 17:22:51 +08:00
|
|
|
#define STM32F0_PINMUX_FUNC_PA15_USART2_RX \
|
|
|
|
(STM32_PINMUX_ALT_FUNC_1 | STM32_PUPDR_NO_PULL)
|
|
|
|
|
2017-09-08 21:59:38 +08:00
|
|
|
#define STM32F0_PINMUX_FUNC_PD5_USART2_TX \
|
2018-08-18 19:07:39 +08:00
|
|
|
(STM32_PINMUX_ALT_FUNC_0 | STM32_PUSHPULL_PULLUP)
|
2017-09-08 21:59:38 +08:00
|
|
|
#define STM32F0_PINMUX_FUNC_PD6_USART2_RX \
|
|
|
|
(STM32_PINMUX_ALT_FUNC_0 | STM32_PUPDR_NO_PULL)
|
|
|
|
|
2017-11-30 00:40:41 +08:00
|
|
|
#define STM32F0_PINMUX_FUNC_PB8_I2C1_SCL \
|
|
|
|
(STM32_PINMUX_ALT_FUNC_1 | STM32_OPENDRAIN_PULLUP)
|
|
|
|
#define STM32F0_PINMUX_FUNC_PB9_I2C1_SDA \
|
|
|
|
(STM32_PINMUX_ALT_FUNC_1 | STM32_OPENDRAIN_PULLUP)
|
|
|
|
|
|
|
|
#define STM32F0_PINMUX_FUNC_PA11_I2C2_SCL \
|
|
|
|
(STM32_PINMUX_ALT_FUNC_5 | STM32_OPENDRAIN_PULLUP)
|
|
|
|
#define STM32F0_PINMUX_FUNC_PA12_I2C2_SDA \
|
|
|
|
(STM32_PINMUX_ALT_FUNC_5 | STM32_OPENDRAIN_PULLUP)
|
|
|
|
|
2018-01-18 18:48:36 +08:00
|
|
|
#define STM32F0_PINMUX_FUNC_PB10_I2C2_SCL \
|
|
|
|
(STM32_PINMUX_ALT_FUNC_1 | STM32_OPENDRAIN_PULLUP)
|
|
|
|
#define STM32F0_PINMUX_FUNC_PB11_I2C2_SDA \
|
|
|
|
(STM32_PINMUX_ALT_FUNC_1 | STM32_OPENDRAIN_PULLUP)
|
|
|
|
|
2018-02-12 16:36:25 +08:00
|
|
|
#define STM32F0_PINMUX_FUNC_PA4_SPI1_NSS \
|
|
|
|
(STM32_PINMUX_ALT_FUNC_0 | STM32_PUSHPULL_NOPULL)
|
|
|
|
#define STM32F0_PINMUX_FUNC_PA5_SPI1_SCK \
|
|
|
|
(STM32_PINMUX_ALT_FUNC_0 | STM32_PUSHPULL_NOPULL)
|
|
|
|
#define STM32F0_PINMUX_FUNC_PA6_SPI1_MISO \
|
|
|
|
(STM32_PINMUX_ALT_FUNC_0 | STM32_PUSHPULL_NOPULL)
|
|
|
|
#define STM32F0_PINMUX_FUNC_PA7_SPI1_MOSI \
|
|
|
|
(STM32_PINMUX_ALT_FUNC_0 | STM32_PUSHPULL_NOPULL)
|
|
|
|
|
|
|
|
#define STM32F0_PINMUX_FUNC_PA15_SPI1_NSS \
|
|
|
|
(STM32_PINMUX_ALT_FUNC_0 | STM32_PUSHPULL_NOPULL)
|
2017-11-29 00:09:18 +08:00
|
|
|
#define STM32F0_PINMUX_FUNC_PB3_SPI1_SCK \
|
|
|
|
(STM32_PINMUX_ALT_FUNC_0 | STM32_PUSHPULL_NOPULL)
|
|
|
|
#define STM32F0_PINMUX_FUNC_PB4_SPI1_MISO \
|
|
|
|
(STM32_PINMUX_ALT_FUNC_0 | STM32_PUSHPULL_NOPULL)
|
|
|
|
#define STM32F0_PINMUX_FUNC_PB5_SPI1_MOSI \
|
|
|
|
(STM32_PINMUX_ALT_FUNC_0 | STM32_PUSHPULL_NOPULL)
|
|
|
|
|
2018-02-12 16:36:25 +08:00
|
|
|
#define STM32F0_PINMUX_FUNC_PB12_SPI2_NSS \
|
|
|
|
(STM32_PINMUX_ALT_FUNC_0 | STM32_PUSHPULL_NOPULL)
|
2017-11-29 00:09:18 +08:00
|
|
|
#define STM32F0_PINMUX_FUNC_PB13_SPI2_SCK \
|
|
|
|
(STM32_PINMUX_ALT_FUNC_0 | STM32_PUSHPULL_NOPULL)
|
|
|
|
#define STM32F0_PINMUX_FUNC_PB14_SPI2_MISO \
|
|
|
|
(STM32_PINMUX_ALT_FUNC_0 | STM32_PUSHPULL_NOPULL)
|
|
|
|
#define STM32F0_PINMUX_FUNC_PB15_SPI2_MOSI \
|
|
|
|
(STM32_PINMUX_ALT_FUNC_0 | STM32_PUSHPULL_NOPULL)
|
|
|
|
|
2018-02-12 16:36:25 +08:00
|
|
|
/* Available on STM32F030xC devices only. */
|
|
|
|
#define STM32F0_PINMUX_FUNC_PB9_SPI2_NSS \
|
|
|
|
(STM32_PINMUX_ALT_FUNC_0 | STM32_PUSHPULL_NOPULL)
|
|
|
|
#define STM32F0_PINMUX_FUNC_PB10_SPI2_SCK \
|
|
|
|
(STM32_PINMUX_ALT_FUNC_0 | STM32_PUSHPULL_NOPULL)
|
|
|
|
#define STM32F0_PINMUX_FUNC_PC2_SPI2_MISO \
|
|
|
|
(STM32_PINMUX_ALT_FUNC_0 | STM32_PUSHPULL_NOPULL)
|
|
|
|
#define STM32F0_PINMUX_FUNC_PC3_SPI2_MOSI \
|
|
|
|
(STM32_PINMUX_ALT_FUNC_0 | STM32_PUSHPULL_NOPULL)
|
|
|
|
|
2018-05-03 17:04:12 +08:00
|
|
|
#define STM32F0_PINMUX_FUNC_PB8_CAN_RX \
|
|
|
|
(STM32_PINMUX_ALT_FUNC_4 | STM32_PUSHPULL_NOPULL)
|
|
|
|
#define STM32F0_PINMUX_FUNC_PB9_CAN_TX \
|
|
|
|
(STM32_PINMUX_ALT_FUNC_4 | STM32_PUSHPULL_NOPULL)
|
|
|
|
#define STM32F0_PINMUX_FUNC_PD0_CAN_RX \
|
|
|
|
(STM32_PINMUX_ALT_FUNC_0 | STM32_PUPDR_PULL_UP)
|
|
|
|
#define STM32F0_PINMUX_FUNC_PD1_CAN_TX \
|
|
|
|
(STM32_PINMUX_ALT_FUNC_0 | STM32_PUSHPULL_NOPULL)
|
|
|
|
|
2018-09-15 01:43:44 +08:00
|
|
|
#endif /* ZEPHYR_DRIVERS_PINMUX_STM32_PINMUX_STM32F0_H_ */
|