📄 csl_emifgetbaseaddress.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_emifGetBaseAddress.c
*
* @brief File for functional layer of CSL API @a CSL_emifGetBaseAddress()
*
* Path: \\(CSLPATH)\\soc\\davinci\\arm9\\src
*
* Description
* - The @a CSL_emifGetBaseAddress() function definition & it's associated functions
*
*/
/* =============================================================================
* Revision History
* ===============
* 30-Aug-2004 brn File Created.
* 11-Oct-2004 brn File updated with the code review comments
* =============================================================================
*/
#include <csl_emif.h>
/** ============================================================================
* @n@b CSL_emifGetBaseAddress
*
* @b Description
* @n This function gets the base address of the given External memory
* interface instance.
*
* @b Arguments
* @verbatim
emifNum Specifies the instance of the external memory
interface to be opened.
pEmifParam external memory interface module specific parameters
pBaseAddress Pointer to base address structure containing base
address details.
@endverbatim
*
* <b> Return Value </b> CSL_Status
* @li CSL_OK Open call is successful
* @li CSL_ESYS_FAIL 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 is modified.
*
* @b Example
* @verbatim
CSL_Status status;
CSL_EmifBaseAddress baseAddress;
...
status = CSL_emifGetBaseAddress(CSL_EMIF, NULL, &baseAddress);
...
@endverbatim
* ===========================================================================
*/
#pragma CODE_SECTION (CSL_emifGetBaseAddress, ".text:csl_section:emif");
CSL_Status CSL_emifGetBaseAddress (
CSL_InstNum emifNum,
CSL_EmifParam *pEmifParam,
CSL_EmifBaseAddress *pBaseAddress
)
{
CSL_Status status = CSL_SOK;
/* Added the code with the review comments */
*pEmifParam = *pEmifParam;
if(pBaseAddress == NULL) {
status = CSL_ESYS_INVPARAMS;
}
switch (emifNum) {
case CSL_EMIF:
pBaseAddress->regs = (CSL_EmifRegsOvly)CSL_EMIF_1_REGS;
break;
default:
pBaseAddress->regs = (CSL_EmifRegsOvly)NULL;
status = CSL_ESYS_FAIL;
break;
}
return status;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -