1 /* 2 * Copyright (c) 2016, Freescale Semiconductor, Inc. 3 * Copyright 2016-2021 NXP 4 * All rights reserved. 5 * 6 * SPDX-License-Identifier: BSD-3-Clause 7 */ 8 9 #ifndef _FSL_INPUTMUX_H_ 10 #define _FSL_INPUTMUX_H_ 11 12 #include "fsl_inputmux_connections.h" 13 #include "fsl_common.h" 14 15 /*! 16 * @addtogroup inputmux_driver 17 * @{ 18 */ 19 20 /*! @file */ 21 /*! @file fsl_inputmux_connections.h */ 22 23 /******************************************************************************* 24 * Definitions 25 ******************************************************************************/ 26 27 /*! @name Driver version */ 28 /*@{*/ 29 /*! @brief Group interrupt driver version for SDK */ 30 #define FSL_INPUTMUX_DRIVER_VERSION (MAKE_VERSION(2, 0, 4)) 31 /*@}*/ 32 33 /******************************************************************************* 34 * API 35 ******************************************************************************/ 36 37 #ifdef __cplusplus 38 extern "C" { 39 #endif 40 41 /*! 42 * @brief Initialize INPUTMUX peripheral. 43 44 * This function enables the INPUTMUX clock. 45 * 46 * @param base Base address of the INPUTMUX peripheral. 47 * 48 * @retval None. 49 */ 50 void INPUTMUX_Init(INPUTMUX_Type *base); 51 52 /*! 53 * @brief Attaches a signal 54 * 55 * This function gates the INPUTPMUX clock. 56 * 57 * @param base Base address of the INPUTMUX peripheral. 58 * @param index Destination peripheral to attach the signal to. 59 * @param connection Selects connection. 60 * 61 * @retval None. 62 */ 63 void INPUTMUX_AttachSignal(INPUTMUX_Type *base, uint32_t index, inputmux_connection_t connection); 64 65 #if defined(FSL_FEATURE_INPUTMUX_HAS_SIGNAL_ENA) 66 /*! 67 * @brief Enable/disable a signal 68 * 69 * This function gates the INPUTPMUX clock. 70 * 71 * @param base Base address of the INPUTMUX peripheral. 72 * @param signal Enable signal register id and bit offset. 73 * @param enable Selects enable or disable. 74 * 75 * @retval None. 76 */ 77 void INPUTMUX_EnableSignal(INPUTMUX_Type *base, inputmux_signal_t signal, bool enable); 78 #endif 79 80 /*! 81 * @brief Deinitialize INPUTMUX peripheral. 82 83 * This function disables the INPUTMUX clock. 84 * 85 * @param base Base address of the INPUTMUX peripheral. 86 * 87 * @retval None. 88 */ 89 void INPUTMUX_Deinit(INPUTMUX_Type *base); 90 91 #ifdef __cplusplus 92 } 93 #endif 94 95 /*@}*/ 96 97 #endif /* _FSL_INPUTMUX_H_ */ 98