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

📄 csl_emif.h

📁 Configuring External Interrupts on TMS320C672x Devices
💻 H
📖 第 1 页 / 共 2 页
字号:
 *   @n  None
 *
 *   @b Example
 *   @verbatim
            status = CSL_emifInit(NULL);
     @endverbatim
 * =============================================================================
 */
extern CSL_Status CSL_emifInit(
    /** EMIF specific context information
     */
    CSL_EmifContext * pContext
);

/** ============================================================================
 *   @n@b CSL_emifOpen
 *
 *   @b Description
 *   @n This function opens the EMIF CSL. It returns a handle to the CSL for the 
 *   EMIF instance. This handle is passed to all other CSL APIs, as the reference 
 *   to the EMIF instance .
 *
 *   @b Arguments
 *   @verbatim
        pEmifObj	Pointer to EMIF object.

        emifNum	    Instance of EMIF to be opened.

        pEmifParam	Module specific parameters.

        pStatus		The status of the function call.
        
     @endverbatim
 *
 *   <b> Return Value </b>  CSL_EmifHandle
 *   @li                         Valid EMIF handle will be returned if
 *                              status value is equal to CSL_SOK.
 *
 *   <b> Pre Condition </b>
 *   @n  None
 *
 *   <b> Post Condition </b>
 *   @n  1.	The status is returned in the status variable. If status 
 *           returned is
 *	@li         CSL_OK		       - Open call is successful
 *  @li         CSL_ESYS_FAIL	   - Module instance is invalid.
 *  @li			CSL_ESYS_INVPARAMS - Invalid Parametere is passed.
 *       2.	EMIF object structure is populated
 *
 *   @b Modifies
 *   @n  1.	The status variable
 *
 *       2.	EMIF object structure 
 *
 *
 *   @b Example
 *   @verbatim
     CSL_EmifObj	    emifObj;
     CSL_EmifHandle     hEmif;
     CSL_EmifHwSetup    hwSetup;
     CSL_Status         status;

     ..
     
     hEmif = CSL_emifOpen (&emifObj, CSL_EMIF, NULL, &status);
        
     ..
     @endverbatim
 * =============================================================================
 */
extern CSL_EmifHandle CSL_emifOpen (
    /** Pointer to the object that holds reference to the
    *  instance of EMIF requested after the call
    */
    CSL_EmifObj		    *pEmifObj,
    /** Instance of EMIF to which a handle is requested
    */
    CSL_InstNum          emifNum,
    /** Module specific parameters;
    * Currently there are none; the user should pass 'NULL'
    */
    CSL_EmifParam        *pEmifParam,
    /** This returns the status (success/errors) of the call.
    * Could be 'NULL' if the user does not want status information.
    */
    CSL_Status           *pStatus
);

/** ============================================================================
 *   @n@b CSL_emifClose
 *
 *   @b Description
 *   @n This function marks that CSL for the EMIF instance is closed. CSL for 
 *		the EMIF instance need to be reopened before using any EMIF CSL API 
 *		again.
 *
 *   @b Arguments
 *   @verbatim
        hEmif 			Handle to EMIF
        
     @endverbatim
 *
 *   <b> Return Value </b>  CSL_Status
 *   @li                    CSL_SOK             - EMIF is closed Successfully
 *   @li                    CSL_ESYS_BADHANDLE  - The handle passed is invalid
 *
 *   <b> Pre Condition </b>
 *   @n  None
 *
 *   <b> Post Condition </b>
 *   @li  CSL for the EMIF instance is closed
 *
 *   @b Modifies
 *   @n  System data object
 * 
 *
 *   @b Example
 *   @verbatim
     CSL_EmifHandle     hEmif;
     CSL_Status         status;     
     ..
     
     status = CSL_emifClose (hEmif);
        
     ..
     @endverbatim
 * =============================================================================
 */
extern CSL_Status  CSL_emifClose(
    /** Pointer to the object that holds reference to the
    instance of EMIF requested after the call
     */
    CSL_EmifHandle	      hEmif
);

/** ============================================================================
 *   @n@b CSL_emifHwSetup
 *
 *   @b Description
 *   @n It configures the EMIF registers as per the values passed in the 
 *		hardware setup structure
 *
 *   @b Arguments
 *   @verbatim
            hEmif            Handle to the EMIF
 
            hwSetup          Pointer to harware setup structure
 
     @endverbatim
 *
 *   <b> Return Value </b>  CSL_Status
 *   @li                    CSL_SOK             - Hardware setup successful
 *   @li                    CSL_ESYS_BADHANDLE  - Invalid CSL handle
 *   @li                    CSL_ESYS_INVPARAMS  - Hardware structure is not
                                                  properly initialized
 *
 *   <b> Pre Condition </b>
 *   @n  None
 *
 *   <b> Post Condition </b>
 *   @n  EMIF controller registers are configured according 
 *       to the hardware setup parameters
 *
 *   @b Modifies
 *   @n EMIF controller registers
 *
 *   @b Example
 *   @verbatim
            CSL_EmifHandle	hEmif;
		    CSL_EmifObj		emifObj;
		    CSL_EmifHwSetup	hwSetup;
     		CSL_status		status;
			
			hEmif = CSL_emifOpen (&emifObj, CSL_EMIF, NULL, &status);
      		. .
			status = CSL_emifHwSetup(hEmif, &hwSetup);
			. .
			
     @endverbatim
 * ===========================================================================
 */
CSL_Status  CSL_emifHwSetup(
    /** Pointer to the object that holds reference to the
    *  instance of EMIF requested after the call
     */
    CSL_EmifHandle	      hEmif,
    /** Pointer to setup structure which contains the
    *  information to program EMIF to a useful state
     */
    CSL_EmifHwSetup	      *hwSetup
);

/** ============================================================================
 *   @n@b CSL_emifGetHwSetup
 *
 *   @b Description
 *   @n It retrives the hardware setup parameters of the emif
 *      specified by the given handle.
 *
 *   @b Arguments
 *   @verbatim
            hEmif        Handle to the emif
 
            setup         Pointer to the harware setup structure
 
     @endverbatim
 *
 *   <b> Return Value </b>  CSL_Status
 *   @li                    CSL_SOK             - Retrieving the hardware setup
 *                                                parameters is successful
 *   @li                    CSL_ESYS_BADHANDLE  - The handle is passed is
 *                                                invalid
 *   @li                    CSL_ESYS_INVPARAMS  - Invalid parameter
 *
 *   <b> Pre Condition </b>
 *   @n  None
 *
 *   <b> Post Condition </b>
 *   @n  The hardware setup structure is populated with the hardware setup
 *       parameters
 *
 *   @b Modifies
 *   @n hwSetup variable
 *
 *   @b Example
 *   @verbatim
            CSL_EmifHandle   hEmif;
            CSL_EmifHwSetup  hwSetup;

            ...
            
            status = CSL_emifGetHwSetup(hEmif, &hwSetup);
            
            ...
            
     @endverbatim
 * ===========================================================================
 */
extern CSL_Status  CSL_emifGetHwSetup(
    /** pointer to the object that holds reference to the
    * instance of EMIF requested after the call */
    CSL_EmifHandle                         hEmif,
    /** the query to this API which indicates the status/setup
    * to be returned */
    CSL_EmifHwSetup                        *setup
);	

/** ============================================================================
 *   @n@b CSL_emifHwControl
 *
 *   @b Description
 *   @n This function performs various control operations on the EMIF, based 
 *		on the command passed
 *
 *   @b Arguments
 *   @verbatim
            hEmif	The handle to EMIF module

			cmd		Operation to be performed on EMIF

			arg 	Argument specific to the command

 
     @endverbatim
 *
 *   <b> Return Value </b>  CSL_Status
 *   @li   	CSL_SOK 		    - Successful completion of the query
 *   @li    CSL_ESYS_INVCMD 	- Command not supported
 *   @li    CSL_ESYS_BADHANDLE 	- Invalid handle
 *	 @li	CSL_ESYS_INVPARAMS  - Invalid parameter passed
 *
 *   <b> Pre Condition </b>
 *   @n  None
 *
 *   <b> Post Condition </b>
 *   @n  EMIF registers are configured according to the command and command
 *		 arguments. The command determines which registers are modified.
 *
 *   @b Modifies
 *   @n EMIF registers determined by the command.
 *
 *   @b Example
 *   @verbatim
		CSL_EmifSdramSelfRefresh     srState = CSL_EMIF_SELF_REFRESH_DISABLE;
     	CSL_Status     				 status;
     	CSL_EmifHandle 				 hEmif;
            ...
                  
      status = CSL_EmifHwControl(hEmif, 
      			CSL_EMIF_CMD_SELF_REFRESH, &srState);
            ...
            
     @endverbatim
 * ===========================================================================
 */
