1 /* 2 * Copyright (c) 2022 Henrik Brix Andersen <henrik@brixandersen.dk> 3 * Copyright (c) 2022 NXP 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7 #ifndef _ZEPHYR_DT_BINDINGS_PINCTRL_RV32M1_PINCTRL_ 8 #define _ZEPHYR_DT_BINDINGS_PINCTRL_RV32M1_PINCTRL_ 9 10 /** 11 * @brief Specify PORTx->PCR register MUX field 12 * 13 * @param port Port name ('A' to 'E') 14 * @param pin Port pin number (0 to 31) 15 * @param mux Alternate function number (0 to 7) 16 */ 17 #define RV32M1_MUX(port, pin, mux) \ 18 (((((port) - 'A') & 0xF) << 28) | \ 19 (((pin) & 0x3F) << 22) | \ 20 (((mux) & 0x7) << 8)) 21 22 #endif /* _ZEPHYR_DT_BINDINGS_PINCTRL_RV32M1_PINCTRL_ */ 23