![]() |
MCUXpresso SDK API Reference Manual
Rev 2.16.000
NXP Semiconductors
|
The MCUXpresso SDK provides a 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 |
Defines the configuration structure of the XBAR control register. More... | |
Typedefs | |
typedef enum _xbar_active_edge | xbar_active_edge_t |
XBAR active edge for detection. | |
typedef enum _xbar_request | xbar_request_t |
Defines the XBAR DMA and interrupt configurations. | |
typedef enum _xbar_status_flag_t | xbar_status_flag_t |
XBAR status flags. More... | |
typedef struct _xbar_control_config | xbar_control_config_t |
Defines the configuration structure of the XBAR control register. More... | |
Enumerations | |
enum | _xbar_active_edge { kXBAR_EdgeNone = 0U, kXBAR_EdgeRising = 1U, kXBAR_EdgeFalling = 2U, kXBAR_EdgeRisingAndFalling = 3U } |
XBAR active edge for detection. More... | |
enum | _xbar_request { kXBAR_RequestDisable = 0U, kXBAR_RequestDMAEnable = 1U, kXBAR_RequestInterruptEnalbe = 2U } |
Defines the XBAR DMA and interrupt configurations. More... | |
enum | _xbar_status_flag_t { kXBAR_EdgeDetectionOut0 } |
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 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 |
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::activeEdge |
xbar_request_t _xbar_control_config::requestType |
typedef enum _xbar_status_flag_t xbar_status_flag_t |
This provides constants for the XBAR status flags for use in the XBAR functions.
typedef struct _xbar_control_config 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.
enum _xbar_active_edge |
enum _xbar_request |
enum _xbar_status_flag_t |
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. |