extern CSL_Status  CSL_emifHwControl(
    /** Pointer to the object that holds reference to the
    *  instance of EMIF requested after the call
     */
    CSL_EmifHandle	      hEmif,
    /** The command to this API, which indicates the action to be taken
     */
    CSL_EmifHwControlCmd     cmd,
    /** An optional argument @a void* casted
     */
    void		      *arg
);

/** ============================================================================
 *   @n@b CSL_emifGetHwStatus
 *
 *   @b Description
 *   @n The function is used to get data about various parameters of the EMIF 
 *		block. The data returned depends on the query passed. 
 *
 *   @b Arguments
 *   @verbatim
            hEmif 			Handle to EMIF

			query 		    Type of data query to perform

			response 		Pointer to buffer to return the data requested by 
							query passed
 
     @endverbatim
 *
 *   <b> Return Value </b>  CSL_Status
 *   @li   	CSL_SOK 		    - Successful completion of the query
 *   @li    CSL_ESYS_INVQUERY   - Query command not supported
 *   @li    CSL_ESYS_BADHANDLE 	- Invalid handle
 *	 @li	CSL_ESYS_INVPARAMS  - Invalid parameter passed
 *
 *   <b> Pre Condition </b>
 *   @n  None
 *
 *   <b> Post Condition </b>
 *   @n  None
 *
 *   @b Modifies
 *   @n The input argument response.
 *
 *   @b Example
 *   @verbatim
		Uint16    	   rrRate = 0;
     	CSL_Status     status;
     	CSL_EmifHandle hEmif;
     	. .
     	status = CSL_emifGetHwStatus(hEmif, CSL_EMIF_QUERY_REFRESH_RATE, 
					&rrRate);
		. .            
     @endverbatim
 * ===========================================================================
 */
extern CSL_Status  CSL_emifGetHwStatus(
    /** Pointer to the object that holds reference to the
    *  instance of EMIF requested after the call
     */
    CSL_EmifHandle	      hEmif,
    /** The query to this API, which indicates the status
    *  to be returned
     */
    CSL_EmifHwStatusQuery    query,
    /** Placeholder to return the status; @a void* casted
     */
    void		      *response
);

/** ============================================================================
 *   @n@b CSL_emifGetBaseAddress
 *
 *   @b Description
 *   @n This function to get the base address of the EMIF instance. 
 *
 *   @b Arguments
 *   @verbatim
            emifNum			Instance number of the EMIF

			pEmifParam		Module specific parameters.

			pBaseAddress	Pointer to base address structure

     @endverbatim
 *
 *   <b> Return Value </b>  CSL_Status
 *   @li   	CSL_SOK 		    - Successfully retrieved base address.
 *   @li    CSL_ESYS_FAIL     	- Failed to get the base address
 *	 @li 	CSL_ESYS_INVPARAMS  - If the input parameter is not valid
 *
 *   <b> Pre Condition </b>
 *   @n  None
 *
 *   <b> Post Condition </b>
 *   @n  Gets the base address of EMIF
 *
 *   @b Modifies
 *   @n The base address is populated in the base address structure
 *
 *   @b Example
 *   @verbatim
		CSL_status			status;
		CSL_EmifParam 		emifParam;
		CSL_EmifBaseAddress baseAddress;
		CSL_InstNum         emifNum=CSL_EMIF;	
		. .
		status = CSL_emifGetBaseAddress (emifNum, &emifParam, &baseAddress);
		. .     
     @endverbatim
 * ===========================================================================
 */
extern CSL_Status CSL_emifGetBaseAddress(
    /** Instance number
     */
    CSL_InstNum  		emifNum,
    /** Module specific parameters
     */
    CSL_EmifParam *		pEmifParam,
    /** Base address details
     */
    CSL_EmifBaseAddress *	pBaseAddress
);

#ifdef __cplusplus
}
#endif


#endif /* _CSL_EMIF_H_ */

⌨️ 快捷键说明

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