📄 csl_edmagetbaseaddress.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_edmaGetBaseAddress.c
*
* @brief Implementation of @a CSL_edmaGetBaseAddress()
*
* Description
* - The @a CSL_edmaGetBaseAddress() function returns the base-address of the
* specified Memory Protection instance.
*
* Note: This function is open for re-implementing if the user wants to modify
* the base address of the peripheral object to point to a different location
* and there by allow CSL initiated write/reads into peripheral MMR's go to
* an alternate location. Please refer documentation for more details.
* Path: \\(CSLPATH)\\soc\\davinci\\c64plus\\src
*
* Revision History
* 2004/06/01 (Ruchika Kharwar) Revision 1
*/
#include <soc64plus.h>
#include <csl_edma.h>
/** ============================================================================
* @n@b CSL_edmaccGetModuleBaseAddr
*
* @b Description
* @n This function is used for getting the base-address of the peripheral
* instance. This function will be called inside the @ CSL_edmaOpen()/
* CSL_edmaChannelOpen()/CSL_edmaRegionOpen()
* function call.
*
* Note: This function is open for re-implementing if the user wants to modify
* the base address of the peripheral object to point to a different
* location and there by allow CSL initiated write/reads into peripheral
* MMR's go to an alternate location. Please refer the documentation for
* more details.
*
* @b Arguments
* @verbatim
hEdma Pointer to the peripheral data object of the
external memory interface instance
emdaNum Specifies the instance of the external memory
interface for which the base address is requested
pEdmaParam Module specific parameters.
pBaseAddress Pointer to the base address structure to return the
base address details.
@endverbatim
*
* <b> Return Value </b> CSL_Status
* @li CSL_OK Open call is successful
* @li CSL_ESYS_FAIL The external memory interface
* instance is not available.
*
* <b> Pre Condition </b>
* @n None
*
* <b> Post Condition </b>
* @n Base address structure is populated
*
* @b Modifies
* @n 1. The status variable
*
* 2. Base address structure.
*
* @b Example:
* @verbatim
CSL_Status status;
CSL_EdmaModuleBaseAddress baseAddress;
...
status = CSL_edmaccGetModuleBaseAddr(CSL_EDMACC_0, NULL, &baseAddress);
@endverbatim
*
* ============================================================================
*/
#pragma CODE_SECTION (CSL_edmaccGetModuleBaseAddr, ".text:csl_section:edma");
CSL_Status
CSL_edmaccGetModuleBaseAddr (
/** Peripheral instance number
*/
CSL_InstNum edmaNum,
/** Module specific parameters.
*/
CSL_EdmaModuleParam * pParam,
/** Base address details.
*/
CSL_EdmaModuleBaseAddress * pBaseAddress
)
{
CSL_Status status = CSL_SOK;
*pParam = *pParam;
switch (edmaNum) {
case CSL_EDMA_1:
pBaseAddress->regs = (CSL_EdmaccRegsOvly)CSL_EDMACC_1_REGS;
break;
default:
pBaseAddress->regs = (CSL_EdmaccRegsOvly)NULL;
status = CSL_ESYS_FAIL;
}
return status;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -