![]() |
MCUXpresso SDK API Reference Manual
Rev. 0
NXP Semiconductors
|
The MCUXpresso SDK provides Peripheral driver for the Inter-Peripheral Crossbar Switch (XBAR) block of MCUXpresso SDK devices.
The XBAR peripheral driver configures the XBAR (Inter-Peripheral Crossbar Switch) and handles initialization and configuration of the XBAR module.
XBAR driver has two parts:
To initialize the XBAR driver, a state structure has to be passed into the initialization function. This block of memory keeps pointers to user's callback functions and parameters to these functions. The XBAR module is initialized by calling the XBAR_Init() function.
Data Structures | |
struct | xbar_control_config_t |
Defines the configuration structure of the XBAR control register. More... | |
Macros | |
#define | FSL_XBAR_DRIVER_VERSION (MAKE_VERSION(2, 0, 2)) |
Version 2.0.2. More... | |
#define | XBAR_SELx(base, output) |
Macros for entire XBAR_SELx register. More... | |
#define | XBAR_WR_SELx_SELx(base, input, output) |
Set the XBAR_SELx_SELx field to a new value. More... | |
Enumerations | |
enum | xbar_active_edge_t { kXBAR_EdgeNone = 0U, kXBAR_EdgeRising = 1U, kXBAR_EdgeFalling = 2U, kXBAR_EdgeRisingAndFalling = 3U } |
XBAR active edge for detection. More... | |
enum | xbar_request_t { kXBAR_RequestDisable = 0U, kXBAR_RequestDMAEnable = 1U, kXBAR_RequestInterruptEnalbe = 2U } |
Defines the XBAR DMA and interrupt configurations. More... | |
enum | xbar_status_flag_t { kXBAR_EdgeDetectionOut0, kXBAR_EdgeDetectionOut1, kXBAR_EdgeDetectionOut2, kXBAR_EdgeDetectionOut3 } |
XBAR status flags. More... | |
XBAR functional Operation | |
void | XBAR_Init (XBAR_Type *base) |
Initializes the XBAR modules. More... | |
void | XBAR_Deinit (XBAR_Type *base) |
Shutdown the XBAR modules. More... | |
void | XBAR_SetSignalsConnection (XBAR_Type *base, xbar_input_signal_t input, xbar_output_signal_t output) |
Set connection between the selected XBAR_IN[*] input and the XBAR_OUT[*] output signal. More... | |
void | XBAR_ClearStatusFlags (XBAR_Type *base, uint32_t mask) |
Clears the the edge detection status flags of relative mask. More... | |
uint32_t | XBAR_GetStatusFlags (XBAR_Type *base) |
Gets the active edge detection status. More... | |
void | XBAR_SetOutputSignalConfig (XBAR_Type *base, xbar_output_signal_t output, const xbar_control_config_t *controlConfig) |
Configures the XBAR control register. More... | |
struct xbar_control_config_t |
This structure keeps the configuration of XBAR control register for one output. Control registers are available only for a few outputs. Not every XBAR module has control registers.
Data Fields | |
xbar_active_edge_t | activeEdge |
Active edge to be detected. More... | |
xbar_request_t | requestType |
Selects DMA/Interrupt request. More... | |
xbar_active_edge_t xbar_control_config_t::activeEdge |
xbar_request_t xbar_control_config_t::requestType |
#define FSL_XBAR_DRIVER_VERSION (MAKE_VERSION(2, 0, 2)) |
#define XBAR_SELx | ( | base, | |
output | |||
) |
#define XBAR_WR_SELx_SELx | ( | base, | |
input, | |||
output | |||
) |
enum xbar_active_edge_t |
enum xbar_request_t |
enum xbar_status_flag_t |
This provides constants for the XBAR status flags for use in the XBAR functions.
void XBAR_Init | ( | XBAR_Type * | base | ) |
This function un-gates the XBAR clock.
base | XBAR peripheral address. |
void XBAR_Deinit | ( | XBAR_Type * | base | ) |
This function disables XBAR clock.
base | XBAR peripheral address. |
void XBAR_SetSignalsConnection | ( | XBAR_Type * | base, |
xbar_input_signal_t | input, | ||
xbar_output_signal_t | output | ||
) |
This function connects the XBAR input to the selected XBAR output. If more than one XBAR module is available, only the inputs and outputs from the same module can be connected.
Example:
base | XBAR peripheral address |
input | XBAR input signal. |
output | XBAR output signal. |
void XBAR_ClearStatusFlags | ( | XBAR_Type * | base, |
uint32_t | mask | ||
) |
base | XBAR peripheral address |
mask | the status flags to clear. |
uint32_t XBAR_GetStatusFlags | ( | XBAR_Type * | base | ) |
This function gets the active edge detect status of all XBAR_OUTs. If the active edge occurs, the return value is asserted. When the interrupt or the DMA functionality is enabled for the XBAR_OUTx, this field is 1 when the interrupt or DMA request is asserted and 0 when the interrupt or DMA request has been cleared.
Example:
base | XBAR peripheral address. |
void XBAR_SetOutputSignalConfig | ( | XBAR_Type * | base, |
xbar_output_signal_t | output, | ||
const xbar_control_config_t * | controlConfig | ||
) |
This function configures an XBAR control register. The active edge detection and the DMA/IRQ function on the corresponding XBAR output can be set.
Example:
base | XBAR peripheral address |
output | XBAR output number. |
controlConfig | Pointer to structure that keeps configuration of control register. |