📄 csl_edmaopen.c
字号:
/* ============================================================================
* Copyright (c) Texas Instruments Inc 2002, 2003, 2004, 2005
*
* Use of this software is controlled by the terms and conditions found in the
* license agreement under which this software has been supplied.
* ===========================================================================
*/
/** @file csl_edmaOpen.c
*
* @brief File for functional layer of CSL API @a CSL_edmaOpen()
*
* Path: \\(CSLPATH)\\ipmodules\\edma\\src
*
* @date
* @author Ruchika Kharwar
*/
/* =============================================================================
* Revision History
* ===============
* 10-Aug-2005 brn Updated for doxygen documentation and butification
* =============================================================================
*/
#include <csl_edma.h>
/** ============================================================================
* @n@b CSL_edmaOpen
*
* @b Description
* @n Returns a handle to the EDMA Module. This handle is further used
* for invoking all module level control APIs.
* This function merely returns a handle to the register overlay structure.
* This call enables the relocatability of code since the handle can be
* subsequently used for Module level control commands rather than the
* usage of the register layer base address directly.
*
* @b Arguments
* @verbatim
hEdma Handle to EDMA instance
pEdmaObj Pointer to the EDMA instance object
edmaNum Instance of the EDMA to be opened.
pEdmaParam Pointer to module specific parameters
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_status status;
CSL_EdmaObj edmaObj;
CSL_EdmaHandle hEdma;
hEdma = CSL_EdmaOpen (&edmaObj, CSL_EDMA, NULL, &status);
@endverbatim
*
* =============================================================================
*/
#pragma CODE_SECTION (CSL_edmaOpen, ".text:csl_section:edma");
/** This is a module level open required for the Module level control commands.
*
* <b> Usage Constraints: </b>
* The EDMA must be succesfully initialized
* via CSL_edmaInit() before calling this
* function.
*
* @b Example:
\code
CSL_EdmaHandle edmaHndl;
CSL_Status modStatus;
// Initialize
modStatus = CSL_edmaInit(NULL);
...
edmaHndl = CSL_edmaOpen(NULL,CSL_EDMA_0,NULL,&modStatus);
\endcode
*
* @return Handle @a CSL_EdmaHandle to the requested module instance
* of the specified EDMA Instance number.
*/
CSL_EdmaHandle CSL_edmaOpen(
/* EDMA Module Object pointer. This is NULL. */
CSL_EdmaObj *edmaObj,
/** instance of EDMA */
CSL_InstNum edmaNum,
/** EDMA Param pointer i.e NULL in this case */
CSL_EdmaModuleParam *param,
/** CSL Status */
CSL_Status *status
)
{
CSL_EdmaModuleBaseAddress baseAddress;
*status = CSL_edmaccGetModuleBaseAddr(edmaNum,NULL,&baseAddress);
/*if (status != NULL)
*status = CSL_SOK;
*/
return(baseAddress.regs);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -