This document consists of sections titled with Driver Overview, Data Structures, Enumerations, Functions, etc., each with an overview list and detailed documentation. It is recommended to read the Driver Overview first for it includes a comprehensive description of the peripheral, driver and driver changes. Other sections give detailed information for APIs, enums, macros, etc., for your further reference.
|
#define | XBARA_SELx(base, output) (((volatile uint16_t *)(&((base)->SEL0)))[(uint8_t)(output) >> 0x01U]) |
| Macro function to extract the XBAR select register address for a given xbar output signal.
|
|
#define | XBARA_CTRLx(base, output) (((volatile uint16_t *)(&((base)->CTRL0)))[(uint8_t)(output) >> 0x01U]) |
| Macro function to extract the XBAR Ctrl register address for a given xbar output signal.
|
|
#define | XBARA_SELx_SELn_SHIFT(output) ((output & 0x01U) ? 8U : 0U) |
| Macro function to get SELn field shift in XBARA_SELx register for a given output signal.
|
|
#define | XBARA_SELx_SELn_MASK(output) ((output & 0x01U) ? 0x3F00U : 0x3FU) |
| Macro function to get SELn field mask in XBARA_SELx register for a given output signal.
|
|
#define | XBARA_SELx_SELn(output, input_signal) (((uint16_t)(((uint16_t)(input_signal)) << XBARA_SELx_SELn_SHIFT(output))) & XBARA_SELx_SELn_MASK(output)) |
| Macro function to create SELn field value in XBARA_SELx register for given output signal and input signal value input_signal, see _xbara_input_signal.
|
|
#define | XBARA_CTRLx_DIENn_MASK(output) ((output & 0x01U) ? 0x300U : 0x03U) |
| Macro function to get DIENn field mask in XBARA_CTRLx register for a given output signal.
|
|
#define | XBARA_CTRLx_DIENn_SHIFT(output) ((output & 0x01U) ? 8U : 0U) |
| Macro function to get DIENn field shift in XBARA_CTRLx register for a given output signal.
|
|
#define | XBARA_CTRLx_DIENn(output, x) (((uint16_t)(((uint16_t)(x)) << XBARA_CTRLx_DIENn_SHIFT(output))) & XBARA_CTRLx_DIENn_MASK(output)) |
| Macro function to create DIENn field value in XBARA_CTRLx register for given output signal and DMA/Interrupt mode x, see _xbara_request.
|
|
#define | XBARA_CTRLx_EDGEn_MASK(output) ((output & 0x01U) ? 0xC00U : 0x0CU) |
| Macro function to get EDGEn field mask in XBARA_CTRLx register for a given output signal.
|
|
#define | XBARA_CTRLx_EDGEn_SHIFT(output) ((output & 0x01U) ? 10U : 2U) |
| Macro function to get EDGEn field shift in XBARA_CTRLx register for a given output signal.
|
|
#define | XBARA_CTRLx_EDGEn(output, x) (((uint16_t)(((uint16_t)(x)) << XBARA_CTRLx_EDGEn_SHIFT(output))) & XBARA_CTRLx_EDGEn_MASK(output)) |
| Macro function to create EDGEn field value in XBARA_CTRLx register for given output signal and edge mode x, see _xbara_active_edge.
|
|
#define | XBARA_CTRLx_STS_MASK (0x1010U) |
| Macro value for the Status bits in CTRL register.
|
|
|
uint16_t | XBARA_GetStatusFlags (XBARA_Type *base) |
| Gets the active edge detection status for all XBAR output signal supporting this feature. More...
|
|
static void | XBARA_ClearStatusFlags (XBARA_Type *base, uint16_t u16Flags) |
| Clear the edge detection status flags of relative mask. 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.
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.
|
Note it only apply for a subset of XBARA output signal.
Enumerator |
---|
kXBARA_RequestDisable |
Interrupt and DMA are disabled.
|
kXBARA_RequestDMAEnable |
DMA enabled, interrupt disabled.
|
kXBARA_RequestInterruptEnable |
Interrupt enabled, DMA disabled.
|
This provides constants for the XBARA status flags for use in the XBARA functions. The enumerator value is designed to make sure Flags in same register can be created with register value to write/read register.
Enumerator |
---|
kXBARA_EdgeDetectionOut0Flag |
XBAR_OUT0 active edge interrupt flag, sets when active edge detected.
|
kXBARA_EdgeDetectionOut1Flag |
XBAR_OUT1 active edge interrupt flag, sets when active edge detected.
|
kXBARA_EdgeDetectionOut2Flag |
XBAR_OUT2 active edge interrupt flag, sets when active edge detected.
|
kXBARA_EdgeDetectionOut3Flag |
XBAR_OUT3 active edge interrupt flag, sets when active edge detected.
|
void XBARA_Init |
( |
XBARA_Type * |
base | ) |
|
This function un-gates the XBARA clock.
- Parameters
-
base | XBARA peripheral address. |
void XBARA_Deinit |
( |
XBARA_Type * |
base | ) |
|
This function disables XBARA clock.
- Parameters
-
base | XBARA peripheral address. |
static void XBARA_SetSignalsConnection |
( |
XBARA_Type * |
base, |
|
|
xbar_input_signal_t |
eInput, |
|
|
xbar_output_signal_t |
eOutput |
|
) |
| |
|
inlinestatic |
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:
- Parameters
-
base | XBARA peripheral address. |
eInput | XBARA input signal. |
eOutput | XBARA output signal. |
static void XBARA_SetActiveEdgeDetectMode |
( |
XBARA_Type * |
base, |
|
|
xbar_output_signal_t |
eOutput, |
|
|
xbara_active_edge_t |
eActiveEdgeMode |
|
) |
| |
|
inlinestatic |
- Parameters
-
base | XBARA peripheral address. |
eOutput | XBARA output signal. |
eActiveEdgeMode | Active edge mode. |
static void XBARA_SetInterruptDMARequestMode |
( |
XBARA_Type * |
base, |
|
|
xbar_output_signal_t |
eOutput, |
|
|
xbara_request_t |
eRequest |
|
) |
| |
|
inlinestatic |
- Parameters
-
base | XBARA peripheral address. |
eOutput | XBARA output signal. |
eRequest | Request type. |
void XBARA_SetOutputSignalConfig |
( |
XBARA_Type * |
base, |
|
|
xbar_output_signal_t |
eOutput, |
|
|
const xbara_control_config_t * |
psControlConfig |
|
) |
| |
This function configures an XBARA control register. The active edge detection and the DMA/IRQ function on the corresponding XBARA output can be set.
- Note
- Only a subset of the XBARA output signal can be called with this API. On debug mode code will check whether the output signal eOutput satisfy the requirement.
Example:
- Parameters
-
base | XBARA peripheral address. |
eOutput | XBARA output number. |
psControlConfig | Pointer to structure that keeps configuration of control register. |
uint16_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.
- Parameters
-
base | XBARA peripheral address. |
- Returns
- ORed value from all status flag from _xbara_status_flag.
static void XBARA_ClearStatusFlags |
( |
XBARA_Type * |
base, |
|
|
uint16_t |
u16Flags |
|
) |
| |
|
inlinestatic |
- Parameters
-
base | XBARA peripheral address. |
u16Flags | status flags composed from ORed _xbara_status_flag indicating flags to be cleared. |