Kinetis SDK v.1.3 API Reference Manual  Rev. 0
Freescale Semiconductor, Inc.
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages

Overview

This section describes the programming interface of the XBAR HAL driver. This layer containt APIs for XBARA (XBAR in KM3x device case)and XBARB (if present) module.

Enumerations

enum  xbar_active_edge_t {
  kXbarEdgeNone = 0U,
  kXbarEdgeRising = 1U,
  kXbarEdgeFalling = 2U,
  kXbarEdgeRisingAndFalling = 3U
}
 XBAR active edge for detection. More...
 
enum  xbar_status_t {
  kStatus_XBAR_Success = 0U,
  kStatus_XBAR_InvalidArgument = 1U,
  kStatus_XBAR_Initialized = 2U,
  kStatus_XBAR_Failed = 3U
}
 Defines XBAR status return codes. More...
 

Functions

void XBARA_HAL_Init (XBARA_Type *baseAddr)
 Initializes the XBARA module to the reset state. More...
 
static void XBARA_HAL_SetOutSel (XBARA_Type *baseAddr, uint32_t outIndex, uint32_t input)
 Selects which of the shared inputs XBARA_IN[*] is muxed to selected output XBARA_OUT[*]. More...
 
static uint32_t XBARA_HAL_GetOutSel (XBARA_Type *baseAddr, uint32_t outIndex)
 Gets input XBARA_IN[*] muxed to selected output XBARA_OUT[*]. More...
 
static void XBARA_HAL_SetDMAOutCmd (XBARA_Type *baseAddr, uint32_t outIndex, bool enable)
 Sets the DMA function on the corresponding XBARA_OUT[*] output. More...
 
static void XBARA_HAL_SetIntOutCmd (XBARA_Type *baseAddr, uint32_t outIndex, bool enable)
 Sets the interrupt function on the corresponding XBARA_OUT[*] output. More...
 
static bool XBARA_HAL_GetDMAOutCmd (XBARA_Type *baseAddr, uint32_t outIndex)
 Checks whether the DMA function is enabled or disabled on the corresponding XBARA_OUT[*] output. More...
 
static bool XBARA_HAL_GetIntOutCmd (XBARA_Type *baseAddr, uint32_t outIndex)
 Checks whether the interrupt function is enabled or disabled on the corresponding XBARA_OUT[*] output. More...
 
static void XBARA_HAL_SetOutActiveEdge (XBARA_Type *baseAddr, uint32_t outIndex, xbar_active_edge_t edge)
 Selects which edges on the corresponding XBARA_OUT[*] output cause STSn to assert. More...
 
static xbar_active_edge_t XBARA_HAL_GetOutActiveEdge (XBARA_Type *baseAddr, uint32_t outIndex)
 Gets which edges on the corresponding XBARA_OUT[*] output cause STSn to assert. More...
 
static void XBARA_HAL_ClearEdgeDetectionStatus (XBARA_Type *baseAddr, uint32_t outIndex)
 Clears the edge detection status for the corresponding XBARA_OUT[*] output. More...
 
static bool XBARA_HAL_GetEdgeDetectionStatus (XBARA_Type *baseAddr, uint32_t outIndex)
 Gets the edge detection status for the corresponding XBARA_OUT[*] output. More...
 
void XBARB_HAL_Init (XBARB_Type *baseAddr)
 Initializes the XBARB module to the reset state. More...
 
static void XBARB_HAL_SetOutSel (XBARB_Type *baseAddr, uint32_t outIndex, uint32_t input)
 Selects which of the shared inputs XBARB_IN[*] is muxed to selected output XBARB_OUT[*] . More...
 
static uint32_t XBARB_HAL_GetOutSel (XBARB_Type *baseAddr, uint32_t outIndex)
 Gets input XBARB_IN[*] muxed to selected output XBARB_OUT[*] . More...
 

Enumeration Type Documentation

Enumerator
kXbarEdgeNone 

Edge detection status bit never asserts.

kXbarEdgeRising 

Edge detection status bit asserts on rising edges.

kXbarEdgeFalling 

Edge detection status bit asserts on falling edges.

kXbarEdgeRisingAndFalling 

Edge detection status bit asserts on rising and falling edges.

Enumerator
kStatus_XBAR_Success 

Success.

kStatus_XBAR_InvalidArgument 

Invalid argument existed.

kStatus_XBAR_Initialized 

XBAR has been already initialized.

kStatus_XBAR_Failed 

Execution failed.

Function Documentation

void XBARA_HAL_Init ( XBARA_Type *  baseAddr)
Parameters
baseAddrRegister base address for XBAR module.
static void XBARA_HAL_SetOutSel ( XBARA_Type *  baseAddr,
uint32_t  outIndex,
uint32_t  input 
)
inlinestatic

This function selects which of the shared inputs XBARA_IN[*] is muxed to selected output XBARA_OUT[*].

Parameters
baseAddrRegister base address for XBARA module.
inputInput to be muxed to selected XBARA_OUT[*] output.
outIndexSelected output XBARA_OUT[*].
static uint32_t XBARA_HAL_GetOutSel ( XBARA_Type *  baseAddr,
uint32_t  outIndex 
)
inlinestatic

This function gets input XBARA_IN[*] muxed to selected output XBARA_OUT[*].

Parameters
baseAddrRegister base address for XBAR module.
outIndexSelected XBARA_OUT[*] output.
Returns
Input XBARA_IN[*] muxed to selected XBARA_OUT[*] output.
static void XBARA_HAL_SetDMAOutCmd ( XBARA_Type *  baseAddr,
uint32_t  outIndex,
bool  enable 
)
inlinestatic

This function sets the DMA function on the corresponding XBARA_OUT[*]. When the interrupt is enabled, the output INT_REQn reflects the value STSn. When the interrupt is disabled, INT_REQn remains low. The interrupt request is cleared by writing a 1 to STSn.

Parameters
baseAddrRegister base address for XBARA module.
outIndexSelected XBARA_OUT[*] output.
enableBool value for enable or disable DMA request.
static void XBARA_HAL_SetIntOutCmd ( XBARA_Type *  baseAddr,
uint32_t  outIndex,
bool  enable 
)
inlinestatic

This function sets the interrupt function on the corresponding XBARA_OUT[*]. When enabled, DMA_REQn presents the value STSn. When disabled, the DMA_REQn output remains low.

Parameters
baseAddrRegister base address for XBARA module.
outIndexSelected XBARA_OUT[*] output.
enableBool value for enable or disable interrupt.
static bool XBARA_HAL_GetDMAOutCmd ( XBARA_Type *  baseAddr,
uint32_t  outIndex 
)
inlinestatic
Parameters
baseAddrRegister base address for XBARA module.
outIndexSelected XBARA_OUT[*] output.
Returns
DMA function is enabled (true) or disabled (false).
static bool XBARA_HAL_GetIntOutCmd ( XBARA_Type *  baseAddr,
uint32_t  outIndex 
)
inlinestatic
Parameters
baseAddrRegister base address for XBARA module.
outIndexSelected XBARA_OUT[*] output.
Returns
Interrupt function is enabled (true) or disabled (false).
static void XBARA_HAL_SetOutActiveEdge ( XBARA_Type *  baseAddr,
uint32_t  outIndex,
xbar_active_edge_t  edge 
)
inlinestatic

This function selects which edges on the corresponding XBARA_OUT[*] output cause STSn to assert.

Parameters
baseAddrRegister base address for XBAR module.
outIndexSelected XBARA_OUT[*] output.
edgeActive edge for edge detection.
static xbar_active_edge_t XBARA_HAL_GetOutActiveEdge ( XBARA_Type *  baseAddr,
uint32_t  outIndex 
)
inlinestatic

This function gets which edges on the corresponding XBARA_OUT[*] output cause STSn to assert.

Parameters
baseAddrRegister base address for XBARA module.
outIndexSelected XBARA_OUT[*] output.
Returns
Active edge for edge detection on corresponding XBARA_OUT[*] output.
static void XBARA_HAL_ClearEdgeDetectionStatus ( XBARA_Type *  baseAddr,
uint32_t  outIndex 
)
inlinestatic
Parameters
baseAddrRegister base address for XBARA module.
outIndexSelected XBARA_OUT[*] output.
static bool XBARA_HAL_GetEdgeDetectionStatus ( XBARA_Type *  baseAddr,
uint32_t  outIndex 
)
inlinestatic
Parameters
baseAddrRegister base address for XBARA module.
outIndexSelected XBARA_OUT[*] output.
Returns
Active edge detected (true) or not yet detected (false) on corresponind XBARA_OUT[*] output.
void XBARB_HAL_Init ( XBARB_Type *  baseAddr)
Parameters
baseAddrRegister base address for XBARB module.
static void XBARB_HAL_SetOutSel ( XBARB_Type *  baseAddr,
uint32_t  outIndex,
uint32_t  input 
)
inlinestatic

This function selects which of the shared inputs XBARB_IN[*] is muxed to selected output XBARB_OUT[*]

Parameters
baseAddrRegister base address for XBARB module.
outIndexSelected XBARB_OUT[*] output.
inputInput to be muxed to selected XBARB_OUT[*] output.
static uint32_t XBARB_HAL_GetOutSel ( XBARB_Type *  baseAddr,
uint32_t  outIndex 
)
inlinestatic

This function gets input XBARB_IN[*] muxed to selected output XBARB_OUT[*]

Parameters
baseAddrRegister base address for XBARB module.
outIndexSelected XBARB_OUT[*] output.
Returns
Input XBARB_IN[*] muxed to selected XBARB_OUT[*] output.