1 /* 2 * Copyright 2023 NXP 3 * 4 * SPDX-License-Identifier: BSD-3-Clause 5 */ 6 7 #ifndef HAL_PINCTRL_H_ 8 #define HAL_PINCTRL_H_ 9 10 #include "fsl_common.h" 11 #include "hal_pinctrl_platform.h" 12 13 /******************************************************************************* 14 * Definitions 15 ******************************************************************************/ 16 typedef struct 17 { 18 bool set_gpr; /* true: setup IOMUXC_GPR; false: not setup IOMUXC_GPR */ 19 uint32_t gpr_instance; /* IOMUXC_GPR instance */ 20 uint32_t gpr_val; /* IOMUXC_GPR value */ 21 } hal_pinctrl_t; 22 23 /******************************************************************************* 24 * API 25 ******************************************************************************/ 26 #if defined(__cplusplus) 27 extern "C" { 28 #endif /*__cplusplus */ 29 30 void HAL_PinctrlSetPinMux(uint32_t muxRegister, 31 uint32_t muxMode, 32 uint32_t inputRegister, 33 uint32_t inputDaisy, 34 uint32_t configRegister, 35 uint32_t inputOnfield); 36 37 void HAL_PinctrlSetPinCfg(uint32_t muxRegister, 38 uint32_t muxMode, 39 uint32_t inputRegister, 40 uint32_t inputDaisy, 41 uint32_t configRegister, 42 uint32_t configValue); 43 44 void HAL_PinctrlSetMiscCfg(hal_pinctrl_t *hal_pinctrl); 45 #if defined(__cplusplus) 46 } 47 #endif /*__cplusplus */ 48 49 /*! @} */ 50 51 #endif /* HAL_PINCTRL_H_ */ 52