RTEMS 6.1-rc5
Loading...
Searching...
No Matches
Data Structures | Macros | Typedefs | Enumerations
Xbara

Data Structures

struct  XBARAControlConfig
 Defines the configuration structure of the XBARA control register. More...
 

Macros

#define FSL_XBARA_DRIVER_VERSION   (MAKE_VERSION(2, 0, 5))
 
#define XBARA_SELx(base, output)   (((volatile uint16_t *)(&((base)->SEL0)))[(uint32_t)(output) / 2UL])
 
#define XBARA_WR_SELx_SELx(base, input, output)   XBARA_SetSignalsConnection((base), (input), (output))
 
#define kXBARA_RequestInterruptEnalbe   kXBARA_RequestInterruptEnable
 

Typedefs

typedef enum _xbara_active_edge xbara_active_edge_t
 XBARA active edge for detection.
 
typedef enum _xbar_request xbara_request_t
 Defines the XBARA DMA and interrupt configurations.
 
typedef enum _xbara_status_flag_t xbara_status_flag_t
 XBARA status flags.
 
typedef struct XBARAControlConfig xbara_control_config_t
 Defines the configuration structure of the XBARA control register.
 

Enumerations

enum  _xbara_active_edge { kXBARA_EdgeNone = 0U , kXBARA_EdgeRising = 1U , kXBARA_EdgeFalling = 2U , kXBARA_EdgeRisingAndFalling = 3U }
 XBARA active edge for detection. More...
 
enum  _xbar_request { kXBARA_RequestDisable = 0U , kXBARA_RequestDMAEnable = 1U , kXBARA_RequestInterruptEnable = 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.
 
void XBARA_Deinit (XBARA_Type *base)
 Shuts down the XBARA module.
 
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.
 
uint32_t XBARA_GetStatusFlags (XBARA_Type *base)
 Gets the active edge detection status.
 
void XBARA_ClearStatusFlags (XBARA_Type *base, uint32_t mask)
 Clears the edge detection status flags of relative mask.
 
void XBARA_SetOutputSignalConfig (XBARA_Type *base, xbar_output_signal_t output, const xbara_control_config_t *controlConfig)
 Configures the XBARA control register.
 

Detailed Description

Typedef Documentation

◆ xbara_control_config_t

Defines the configuration structure of the XBARA control register.

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.

◆ xbara_status_flag_t

XBARA status flags.

This provides constants for the XBARA status flags for use in the XBARA functions.

Enumeration Type Documentation

◆ _xbar_request

Defines the XBARA DMA and interrupt configurations.

Enumerator
kXBARA_RequestDisable 

Interrupt and DMA are disabled.

kXBARA_RequestDMAEnable 

DMA enabled, interrupt disabled.

kXBARA_RequestInterruptEnable 

Interrupt enabled, DMA disabled.

◆ _xbara_active_edge

XBARA active edge for detection.

Enumerator
kXBARA_EdgeNone 

Edge detection status bit never asserts.

kXBARA_EdgeRising 

Edge detection status bit asserts on rising edges.

kXBARA_EdgeFalling 

Edge detection status bit asserts on falling edges.

kXBARA_EdgeRisingAndFalling 

Edge detection status bit asserts on rising and falling edges.

◆ _xbara_status_flag_t

XBARA status flags.

This provides constants for the XBARA status flags for use in the XBARA functions.

Enumerator
kXBARA_EdgeDetectionOut0 

XBAR_OUT0 active edge interrupt flag, sets when active edge detected.

kXBARA_EdgeDetectionOut1 

XBAR_OUT1 active edge interrupt flag, sets when active edge detected.

kXBARA_EdgeDetectionOut2 

XBAR_OUT2 active edge interrupt flag, sets when active edge detected.

kXBARA_EdgeDetectionOut3 

XBAR_OUT3 active edge interrupt flag, sets when active edge detected.

Function Documentation

◆ XBARA_ClearStatusFlags()

void XBARA_ClearStatusFlags ( XBARA_Type base,
uint32_t  mask 
)

Clears the edge detection status flags of relative mask.

Parameters
baseXBARA peripheral address.
maskthe status flags to clear.

brief Clears the edge detection status flags of relative mask.

param base XBARA peripheral address. param mask the status flags to clear.

◆ XBARA_Deinit()

void XBARA_Deinit ( XBARA_Type base)

Shuts down the XBARA module.

This function disables XBARA clock.

Parameters
baseXBARA peripheral address.

brief Shuts down the XBARA module.

This function disables XBARA clock.

param base XBARA peripheral address.

◆ XBARA_GetStatusFlags()

uint32_t XBARA_GetStatusFlags ( XBARA_Type base)

Gets the active edge detection status.

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.

Parameters
baseXBARA peripheral address.
Returns
the mask of these status flag bits.

brief Gets the active edge detection status.

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.

param base XBARA peripheral address. return the mask of these status flag bits.

◆ XBARA_Init()

void XBARA_Init ( XBARA_Type base)

Initializes the XBARA module.

This function un-gates the XBARA clock.

Parameters
baseXBARA peripheral address.

brief Initializes the XBARA module.

This function un-gates the XBARA clock.

param base XBARA peripheral address.

◆ XBARA_SetOutputSignalConfig()

void XBARA_SetOutputSignalConfig ( XBARA_Type base,
xbar_output_signal_t  output,
const xbara_control_config_t controlConfig 
)

Configures the XBARA control register.

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:

userConfig.requestType = kXBARA_RequestInterruptEnalbe;
XBARA_SetOutputSignalConfig(XBARA, kXBARA_OutputDMAMUX18, &userConfig);
void XBARA_SetOutputSignalConfig(XBARA_Type *base, xbar_output_signal_t output, const xbara_control_config_t *controlConfig)
Configures the XBARA control register.
Definition: fsl_xbara.c:206
@ kXBARA_EdgeRising
Definition: fsl_xbara.h:40
Defines the configuration structure of the XBARA control register.
Definition: fsl_xbara.h:80
xbara_request_t requestType
Definition: fsl_xbara.h:82
xbara_active_edge_t activeEdge
Definition: fsl_xbara.h:81
Parameters
baseXBARA peripheral address.
outputXBARA output number.
controlConfigPointer to structure that keeps configuration of control register.

brief Configures the XBARA control register.

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: code xbara_control_config_t userConfig; userConfig.activeEdge = kXBARA_EdgeRising; userConfig.requestType = kXBARA_RequestInterruptEnalbe; XBARA_SetOutputSignalConfig(XBARA, kXBARA_OutputDMAMUX18, &userConfig); endcode

param base XBARA peripheral address. param output XBARA output number. param controlConfig Pointer to structure that keeps configuration of control register.

◆ XBARA_SetSignalsConnection()

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.

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:

XBARA_SetSignalsConnection(XBARA, kXBARA_InputPIT_TRG0, kXBARA_OutputDMAMUX18);
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.
Definition: fsl_xbara.c:121
Parameters
baseXBARA peripheral address.
inputXBARA input signal.
outputXBARA output signal.

brief Sets a connection between the selected XBARA_IN[*] input and the XBARA_OUT[*] output signal.

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: code XBARA_SetSignalsConnection(XBARA, kXBARA_InputPIT_TRG0, kXBARA_OutputDMAMUX18); endcode

param base XBARA peripheral address. param input XBARA input signal. param output XBARA output signal.