📄 csl_edmaaux.h
字号:
/** =============================================================================
* @n@b CSL_edmaInterruptEnable
*
* @b Description
* @n This API enables the interrupts as specified in the BitMask
*
* @b Arguments
* @verbatim
hMod Module Handle
intrLo interrupt 0-31 (BitMask32) to be enabled
intrHi interrupt 32-63 (BitMask32) to be enabled
@endverbatim
*
* <b> Return Value <b/>
* Status (CSL_SOK)
*
* <b> Pre Condition </b>
* @n @a CSL_edmaOpen() must be called before usage of this API.
*
* <b> Post Condition </b>
* @n None
*
* @b Modifies
* @n None
*
*
* <b> Usage Constraints: </b>
* The EDMA must be succesfully initializedvia @a CSL_edmaInit().
* CSL_edmaOpen() must be called before usage of this API.
*
*
* @b Example:
* @verbatim
CSL_EdmaHandle hModHndl;
CSL_Status modStatus;
// Initialize
modStatus = CSL_edmaInit(NULL);
...
hModHndl = CSL_edmaOpen(NULL,CSL_EDMA_0,NULL,&modStatus);
status = CSL_edmaInterruptEnable(hModHndl,0x000000E0, 0x0);
@endverbatim
*
* ===========================================================================
*/
//#pragma CODE_SECTION (CSL_edmaInterruptEnable, ".text:csl_section:edma");
CSL_IDEF_INLINE CSL_Status CSL_edmaInterruptEnable(
/** module handle to EDMA */
CSL_EdmaHandle hMod,
/** interrupt to be enabled 0-31*/
CSL_BitMask32 intrLo,
/** interrupt to be enabled 32-63*/
CSL_BitMask32 intrHi
)
{
hMod->IESR = intrLo;
hMod->IESRH = intrHi;
return CSL_SOK;
}
/** =============================================================================
* @n@b CSL_edmaInterruptDisable
*
* @b Description
* @n This API disables the interrupts as specified
*
* @b Arguments
* @verbatim
hMod Module Handle
intrLo interrupt 0-31 (BitMask32) to be disabled
intrHi interrupt 32-63 (BitMask32) to be disabled
@endverbatim
*
* <b> Return Value <b/>
* Status (CSL_SOK)
*
* <b> Pre Condition </b>
* @n @a CSL_edmaOpen() must be called before usage of this API.
*
* <b> Post Condition </b>
* @n None
*
* @b Modifies
* @n None
*
*
* <b> Usage Constraints: </b>
* The EDMA must be succesfully initializedvia @a CSL_edmaInit().
* CSL_edmaOpen() must be called before usage of this API.
*
*
* @b Example:
* @verbatim
CSL_EdmaHandle hModHndl;
CSL_Status modStatus;
// Initialize
modStatus = CSL_edmaInit(NULL);
...
hModHndl = CSL_edmaOpen(NULL,CSL_EDMA_0,NULL,&modStatus);
// Interrupt 5,6,7 disabled
status = CSL_edmaInterruptDisable(hModHndl,0x000000E0, 0x0);
@endverbatim
*
* ===========================================================================
*/
//#pragma CODE_SECTION (CSL_edmaInterruptDisable, ".text:csl_section:edma");
CSL_IDEF_INLINE CSL_Status CSL_edmaInterruptDisable(
/** module handle to EDMA */
CSL_EdmaHandle hMod,
/** interrupt to be disabled 0-31*/
CSL_BitMask32 intrLo,
/** interrupt to be disabled 32-63*/
CSL_BitMask32 intrHi
)
{
hMod->IECR = intrLo;
hMod->IECRH = intrHi;
return CSL_SOK;
}
/** =============================================================================
* @n@b CSL_edmaInterruptClear
*
* @b Description
* @n This API clears the interrupt as specified
*
* @b Arguments
* @verbatim
hMod Module Handle
intrLo interrupt 0-31 (BitMask32) to be cleared
intrHi interrupt 32-63 (BitMask32) to be cleared
@endverbatim
*
* <b> Return Value <b/>
* Status (CSL_SOK)
*
* <b> Pre Condition </b>
* @n @a CSL_edmaOpen() must be called before usage of this API.
*
* <b> Post Condition </b>
* @n None
*
* @b Modifies
* @n None
*
*
* <b> Usage Constraints: </b>
* The EDMA must be succesfully initializedvia @a CSL_edmaInit().
* CSL_edmaOpen() must be called before usage of this API.
*
*
* @b Example:
* @verbatim
CSL_EdmaHandle hModHndl;
CSL_Status modStatus;
// Initialize
modStatus = CSL_edmaInit(NULL);
...
hModHndl = CSL_edmaOpen(NULL,CSL_EDMA_0,NULL,&modStatus);
// 5,6,7 cleared
status = CSL_edmaInterruptClear(hModHndl,0x000000E0,0);
@endverbatim
*
* ===========================================================================
*/
//#pragma CODE_SECTION (CSL_edmaInterruptClear, ".text:csl_section:edma");
CSL_IDEF_INLINE CSL_Status CSL_edmaInterruptClear(
/** module handle to EDMA */
CSL_EdmaHandle hMod,
/** interrupt to be cleared 0- 31 */
CSL_BitMask32 intrLo,
/** interrupt to be cleared 32 - 63 */
CSL_BitMask32 intrHi
)
{
hMod->ICR = intrLo;
hMod->ICRH = intrHi;
return CSL_SOK;
}
/** =============================================================================
* @n@b CSL_edmaInterruptEval
*
* @b Description
* @n If any enabled interrutps are pending, the tpcc_intN output signal to
* be pulsed
*
* @b Arguments
* @verbatim
hMod Module Handle
@endverbatim
*
* <b> Return Value <b/>
* Status (CSL_SOK)
*
* <b> Pre Condition </b>
* @n @a CSL_edmaOpen() must be called before usage of this API.
*
* <b> Post Condition </b>
* @n None
*
* @b Modifies
* @n None
*
*
* <b> Usage Constraints: </b>
* The EDMA must be succesfully initializedvia @a CSL_edmaInit().
* CSL_edmaOpen() must be called before usage of this API.
*
*
* @b Example:
* @verbatim
CSL_EdmaHandle hModHndl;
CSL_Status modStatus;
// Initialize
modStatus = CSL_edmaInit(NULL);
...
hModHndl = CSL_edmaOpen(NULL,CSL_EDMA_0,NULL,&modStatus);
status = CSL_edmaInterruptEval(hModHndl);
@endverbatim
*
* ===========================================================================
*/
CSL_IDEF_INLINE CSL_Status CSL_edmaInterruptEval(
/** a handle to the requested channel instance of the specified EDMA
* obtained through the @a CSL_edmaOpen() call */
CSL_EdmaHandle hMod
)
{
hMod->IEVAL = 1;
return CSL_SOK;
}
/**
@}
*/
/**
@addtogroup CSL_EDMA_FUNCTION_SHADOW_INTERNAL
@{
*/
/** =============================================================================
* @n@b CSL_edmaRegionInterruptEnable
*
* @b Description
* @n Enables specified interrupt in the Shadow Region.
*
* @b Arguments
* @verbatim
hSh Shadow Region Handle
intrLo interrupt 0-31 to be enabled
intrHi interrupt 32-63 to be enabled
@endverbatim
*
* <b> Return Value <b/>
* Status (CSL_SOK)
*
* <b> Pre Condition </b>
* @n @a CSL_edmaOpen() must be called before usage of this API.
*
* <b> Post Condition </b>
* @n None
*
* @b Modifies
* @n None
*
*
* <b> Usage Constraints: </b>
* The EDMA must be succesfully initializedvia @a CSL_edmaInit().
* CSL_edmaOpen() must be called before usage of this API.
*
*
* @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);
status = CSL_edmaRegionInterruptEnable(shHndl,0x0000ffff,0xffff0000);
@endverbatim
*
* ===========================================================================
*/
//#pragma CODE_SECTION (CSL_edmaRegionInterruptEnable, ".text:csl_section:edma");
CSL_IDEF_INLINE CSL_Status CSL_edmaRegionInterruptEnable(
/** a handle to the shadow region already opened */
CSL_EdmaRegionHandle hSh,
/** interrupt 0-31 to be enabled */
CSL_BitMask32 intrLo,
/** interrupt 32-63 to be enabled */
CSL_BitMask32 intrHi
)
{
hSh->shregs->IESR = intrLo;
hSh->shregs->IESRH = intrHi;
return CSL_SOK;
}
/** =============================================================================
* @n@b CSL_edmaRegionInterruptDisable
*
* @b Description
* @n This API disables the interrupts for the shadow region.
*
* @b Arguments
* @verbatim
hSh Shadow Region Handle
intrLo interrupt 0-31 to be disabled
intrHi interrupt 32-63 to be disabled
@endverbatim
*
* <b> Return Value <b/>
* Status (CSL_SOK)
*
* <b> Pre Condition </b>
* @n @a CSL_edmaOpen() must be called before usage of this API.
*
* <b> Post Condition </b>
* @n None
*
* @b Modifies
* @n None
*
*
* <b> Usage Constraints: </b>
* The EDMA must be succesfully initializedvia @a CSL_edmaInit().
* CSL_edmaOpen() must be called before usage of this API. Care needs to be
* taken of the DRAE settings.
*
*
* @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);
status = CSL_edmaRegionInterruptDisable(shHndl,0x0000ffff,0xffff0000);
@endverbatim
*
* ===========================================================================
*/
//#pragma CODE_SECTION (CSL_edmaRegionInterruptDisable, ".text:csl_section:edma");
CSL_IDEF_INLINE CSL_Status CSL_edmaRegionInterruptDisable(
/** a handle to the shadow region already opened */
CSL_EdmaRegionHandle hSh,
/** interrupt 0-31 to be disabled */
CSL_BitMask32 intrLo,
/** interrupt 32-63 to be disabled */
CSL_BitMask32 intrHi
)
{
hSh->shregs->IECR = intrLo;
hSh->shregs->IECRH = intrHi;
return CSL_SOK;
}
/** =============================================================================
* @n@b CSL_edmaRegionInterruptClear
*
* @b Description
* @n This API clears the interrupts for the shadow region.
*
* @b Arguments
* @verbatim
hSh Shadow Region Handle
intrLo interrupt 0-31 to be cleared
intrHi interrupt 32-63 to be cleared
@endverbatim
*
* <b> Return Value <b/>
* Status (CSL_SOK)
*
* <b> Pre Condition </b>
* @n @a CSL_edmaOpen() must be called before usage of this API.
*
* <b> Post Condition </b>
* @n None
*
* @b Modifies
* @n None
*
*
* <b> Usage Constraints: </b>
* The EDMA must be succesfully initializedvia @a CSL_edmaInit().
* CSL_edmaOpen() must be called before usage of this API. Care needs to be
* taken of the DRAE settings.
*
*
* @b Example:
* @verbat
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -