MCUXpresso SDK API Reference Manual
Rev. 0
NXP Semiconductors
|
The MCUXpresso SDK provides a peripheral driver for the Inter-Peripheral Crossbar Switch (XBARA) block of MCUXpresso SDK devices.
The XBARA peripheral driver configures the XBARA (Inter-Peripheral Crossbar Switch) and handles initialization and configuration of the XBARA module.
XBARA driver has two parts:
To initialize the XBARA 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 XBARA module is initialized by calling the XBARA_Init() function.
Data Structures | |
struct | xbara_control_config_t |
Defines the configuration structure of the XBARA control register. More... | |
Enumerations | |
enum | xbara_active_edge_t { kXBARA_EdgeNone = 0U, kXBARA_EdgeRising = 1U, kXBARA_EdgeFalling = 2U, kXBARA_EdgeRisingAndFalling = 3U } |
XBARA active edge for detection. More... | |
enum | xbara_request_t { kXBARA_RequestDisable = 0U, kXBARA_RequestDMAEnable = 1U, kXBARA_RequestInterruptEnalbe = 2U } |
Defines the XBARA DMA and interrupt configurations. More... | |
enum | xbara_status_flag_t { kXBARA_EdgeDetectionOut0, kXBARA_EdgeDetectionOut1, kXBARA_EdgeDetectionOut2, kXBARA_EdgeDetectionOut3 } |
XBARA status flags. More... | |
XBARA functional Operation. | |
void | XBARA_Init (XBARA_Type *base) |
Initializes the XBARA module. More... | |
void | XBARA_Deinit (XBARA_Type *base) |
Shuts down the XBARA module. More... | |
void | XBARA_SetSignalsConnection (XBARA_Type *base, xbar_input_signal_t input, xbar_output_signal_t output) |
Sets a connection between the selected XBARA_IN[*] input and the XBARA_OUT[*] output signal. More... | |
uint32_t | XBARA_GetStatusFlags (XBARA_Type *base) |
Gets the active edge detection status. More... | |
void | XBARA_ClearStatusFlags (XBARA_Type *base, uint32_t mask) |
Clears the edge detection status flags of relative mask. More... | |
void | XBARA_SetOutputSignalConfig (XBARA_Type *base, xbar_output_signal_t output, const xbara_control_config_t *controlConfig) |
Configures the XBARA control register. More... | |
struct xbara_control_config_t |
This structure keeps the configuration of XBARA control register for one output. Control registers are available only for a few outputs. Not every XBARA module has control registers.
Data Fields | |
xbara_active_edge_t | activeEdge |
Active edge to be detected. More... | |
xbara_request_t | requestType |
Selects DMA/Interrupt request. More... | |
xbara_active_edge_t xbara_control_config_t::activeEdge |
xbara_request_t xbara_control_config_t::requestType |
enum xbara_active_edge_t |
enum xbara_request_t |
enum xbara_status_flag_t |
This provides constants for the XBARA status flags for use in the XBARA functions.
void XBARA_Init | ( | XBARA_Type * | base | ) |
This function un-gates the XBARA clock.
base | XBARA peripheral address. |
void XBARA_Deinit | ( | XBARA_Type * | base | ) |
This function disables XBARA clock.
base | XBARA peripheral address. |
void XBARA_SetSignalsConnection | ( | XBARA_Type * | base, |
xbar_input_signal_t | input, | ||
xbar_output_signal_t | output | ||
) |
This function connects the XBARA input to the selected XBARA output. If more than one XBARA module is available, only the inputs and outputs from the same module can be connected.
Example:
base | XBARA peripheral address. |
input | XBARA input signal. |
output | XBARA output signal. |
uint32_t XBARA_GetStatusFlags | ( | XBARA_Type * | base | ) |
This function gets the active edge detect status of all XBARA_OUTs. If the active edge occurs, the return value is asserted. When the interrupt or the DMA functionality is enabled for the XBARA_OUTx, this field is 1 when the interrupt or DMA request is asserted and 0 when the interrupt or DMA request has been cleared.
base | XBARA peripheral address. |
void XBARA_ClearStatusFlags | ( | XBARA_Type * | base, |
uint32_t | mask | ||
) |
base | XBARA peripheral address. |
mask | the status flags to clear. |
void XBARA_SetOutputSignalConfig | ( | XBARA_Type * | base, |
xbar_output_signal_t | output, | ||
const xbara_control_config_t * | controlConfig | ||
) |
This function configures an XBARA control register. The active edge detection and the DMA/IRQ function on the corresponding XBARA output can be set.
Example:
base | XBARA peripheral address. |
output | XBARA output number. |
controlConfig | Pointer to structure that keeps configuration of control register. |