Back to home page

LXR

 
 

    


File indexing completed on 2025-05-11 08:23:02

0001 /*
0002  * Copyright (c) 2015, Freescale Semiconductor, Inc.
0003  * Copyright 2016-2019 NXP
0004  * All rights reserved.
0005  *
0006  * SPDX-License-Identifier: BSD-3-Clause
0007  */
0008 
0009 #ifndef _FSL_XBARB_H_
0010 #define _FSL_XBARB_H_
0011 
0012 #include "fsl_common.h"
0013 
0014 /*!
0015  * @addtogroup xbarb
0016  * @{
0017  */
0018 
0019 /*******************************************************************************
0020  * Definitions
0021  ******************************************************************************/
0022 
0023 #define FSL_XBARB_DRIVER_VERSION (MAKE_VERSION(2, 0, 2))
0024 
0025 /* Macros for entire XBARB_SELx register. */
0026 #define XBARB_SELx(base, output) (((volatile uint16_t *)(&((base)->SEL0)))[(uint32_t)(output) / 2UL])
0027 /* Set the SELx field to a new value. */
0028 #define XBARB_WR_SELx_SELx(base, input, output) XBARB_SetSignalsConnection((base), (input), (output))
0029 
0030 /*******************************************************************************
0031  * API
0032  ******************************************************************************/
0033 
0034 #if defined(__cplusplus)
0035 extern "C" {
0036 #endif /* __cplusplus */
0037 
0038 /*!
0039  * @name XBARB functional Operation.
0040  * @{
0041  */
0042 
0043 /*!
0044  * @brief Initializes the XBARB module.
0045  *
0046  * This function un-gates the XBARB clock.
0047  *
0048  * @param base XBARB peripheral address.
0049  */
0050 void XBARB_Init(XBARB_Type *base);
0051 
0052 /*!
0053  * @brief Shuts down the XBARB module.
0054  *
0055  * This function disables XBARB clock.
0056  *
0057  * @param base XBARB peripheral address.
0058  */
0059 void XBARB_Deinit(XBARB_Type *base);
0060 
0061 /*!
0062  * @brief Configures a connection between the selected XBARB_IN[*] input and the XBARB_OUT[*] output signal.
0063  *
0064  * This function configures which XBARB input is connected to the selected XBARB output.
0065  * If more than one XBARB module is available, only the inputs and outputs from the same module
0066  * can be connected.
0067  *
0068  * @param base XBARB peripheral address.
0069  * @param input XBARB input signal.
0070  * @param output XBARB output signal.
0071  */
0072 void XBARB_SetSignalsConnection(XBARB_Type *base, xbar_input_signal_t input, xbar_output_signal_t output);
0073 
0074 #if defined(__cplusplus)
0075 }
0076 #endif /* __cplusplus */
0077 
0078 /*! @}*/
0079 
0080 /*!* @} */
0081 
0082 #endif /* _FSL_XBARB_H_ */