📄 csl_edma3aux.h
字号:
*
* @b Modifies
* @n None
*
* @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_edma3EventQueueThresholdSet(hModule,CSL_EDMA3_QUE_0,
CSL_EDMA3_QUE_THR9);
...
@endverbatim
* ===========================================================================
*/
CSL_IDEF_INLINE CSL_Status CSL_edma3EventQueueThresholdSet (
CSL_Edma3Handle hModule,
CSL_Edma3Que que,
CSL_Edma3QueThr threshold
)
{
CSL_FINSR(hModule->regs->QWMTHRA, (8 * que + 4),(8 * que),threshold);
return CSL_SOK;
}
/* =============================================================================
* @n@b CSL_edma3ErrorEval
*
* @b Description
* @n This API enables enables evaluation of errros for the specified
* view/shadow region.Sets EVAL bit of the EEVAL register in the Global
* register space
*
* @b Arguments
* @verbatim
hModule Module Handle
@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_edma3ErrorEval() can be called.
*
* <b> Post Condition </b>
* @n None
*
* @b Modifies
* @n None
*
* @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_edma3ErrorEval(hModule);
...
@endverbatim
* ===========================================================================
*/
CSL_IDEF_INLINE CSL_Status CSL_edma3ErrorEval (
CSL_Edma3Handle hModule
)
{
hModule->regs->EEVAL = 1;
return CSL_SOK;
}
/* =============================================================================
* @n@b CSL_edma3InterruptEnable
*
* @b Description
* @n Enables the specified interrupt in the Global Channel register space.
* This API enables the interrupts as specified in the BitMask.
*
* @b Arguments
* @verbatim
hModule Module Handle
region Region Number
intrLo Interrupt 0-31 (BitMask32) to be enabled
intrHi Interrupt 32-63 (BitMask32) to be enabled
@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_edma3InterruptEnable() can be called.
*
* <b> Post Condition </b>
* @n None
*
* @b Modifies
* @n None
*
* @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);
// Interrupts 5-7 enabled
status = CSL_edma3InterruptEnable(hModule,0x000000E0, 0x0);
...
@endverbatim
* ===========================================================================
*/
CSL_IDEF_INLINE CSL_Status CSL_edma3InterruptEnable (
CSL_Edma3Handle hModule,
Int region,
CSL_BitMask32 intrLo,
CSL_BitMask32 intrHi
)
{
if (region != CSL_EDMA3_REGION_GLOBAL) {
hModule->regs->SHADOW[region].IESR = intrLo;
hModule->regs->SHADOW[region].IESRH = intrHi;
}
else {
hModule->regs->IESR = intrLo;
hModule->regs->IESRH = intrHi;
}
return CSL_SOK;
}
/* =============================================================================
* @n@b CSL_edma3InterruptDisable
*
* @b Description
* @n Disables the specified interrupt in the Global Channel register space.
* This API disables the interrupts as specified in the BitMask.
*
* @b Arguments
* @verbatim
hModule Module Handle
region Region Number
intrLo Interrupt 0-31 (BitMask32) to be disabled
intrHi Interrupt 32-63 (BitMask32) to be disabled
@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_edma3InterruptEnable() can be called.
*
* <b> Post Condition </b>
* @n None
*
* @b Modifies
* @n None
*
* @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);
// Interrupts 5-7 disabled
status = CSL_edma3InterruptDisable(hModule,0x000000E0, 0x0);
...
@endverbatim
* ===========================================================================
*/
CSL_IDEF_INLINE CSL_Status CSL_edma3InterruptDisable (
CSL_Edma3Handle hModule,
Int region,
CSL_BitMask32 intrLo,
CSL_BitMask32 intrHi
)
{
if (region !=CSL_EDMA3_REGION_GLOBAL) {
hModule->regs->SHADOW[region].IECR = intrLo;
hModule->regs->SHADOW[region].IECRH = intrHi;
}
else {
hModule->regs->IECR = intrLo;
hModule->regs->IECRH = intrHi;
}
return CSL_SOK;
}
/* =============================================================================
* @n@b CSL_edma3InterruptClear
*
* @b Description
* @n This API clears the interrupt as specified.Clears the specified
* interrupt in the Global Channel register space.
*
* @b Arguments
* @verbatim
hModule Module Handle
region Region Number
intrLo Interrupt 0-31 (BitMask32) to be cleared
intrHi Interrupt 32-63 (BitMask32) to be cleared
@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_edma3InterruptClear() can be called.
*
* <b> Post Condition </b>
* @n None
*
* @b Modifies
* @n None
*
* @b Example
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -