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

📄 csl_emifaux.h

📁 Configuring External Interrupts on TMS320C672x Devices
💻 H
📖 第 1 页 / 共 2 页
字号:
/*  ============================================================================
 *   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_emifAux.h
 *
 *  @path $(CSLPATH)\emif\src
 *
 *  @brief emif controller CSL implementation. 
 *
 */

/* =============================================================================
 *  Revision History
 *  ===============
 *  23-Nov-2004 GaneshK  File Created.
 * =============================================================================
 */

#ifndef _CSL_EMIFAUX_H_
#define _CSL_EMIFAUX_H_

#include <csl_emif.h>

#ifdef __cplusplus
extern "C" {
#endif

/**
 *	Status query functions of the EMIF
 */
/** ============================================================================
 *   @n@b CSL_emifGetSelfRefreshStatus
 *
 *   @b Description		Get the self refersh status of SDRAM
 *   @n 
 *
 *   @b Arguments
 *   @verbatim
            hEmif           Handle to the EMIF instance
     @endverbatim
 *
 *   <b> Return Value </b>  
 *			CSL_EmifSdramSelfRefresh	Self referesh status
 *   <b> Pre Condition </b>
 *   @n  None
 *
 *   <b> Post Condition </b>
 *   @n  None
 *
 *   @b Modifies
 *   @n None
 *
 *   @b Example
 *   @verbatim
        CSL_EmifHandle          hEmif;
        CSL_EmifSdramSelfRefresh      response;

        response = CSL_emifGetSelfRefreshStatus (hEmif);

     @endverbatim
 * =============================================================================
 */
static inline
CSL_EmifSdramSelfRefresh CSL_emifGetSelfRefreshStatus (
    CSL_EmifHandle hEmif
)
{
	CSL_EmifSdramSelfRefresh response;
	response = (CSL_EmifSdramSelfRefresh)CSL_FEXT(hEmif->regs->SDCR,
			EMIF_SDCR_SR);
	return(response);
}

/** ============================================================================
 *   @n@b CSL_emifGetRefreshRate
 *
 *   @b Description		Get the self refersh rate of SDRAM
 *   @n 
 *
 *   @b Arguments
 *   @verbatim
            hEmif           Handle to the EMIF instance
     @endverbatim
 *
 *   <b> Return Value </b>  
 *			Uint16			Self referesh rate
 *   <b> Pre Condition </b>
 *   @n  None
 *
 *   <b> Post Condition </b>
 *   @n  None
 *
 *   @b Modifies
 *   @n None
 *
 *   @b Example
 *   @verbatim
        CSL_EmifHandle          hEmif;
        Uint16      response;

        response = CSL_emifGetRefreshRate (hEmif);

     @endverbatim
 * =============================================================================
 */
static inline
Uint16 CSL_emifGetRefreshRate (
    CSL_EmifHandle hEmif
)
{
	Uint16 response;
	response = (Uint16)CSL_FEXT(hEmif->regs->SDRCR,EMIF_SDRCR_RR);
	return(response);
}

#if (EMIF_WIDTH== EMIF_32BIT_SUPPORT)        	
/** ============================================================================
 *   @n@b CSL_emifGetAsyncTimeoutStatus
 *
 *   @b Description
 *   @n 
 *
 *   @b Arguments
 *   @verbatim
            hEmif           Handle to the EMIF instance
     @endverbatim
 *
 *   <b> Return Value </b>  
 *
 *   <b> Pre Condition </b>
 *   @n  None
 *
 *   <b> Post Condition </b>
 *   @n  None
 *
 *   @b Modifies
 *   @n None
 *
 *   @b Example
 *   @verbatim
        CSL_EmifHandle          hEmif;
        Bool      response;

        response = CSL_emifGetAsyncTimeoutStatus (hEmif);

     @endverbatim
 * =============================================================================
 */
static inline
Bool CSL_emifGetAsyncTimeoutStatus (
    CSL_EmifHandle hEmif
)
{
	Bool response;
	response = (Bool)CSL_FEXT(hEmif->regs->EIRR,EMIF_EIRR_AT);
	return(response);
}

/** ============================================================================
 *   @n@b CSL_emifGetMaskedAsyncTimeoutStatus
 *
 *   @b Description
 *   @n 
 *
 *   @b Arguments
 *   @verbatim
            hEmif           Handle to the EMIF instance
     @endverbatim
 *
 *   <b> Return Value </b>  
 *
 *   <b> Pre Condition </b>
 *   @n  None
 *
 *   <b> Post Condition </b>
 *   @n  None
 *
 *   @b Modifies
 *   @n None
 *
 *   @b Example
 *   @verbatim
        CSL_EmifHandle          hEmif;
        Bool      response;

        response = CSL_emifGetMaskedAsyncTimeoutStatus (hEmif);

     @endverbatim
 * =============================================================================
 */
static inline
Bool CSL_emifGetMaskedAsyncTimeoutStatus (
    CSL_EmifHandle hEmif
)
{
	Bool response;
	response = (Bool)CSL_FEXT(hEmif->regs->EIMR, EMIF_EIMR_ATM);
	return(response);
}

/** ============================================================================
 *   @n@b CSL_emifGetMaskedAsyncTimeoutIntrStatus
 *
 *   @b Description
 *      Will read the Interrupt set register to give the status 
 *
 *   @b Arguments
 *   @verbatim
            hEmif           Handle to the EMIF instance
     @endverbatim
 *
 *   <b> Return Value </b>  
 *
 *   <b> Pre Condition </b>
 *   @n  None
 *
 *   <b> Post Condition </b>
 *   @n  None
 *
 *   @b Modifies
 *   @n None
 *
 *   @b Example
 *   @verbatim
        CSL_EmifHandle          hEmif;
        Bool      response;

        response = CSL_emifGetMaskedAsyncTimeoutIntrStatus (hEmif);

     @endverbatim
 * =============================================================================
 */
static inline
Bool CSL_emifGetMaskedAsyncTimeoutIntrStatus (
    CSL_EmifHandle hEmif
)
{
	Bool response;
	response = (Bool)CSL_FEXT(hEmif->regs->EIMR, EMIF_EIMSR_ATMSET);
	return(response);
}
#endif

/** ============================================================================
 *   @n@b CSL_emifGetNandStatus
 *
 *   @b Description
 *      Will read NAND flash control registers  
 *
 *   @b Arguments
 *   @verbatim
            hEmif           Handle to the EMIF instance
     @endverbatim
 *
 *   <b> Return Value </b>  
 *			CSL_EmifNandSetup Nand setup data structure
 *   <b> Pre Condition </b>
 *   @n  None
 *
 *   <b> Post Condition </b>
 *   @n  None
 *
 *   @b Modifies
 *   @n None
 *
 *   @b Example
 *   @verbatim
        CSL_EmifHandle          hEmif;
        CSL_EmifNandSetup      response;

        response = CSL_emifGetNandStatus (hEmif);

     @endverbatim
 * =============================================================================
 */
static inline
CSL_EmifNandSetup CSL_emifGetNandStatus (
    CSL_EmifHandle hEmif
)
{
	CSL_EmifNandSetup response;
	response.nand_support = (Uint8)CSL_FEXT(hEmif->regs->NANDFCR, 
			EMIF_NANDFCR_CS2NAND);
	response.ecc_support = (Uint8)CSL_FEXT(hEmif->regs->NANDFCR, 
		EMIF_NANDFCR_CS2ECC);

	return(response);
}

/** ============================================================================
 *   @n@b CSL_emifGetNandWaitStatus
 *
 *   @b Description
 *      Will read NAND flash Status registers  
 *
 *   @b Arguments
 *   @verbatim
            hEmif           Handle to the EMIF instance
     @endverbatim
 *
 *   <b> Return Value </b>  
 *
 *   <b> Pre Condition </b>
 *   @n  None
 *
 *   <b> Post Condition </b>
 *   @n  None
 *
 *   @b Modifies
 *   @n None
 *
 *   @b Example
 *   @verbatim
        CSL_EmifHandle          hEmif;
        Bool			      response;

        response = CSL_emifGetNandWaitStatus (hEmif);

     @endverbatim
 * =============================================================================
 */
static inline
Bool CSL_emifGetNandWaitStatus (
    CSL_EmifHandle hEmif
)
{
	Bool response;
	response = (Bool)CSL_FEXT(hEmif->regs->NANDFSR,EMIF_NANDFSR_WAITST);
	return(response);
}

/** ============================================================================
 *   @n@b CSL_emifGetNandEccStatus
 *
 *   @b Description
 *      Will read NAND flash 1 ECC registers  
 *
 *   @b Arguments
 *   @verbatim
            hEmif           Handle to the EMIF instance
     @endverbatim
 *
 *   <b> Return Value </b>  
 *
 *   <b> Pre Condition </b>
 *   @n  None
 *
 *   <b> Post Condition </b>
 *   @n  None
 *
 *   @b Modifies
 *   @n None
 *
 *   @b Example
 *   @verbatim
        CSL_EmifHandle          hEmif;
        Uint32			      response;

        response = CSL_emifGetNandEccStatus (hEmif);

     @endverbatim
 * =============================================================================
 */
static inline

⌨️ 快捷键说明

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