📄 csl_edcpageenable.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_edcPageEnable.c
*
* @brief File for functional layer of CSL API @a CSL_edcPageEnable()
*
* Description
* - The @a CSL_edcPageEnable() function definition & it's associated functions
*
* @date 14 July, 2004
* @author Chad Courtney
*/
#include <csl_edc.h>
#pragma CODE_SECTION (CSL_edcPageEnable, ".text:csl_section:edc");
/** 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 Enables the pages for EDC specified by a 32-bit mask.
*/
CSL_Status CSL_edcPageEnable
(
/** Specifies what pages of the given map(s) are to be enabled by setting the
* bit corresponding to the page to 1
*/
Uint32 mask,
/** Specificies which map(s) to apply mask to (MAP0, MAP1, or BOTH)
*/
CSL_EdcUmap umap
)
{
CSL_Status status = CSL_SOK;
switch(umap){
case CSL_EDC_UMAP0: /* Apply Page Enables to UMAP0 */
CSL_FINS(((CSL_EdcRegs*)CSL_EDC_REGS)->L2EDEN0, EDC_L2EDEN0_EN, mask);
break;
case CSL_EDC_UMAP1: /* Apply Page Enables to UMAP1 */
CSL_FINS(((CSL_EdcRegs*)CSL_EDC_REGS)->L2EDEN1, EDC_L2EDEN1_EN, mask);
break;
case CSL_EDC_UMAPBOTH: /* Apply Page Enables to both UMAP0 and UMAP1 */
CSL_FINS(((CSL_EdcRegs*)CSL_EDC_REGS)->L2EDEN0, EDC_L2EDEN0_EN, mask);
CSL_FINS(((CSL_EdcRegs*)CSL_EDC_REGS)->L2EDEN1, EDC_L2EDEN1_EN, mask);
break;
default:
status = CSL_ESYS_INVQUERY;
}
return status;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -