/* * Copyright (c) 2017 Linaro Limited * * SPDX-License-Identifier: Apache-2.0 */ #ifndef ZEPHYR_INCLUDE_DT_BINDINGS_PINCTRL_STM32_PINCTRL_H_ #define ZEPHYR_INCLUDE_DT_BINDINGS_PINCTRL_STM32_PINCTRL_H_ #include /** * @brief PIN configuration bitfield * * Pin configuration is coded with the following * fields * Alternate Functions [ 0 : 3 ] * GPIO Mode [ 4 : 5 ] * GPIO Output type [ 6 ] * GPIO Speed [ 7 : 8 ] * GPIO PUPD config [ 9 : 10 ] * * Applicable to STM32F3, STM32F4, STM32L4 series */ /* Alternate functions */ #define STM32_FUNC_ALT_0 0 #define STM32_FUNC_ALT_1 1 #define STM32_FUNC_ALT_2 2 #define STM32_FUNC_ALT_3 3 #define STM32_FUNC_ALT_4 4 #define STM32_FUNC_ALT_5 5 #define STM32_FUNC_ALT_6 6 #define STM32_FUNC_ALT_7 7 #define STM32_FUNC_ALT_8 8 #define STM32_FUNC_ALT_9 9 #define STM32_FUNC_ALT_10 10 #define STM32_FUNC_ALT_11 11 #define STM32_FUNC_ALT_12 12 #define STM32_FUNC_ALT_13 13 #define STM32_FUNC_ALT_14 14 #define STM32_FUNC_ALT_15 15 #define STM32_AFR_MASK 0xF #define STM32_AFR_SHIFT 0 /* GPIO Mode */ #define STM32_MODER_INPUT_MODE (0x0<