📄 csl_edma3aux.h
字号:
* @n None
*
* @b Modifies
* @n Disables shadow region access bits DRAE,DRAEH
*
* @b Example
* @verbatim
CSL_Edma3Handle hModule;
CSL_Edma3HwSetup hwSetup,gethwSetup;
CSL_Edma3Obj edmaObj;
CSL_Edma3ParamHandle hParamPing,hParamPong,hParamBasic;
CSL_Edma3ChannelObj ChObj;
CSL_Edma3QueryInfo info;
CSL_Edma3CmdIntr regionIntr;
CSL_Edma3CmdDrae regionAccess;
CSL_Edma3ChannelHandle hChannel;
CSL_Edma3ParamSetup myParamSetup;
CSL_Edma3Context context;
CSL_Edma3ChannelAttr chAttr;
CSL_Edma3HwChannelSetup dmahwSetup[CSL_EDMA3_NUM_DMACH] = \
CSL_EDMA3_DMACHANNELSETUP_DEFAULT;
CSL_Edma3HwChannelSetup getdmahwSetup[CSL_EDMA3_NUM_DMACH];
CSL_Status status;
Uint32 i, passStatus = 1;
// Module Initialization
CSL_edma3Init(&context);
// Module Level Open
hModule = CSL_edma3Open(&edmaObj,CSL_EDMA3,NULL,&status);
// Module Setup
hwSetup.dmaChaSetup = &dmahwSetup[0];
hwSetup.qdmaChaSetup = NULL;
CSL_edma3HwSetup(hModule,&hwSetup);
// Channel 0 Open in context of Shadow region 0
chAttr.regionNum = CSL_EDMA3_REGION_0;
chAttr.chaNum = CSL_EDMA3_CHA_DSP_EVT;
hChannel = CSL_edma3ChannelOpen(&ChObj, CSL_EDMA3,&chAttr, &status);
// Module Control API
status = CSL_edma3DmaRegionAccessDisable(hModule,CSL_EDMA3_REGION_0,
0x000000FF,0x000000FF);
...
@endverbatim
* ===========================================================================
*/
CSL_IDEF_INLINE CSL_Status CSL_edma3DmaRegionAccessDisable (
CSL_Edma3Handle hModule,
Int edmaRegion,
CSL_BitMask32 drae,
CSL_BitMask32 draeh
)
{
if (edmaRegion == CSL_EDMA3_REGION_GLOBAL) {
return CSL_ESYS_INVPARAMS;
}
hModule->regs->DRA[edmaRegion].DRAE &= ~drae;
hModule->regs->DRA[edmaRegion].DRAEH &= ~draeh;
return CSL_SOK;
}
/* =============================================================================
* @n@b CSL_edma3QdmaRegionAccessEnable
*
* @b Description
* @n This API sets the QRAE BitMask.Enables shadow region access bits QRAE
*
* @b Arguments
* @verbatim
hModule Module Handle
edmaRegion Region - this may be specified as one of the many view
supported by the chip or the global memory protection
attributes themselves.
qrae Bitmask to be enabled in QRAE
* @endverbatim
*
* <b> Return Value </b> CSL_Status
* @n CSL_SOK - Qdma Region access enable success
* @n CSL_ESYS_INVPARAMS - Invalid parameter
*
* <b> Pre Condition </b>
* @n All CSL_edma3Init(), CSL_edma3Open(), must be called successfully in
* that order before CSL_edma3QdmaRegionAccessEnable() can be called.
*
* <b> Post Condition </b>
* @n None
*
* @b Modifies
* @n Enable Qdma shadow region access bits QRAE
*
* @b Example
* @verbatim
CSL_Edma3Handle hModule;
CSL_Edma3HwSetup hwSetup,gethwSetup;
CSL_Edma3Obj edmaObj;
CSL_Edma3ParamHandle hParamPing,hParamPong,hParamBasic;
CSL_Edma3ChannelObj ChObj;
CSL_Edma3QueryInfo info;
CSL_Edma3CmdIntr regionIntr;
CSL_Edma3CmdDrae regionAccess;
CSL_Edma3ChannelHandle hChannel;
CSL_Edma3ParamSetup myParamSetup;
CSL_Edma3Context context;
CSL_Edma3ChannelAttr chAttr;
CSL_Edma3HwChannelSetup dmahwSetup[CSL_EDMA3_NUM_DMACH] = \
CSL_EDMA3_DMACHANNELSETUP_DEFAULT;
CSL_Edma3HwChannelSetup getdmahwSetup[CSL_EDMA3_NUM_DMACH];
CSL_Status status;
Uint32 i, passStatus = 1;
// Module Initialization
CSL_edma3Init(&context);
// Module Level Open
hModule = CSL_edma3Open(&edmaObj,CSL_EDMA3,NULL,&status);
// Module Setup
hwSetup.dmaChaSetup = &dmahwSetup[0];
hwSetup.qdmaChaSetup = NULL;
CSL_edma3HwSetup(hModule,&hwSetup);
// Channel 0 Open in context of Shadow region 0
chAttr.regionNum = CSL_EDMA3_REGION_0;
chAttr.chaNum = CSL_EDMA3_CHA_DSP_EVT;
hChannel = CSL_edma3ChannelOpen(&ChObj, CSL_EDMA3, &chAttr, &status);
// Module Control API
status = CSL_edma3QdmaRegionAccessEnable(hModule,CSL_EDMA3_REGION_0,
0x0000000F);
...
@endverbatim
* ===========================================================================
*/
CSL_IDEF_INLINE CSL_Status CSL_edma3QdmaRegionAccessEnable (
CSL_Edma3Handle hModule,
Int edmaRegion,
CSL_BitMask32 qrae
)
{
if (edmaRegion == CSL_EDMA3_REGION_GLOBAL) {
return CSL_ESYS_INVPARAMS;
}
hModule->regs->QRAE[edmaRegion] |= qrae;
return CSL_SOK;
}
/* =============================================================================
* @n@b CSL_edma3QdmaRegionAccessDisable
*
* @b Description
* @n This API clears the QRAE BitMask.Disables shadow region access bits QRAE
*
* @b Arguments
* @verbatim
hModule Module Handle
edmaRegion Region - this may be specified as one of the many view
supported by the chip or the global memory protection
attributes themselves.
access Region bits to be programmed
qrae Bitmask to be enabled in QRAE
* @endverbatim
*
* <b> Return Value </b> CSL_Status
* @n CSL_SOK - Qdma Region access enable success
* @n CSL_ESYS_INVPARAMS - Invalid parameter
*
* <b> Pre Condition </b>
* @n All CSL_edma3Init(), CSL_edma3Open(), must be called successfully in
* that order before CSL_edma3QdmaRegionAccessDisable() can be called.
*
* <b> Post Condition </b>
* @n None
*
* @b Modifies
* @n Disables Qdma shadow region access bits QRAE
*
* @b Example
* @verbatim
CSL_Edma3Handle hModule;
CSL_Edma3HwSetup hwSetup,gethwSetup;
CSL_Edma3Obj edmaObj;
CSL_Edma3ParamHandle hParamPing,hParamPong,hParamBasic;
CSL_Edma3ChannelObj ChObj;
CSL_Edma3QueryInfo info;
CSL_Edma3CmdIntr regionIntr;
CSL_Edma3CmdDrae regionAccess;
CSL_Edma3ChannelHandle hChannel;
CSL_Edma3ParamSetup myParamSetup;
CSL_Edma3Context context;
CSL_Edma3ChannelAttr chAttr;
CSL_Edma3HwChannelSetup dmahwSetup[CSL_EDMA3_NUM_DMACH] = \
CSL_EDMA3_DMACHANNELSETUP_DEFAULT;
CSL_Edma3HwChannelSetup getdmahwSetup[CSL_EDMA3_NUM_DMACH];
CSL_Status status;
Uint32 i, passStatus = 1;
// Module Initialization
CSL_edma3Init(&context);
// Module Level Open
hModule = CSL_edma3Open(&edmaObj,CSL_EDMA3,NULL,&status);
// Module Setup
hwSetup.dmaChaSetup = &dmahwSetup[0];
hwSetup.qdmaChaSetup = NULL;
CSL_edma3HwSetup(hModule,&hwSetup);
// Channel 0 Open in context of Shadow region 0
chAttr.regionNum = CSL_EDMA3_REGION_0;
chAttr.chaNum = CSL_EDMA3_CHA_DSP_EVT;
hChannel = CSL_edma3ChannelOpen(&ChObj, CSL_EDMA3, &chAttr, &status);
// 4 channels disallowed
status = CSL_edma3QdmaRegionAccessDisable(hModule,CSL_EDMA3_REGION_0,
0x000000FF);
...
@endverbatim
* ===========================================================================
*/
CSL_IDEF_INLINE CSL_Status CSL_edma3QdmaRegionAccessDisable (
CSL_Edma3Handle hModule,
Int edmaRegion,
CSL_BitMask32 qrae
)
{
if (edmaRegion == CSL_EDMA3_REGION_GLOBAL) {
return CSL_ESYS_INVPARAMS;
}
hModule->regs->QRAE[edmaRegion] &= ~qrae;
return CSL_SOK;
}
/* =============================================================================
* @n@b CSL_edma3EventQueuePrioritySet
*
* @b Description
* @n This API sets the Queue priority level to the appropriate value.
*
* @b Arguments
* @verbatim
hModule Module Handle
que Event queue
pri Priority needed to be set for above Event queue
* @endverbatim
*
* <b> Return Value </b> CSL_Status
* @n Always return CSL_SOK
*
* <b> Pre Condition </b>
* @n All CSL_edma3Init(), CSL_edma3Open(), must be called successfully in
* that order before CSL_edma3EventQueuePrioritySet() can be called.
*
* <b> Post Condition </b>
* @n None
*
* @b Modifies
* @n Set event queue priority
*
* @b Example
* @verbatim
CSL_Edma3Handle hModule;
CSL_Edma3HwSetup hwSetup,gethwSetup;
CSL_Edma3Obj edmaObj;
CSL_Edma3ParamHandle hParamPing,hParamPong,hParamBasic;
CSL_Edma3ChannelObj ChObj;
CSL_Edma3QueryInfo info;
CSL_Edma3CmdIntr regionIntr;
CSL_Edma3CmdDrae regionAccess;
CSL_Edma3ChannelHandle hChannel;
CSL_Edma3ParamSetup myParamSetup;
CSL_Edma3Context context;
CSL_Edma3ChannelAttr chAttr;
CSL_Edma3HwChannelSetup dmahwSetup[CSL_EDMA3_NUM_DMACH] = \
CSL_EDMA3_DMACHANNELSETUP_DEFAULT;
CSL_Edma3HwChannelSetup getdmahwSetup[CSL_EDMA3_NUM_DMACH];
CSL_Status status;
Uint32 i, passStatus = 1;
// Module Initialization
CSL_edma3Init(&context);
// Module Level Open
hModule = CSL_edma3Open(&edmaObj,CSL_EDMA3,NULL,&status);
// Module Setup
hwSetup.dmaChaSetup = &dmahwSetup[0];
hwSetup.qdmaChaSetup = NULL;
CSL_edma3HwSetup(hModule,&hwSetup);
// Channel 0 Open in context of Shadow region 0
chAttr.regionNum = CSL_EDMA3_REGION_0;
chAttr.chaNum = CSL_EDMA3_CHA_DSP_EVT;
hChannel = CSL_edma3ChannelOpen(&ChObj, CSL_EDMA3, &chAttr, &status);
status = CSL_edma3EventQueuePrioritySet(hModule,CSL_EDMA3_QUE_0,
CSL_EDMA3_QUE_PRI2);
...
@endverbatim
* ===========================================================================
*/
CSL_IDEF_INLINE CSL_Status CSL_edma3EventQueuePrioritySet (
CSL_Edma3Handle hModule,
CSL_Edma3Que que,
CSL_Edma3QuePri pri
)
{
CSL_FINSR(hModule->regs->QUEPRI, (4 * que + 2), (4 * que), pri);
return CSL_SOK;
}
/* =============================================================================
* @n@b CSL_Edma3QueThresholdSet
*
* @b Description
* @n Sets the specified threshold for the specified queue.This API sets the
* Queue threshold to the appropriate level.
*
* @b Arguments
* @verbatim
hModule Module Handle
que Event queue
threshold Target threshold value for the above queue.
* @endverbatim
*
* <b> Return Value </b> CSL_Status
* @n Always return CSL_SOK
*
* <b> Pre Condition </b>
* @n All CSL_edma3Init(), CSL_edma3Open(), must be called successfully in
* that order before CSL_Edma3QueThresholdSet() can be called.
*
* <b> Post Condition </b>
* @n None
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -