📄 csl_edma.h
字号:
pStatus pointer for returning status of the function call
@endverbatim
*
* <b> Return Value </b>
* CSL_EdmaHandle
* Valid EDMA instance handle will be returned if status value is
* equal to CSL_SOK.
*
* <b> Pre Condition </b>
* @n @a CSL_edmaInit() must be called successfully.
*
* <b> Post Condition </b>
* @n None
*
* @b Modifies
* @n None
*
* @b Example:
* @verbatim
CSL_EdmaObj ModuleObj;
CSL_EdmaHandle hModHndl;
CSL_EdmaRegionParam regParam;
CSL_EdmaRegionObj RegionObj;
CSL_EdmaRegionHndl shHndl;
CSL_Status status;
CSL_EdmaChanObj ChObj;
CSL_EdmaChanHandle chHndl;
// Initialization
CSL_edmaInit(NULL);
// Open Module
edmaHndl = CSL_edmaOpen(NULL,CSL_EDMA_0,NULL,&modStatus);
// Region Open
regParam.regionNum = CSL_EDMA_REGION_0;
shHndl = CSL_edmaRegionOpen(&RegionObj,CSL_EDMA_0,®Param,&status);
@endverbatim
*
* ===========================================================================
*/
CSL_EdmaRegionHandle CSL_edmaRegionOpen(
/** pointer to the object that holds reference to the shadow region opened */
CSL_EdmaRegionObj *edmaShObj,
/** instance of EDMA whose shadow region is requested for open */
CSL_InstNum edmaNum,
/** parameters associated */
CSL_EdmaRegionParam *param,
/** points to the placeholder for the status (success/errors) of the call */
CSL_Status *status
);
/** ===========================================================================
* @n@b CSL_EdmaRegionClose
*
* @brief
* The shadow region is returned to the available pool of shadow regions
*
* @b Arguments
* @verbatim
hRegion Shadow region handle
@endverbatim
*
* <b> Return Value CSL_Status
* @li CSL_SOK - EDMA is closed
* successfully
*
* @li CSL_ESYS_BADHANDLE - The handle passed is invalid
*
* <b> Pre Condition
* @n None
*
* <b> Post Condition
* @n 1. The EDMA CSL APIs can not be called until the EDMA
* CSL is reopened again using CSL_uartOpen()
*
* @b Modifies
* @n None
*
* <b> Usage Constraints: </b>
* BCSL_edmaInit(), CSL_edmaOpen(), CSL_edmaRegionOpen() must have been called
* successfully before this function can be called..
*
* @b Example:
* @verbatim
CSL_EdmaObj ModuleObj;
* CSL_EdmaHandle hModHndl;
*
* CSL_EdmaRegionObj RegionObj;
* CSL_EdmaRegionHndl shHndl;
*
* CSL_EdmaChanObj ChObj;
* CSL_EdmaChanHandle chHndl;
*
* // Initialization
CSL_edmaInit(NULL);
// Open Module
edmaHndl = CSL_edmaOpen(NULL,CSL_EDMA_0,NULL,&modStatus);
// Region Open
regParam.regionNum = CSL_EDMA_REGION_0;
shHndl = CSL_edmaRegionOpen(&RegionObj,CSL_EDMA_0,®Param,&status);
*
* // Close the Region Region
* CSL_edmaRegionClose(shHndl);
@endverbatim
*
* ============================================================================
*/
CSL_Status CSL_edmaRegionClose(
/** Shadow region handle */
CSL_EdmaRegionHandle hRegions
);
/** ============================================================================
* @n@b CSL_edmaHwRegionControl
*
* @b Description
* @n Takes a command with an optional argument & implements it. This function
* is used to carry out/set attributes of the Shadow Region registers
*
*
* @b Arguments
* @verbatim
hRegion Shadow region handle
cmd Shadow region command
cmdarg Additional command arguments are passed to the API
using this. The CSL function type casts to the
appropriate arguments type depending on
* the cmd.
@endverbatim
*
* <b> Return Value </b> CSL_Status
* @li CSL_SOK - Command execution successful.
* @li CSL_ESYS_BADHANDLE - Invalid handle
* @li CSL_ESYS_INVCMD - Invalid command
*
* <b> Pre Condition </b>
* @n None
*
* <b> Post Condition </b>
* @n Registers of the EDMA instance are configured according to the command
* and the command arguments. The command determines which registers are
* modified.
*
* @b Modifies
* @n Registers determined by the command
*
* <b> Usage Constraints: </b>
* CSL_edmaInit(), CSL_edmaOpen(), CSL_edmaRegionOpen() must have been
* called successfully before this function can be called.
* The user must allocate space for this and this API fills in the system
* specified fields.
*
* @b Example:
* @verbatim
CSL_EdmaRegionObj RegionObj;
CSL_EdmaRegionHndl shHndl;
CSL_EdmaRegionParam regParam;
CSL_EdmaChanObj ChObj;
CSL_EdmaChanHandle chHndl;
CSL_BitMask32 intrEnable[2];
CSL_EdmaHandle hModHndl;
CSL_Status modStatus;
// Initialize
modStatus = CSL_edmaInit(NULL);
...
hModHndl = CSL_edmaOpen(NULL,CSL_EDMA_0,NULL,&modStatus);
// Hw Status Revision
modStatus = CSL_edmaGetHwStatus(hModHndl,CSL_EDMA_QUERY_REVISION,
&revision);
// Region 0 Open
regParam.regionNum = CSL_EDMA_REGION_0;
shHndl = CSL_edmaRegionOpen(&RegionObj,CSL_EDMA_0,®Param,&status);
// Enables the Shadow Region interrupts
intrEnable[0] = 0x0000ffff;
intrEnable[1] = 0xffff0000;
CSL_edmaHwRegionControl(shHndl,
CSL_EDMA_CMD_REGION_INTERRUPT_ENABLE,
intrEnable
);
@endverbatim
*
*
* ============================================================================
*/
CSL_Status CSL_edmaHwRegionControl
(
/** Shadow region handle */
CSL_EdmaRegionHandle hRegion,
/** The command to this API which indicates the action to be taken */
CSL_EdmaHwRegionControlCmd cmd,
/** Optional argument @a void* casted */
void *cmdArg
);
/* Top level Shadow Query API */
/** ============================================================================
* @n@b CSL_edmaGetHwRegionStatus
*
* @b Description
* @n Queries the status paramaters of the shadow region.
*
* @b Arguments
* @verbatim
hEdma Handle to the EDMA instance
myQuery Shadow region query
response Additional query arguments are passed to the API
using the response structure. The query response is
passed back to the user program using this pointer.
Depending on the 'myQuery' this argument is type
casted appropriately.
@endverbatim
*
* <b> Return Value </b> CSL_Status
* @li CSL_SOK - Successful completion of the
* query
*
* @li CSL_ESYS_BADHANDLE - Invalid handle
*
* @li CSL_ESYS_INVQUERY - Query command not supported
*
* <b> Pre Condition </b>
* @n None
*
* <b> Post Condition </b>
* Data requested by the query is returned through the variable "response"
*
* @b Modifies
* @n The input arguement "response" is modified
*
* <b> Usage Constraints: </b>
* CSL_edmaInit(), CSL_edmaOpen(), CSL_edmaRegionOpen() must have been
* called successfully before this function can be called.The user must
* allocate space for this and this API fills in the system specified fields
*
* @b Example:
* @verbatim
CSL_EdmaRegionObj RegionObj;
CSL_EdmaRegionHndle shHndl;
CSL_EdmaRegionParam regParam;
CSL_EdmaChanObj ChObj;
CSL_EdmaChanHandle chHndl;
CSL_BitMask32 intrEnable[2];
CSL_EdmaHandle hModHndl;
CSL_Status modStatus;
// Initialize
modStatus = CSL_edmaInit(NULL);
...
hModHndl = CSL_edmaOpen(NULL,CSL_EDMA_0,NULL,&modStatus);
// Region 0 Open
regParam.regionNum = CSL_EDMA_REGION_0;
shHndl = CSL_edmaRegionOpen(&RegionObj,CSL_EDMA_0,®Param,&status);
// Query the shadow region
CSL_edmaGetHwRegionStatus(shHndl,
CSL_EDMA_QUERY_REGION_INTERRUPT_PENDSTATUS,
intrPend
);
@endverbatim
*
* ============================================================================
*/
CSL_Status CSL_edmaGetHwRegionStatus(
/** Shadow region handle */
CSL_EdmaRegionHandle hRegion,
/** The query to this API which indicates the status/setup
* to be returned */
CSL_EdmaHwRegionStatusQuery myQuery,
/** Placeholder to return the status; @a void* casted */
void *response
);
/**
@}
*/
/**
@addtogroup CSL_EDMA_FUNCTION_CHANNEL
@{
*/
/** ============================================================================
* @n@b CSL_edmaChannelOpen
*
* @b Description
* @n Reserves the specified EDMA Channel for use. The channel can be
* re-opened anytime after it has been normally closed if so required. The
* handle returned by this call is input as an essential argument for many
* of the APIs described for this module.
*
* @b Arguments
* @verbatim
hRegion Shadow region handle
edmaObj Pointer to the EDMA Handle Object - to be allocated
by the user.
edmaNum Instance of the EDMA to be opened.
param Channel specific parameters
status Pointer to CSL Status.
@endverbatim
*
* <b> Return Value </b>
* CSL_EdmaHandle
* Valid EDMA instance handle will be returned if status value is
* equal to CSL_SOK.
*
* <b> Pre Condition </b>
* @n @a CSL_edmaInit() must be called successfully.
*
* <b> Post Condition </b>
* @n None
*
* @b Modifies
* @n None
*
*
* <b> Usage Constraints: </b>
* All @a CSL_edmaInit(), @a CSL_edmaOpen() must be
* invoked successfully in that order before this API can be invoked.
* If the channel is opened in context of a Region, @a CSL_edmaRegionOpen()
* may also need to be invoked before this API. If a Shadow region is used
* then care of the DRAE settings must be taken.
*
* Memory for the CSL_EdmaChanObj must be allocated outside
* this call.
*
* @b Example:
* @verbatim
CSL_EdmaHandle hModule;
CSL_EdmaChanObj ChObj;
CSL_EdmaChanHandle hChannel;
CSL_EdmaChannelParam chParam;
CSL_Status edmaStatus;
// Initialization
CSL_edmaInit();
// Module Level Open
hModule = CSL_edmaOpen(NULL,CSL_EDMA_0,NULL,&edmaStatus);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -