⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 csl_edcenable.c

📁 TI达芬奇dm644x各硬件模块测试代码
💻 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_edcEnable.c
 *
 *  @brief    File for functional layer of CSL API @a CSL_edcEnable()
 *
 *  Description
 *    - The @a CSL_edcEnable() function definition & it's associated functions
 *
 *  @date 8 July, 2004
 *  @author Chad Courtney
 */

#include <csl_edc.h>

#pragma CODE_SECTION (CSL_edcEnable, ".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 EDC for the specified memory
 */ 
CSL_Status  CSL_edcEnable
(
	/** Specificies what memory EDC is to be enabled
     */
	CSL_EdcMem              edcMem
)
{
	CSL_Status status = CSL_SOK;
	
	switch(edcMem){
	case CSL_EDC_L1P: /* CSL_EDC_L1P = 0 */
		CSL_FINST(((CSL_EdcRegs*)CSL_EDC_REGS)->L2EDCMD, EDC_L2EDCMD_LOGICEN, YES);
		break;
	case CSL_EDC_L2: /* CSL_EDC_L2 = 1 */
		CSL_FINST(((CSL_EdcRegs*)CSL_EDC_REGS)->L1PEDCMD, EDC_L1PEDCMD_LOGICEN, YES);
		break;
    default:
    	status = CSL_ESYS_INVQUERY;			
    }
	return status;  
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -