📄 csl_edcgetaddr.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_edcGetAddr.c
*
* @brief File for functional layer of CSL API @a CSL_edcGetAddr()
*
* Description
* - The @a CSL_edcGetAddr() function definition & it's associated functions
*
* @date 14 July, 2004
* @author Chad Courtney
*/
#include <csl_edc.h>
/** Reserves the specified edc for use. The device can be
* re-opened anytime after it has been normally closed if so
* required. The handle returned by this call is input as an
* essential argument for rest of the APIs described for this
* module.
*
* <b> Usage Constraints: </b>
* The CSL system as well as EDC must be succesfully initialized
* via @a CSL_sysInit()
*/
/** @brief Gets the Address location of the parity error.
*/
#pragma CODE_SECTION (CSL_edcGetAddr, ".text:csl_section:edc");
CSL_Status CSL_edcGetAddr
(
/** Specificies what memory EDC Address Info is to be aquired for
*/
CSL_EdcMem edcMem,
/** Structure for returning Address, L2 Way, Qline, SRAM/Cache Info for error
*/
CSL_EdcAddrInfo *edcAddr
)
{
CSL_Status status = CSL_SOK;
switch(edcMem){
case CSL_EDC_L1P: /* Get Address Information for L1P Error */
edcAddr->addr = (Uint32) CSL_FEXT(((CSL_EdcRegs*)CSL_EDC_REGS)->L2EDADDR, EDC_L2EDADDR_ADDR);
edcAddr->l2way = (CSL_EdcAddrL2way) CSL_FEXT(((CSL_EdcRegs*)CSL_EDC_REGS)->L2EDADDR, EDC_L2EDADDR_L2WAY);
edcAddr->qline = (CSL_EdcAddrQline) CSL_FEXT(((CSL_EdcRegs*)CSL_EDC_REGS)->L2EDADDR, EDC_L2EDADDR_QLINE);
edcAddr->sram = (CSL_EdcAddrSram) CSL_FEXT(((CSL_EdcRegs*)CSL_EDC_REGS)->L2EDADDR, EDC_L2EDADDR_SRAM);
break;
case CSL_EDC_L2: /* Get Address Information for L1P Error */
edcAddr->addr = (Uint32) CSL_FEXT(((CSL_EdcRegs*)CSL_EDC_REGS)->L1PEDADDR, EDC_L1PEDADDR_ADDR);
edcAddr->sram = (CSL_EdcAddrSram) CSL_FEXT(((CSL_EdcRegs*)CSL_EDC_REGS)->L1PEDADDR, EDC_L1PEDADDR_SRAM);
break;
default:
status = CSL_ESYS_INVQUERY;
}
return status;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -