csl_lcdconv.h

来自「dsp在音频处理中的运用」· C头文件 代码 · 共 606 行 · 第 1/2 页

H
606
字号
 *
 *   @desc
 *   @n This function returns the handle to the LCD data conversion module 
 * 		instance. This handle is passed to all other CSL APIs.
 *
 *	 @arg  lcdconvObj
 *              Pointer to the LCD data conversion module object - 
 *						to be allocated by the user
 *   @arg  lcdconvNum
 *              Instance number of the LCD data conversion module to be opened
 *
 *   @arg  pLcdconvParam
 *              LCD data conversion module specific parameters.
 *
 *   @arg  pStatus
 *              Pointer to CSL Error Status. Possible values for status after
 *              function call returns are:
 *              CSL_SOK            : Open call is successful
 *              CSL_ESYS_FAIL      : Invalid Instance
 *
 *   @ret  CSL_LcdconvHandle
 *              Valid handle, if status is CSL_SOK
 *
 *   @eg
 *         CSL_status          status;
 *         CSL_LcdconvObj      lcdconvObj;
 *         CSL_LcdconvHandle   hLcdconv;
 *
 *         ...
 *
 *         hLcdconv = CSL_lcdconvOpen (&lcdconvObj, CSL_LCD_CONV, NULL, 
 *						&status);
 *
 *          ...
 *
 * =============================================================================
 */
extern CSL_LcdconvHandle  CSL_lcdconvOpen (
    CSL_LcdconvObj*			pLcdconvObj,
    CSL_InstNum				lcdconvNum,
    CSL_LcdconvParam*		pLcdconvParam,
    CSL_Status*				pStatus
);

/* =============================================================================
 *	 @func CSL_lcdconvClose
 *
 *	 @desc
 *	 @n	This function marks that CSL for the LCD data conversion module instance 
 * 		is closed. CSL for the LCD data conversion module instance should to be 
 *		reopened before using the LCD data conversion module CSL API again.
 *      
 *   @arg   hLcdconv
 *          Handle to the LCD data conversion module instance 
 *
 *   @ret   CSL_Status
 *          CSL_SOK            - LCD data conversion module instance is closed 
 *							  	 successfully
 *          CSL_ESYS_BADHANDLE - The handle passed is invalid
 *
 *   @eg
 *       	CSL_lcdconvClose (hLcdconv);
 * ===========================================================================
 */
extern CSL_Status CSL_lcdconvClose (
    CSL_LcdconvHandle		hLcdconv
);

/* =============================================================================
 *   @func CSL_lcdconvHwSetup
 *
 *   @desc
 *   @n	It configures the LCD data conversion module registers as per the values 
 *		passed in the hardware setup structure.
 *
 *   @arg    hLcdconv
 *           Handle to the LCD data conversion module instance
 *            
 *   @arg    pHwSetup         
 *           Pointer to harware setup structure
 *
 *   @ret    CSL_Status
 *           CSL_SOK             - Hardware setup successful
 *           CSL_ESYS_BADHANDLE  - Invalid handle
 *           CSL_ESYS_INVPARAMS  - Hardware structure is not properly
 *                                 initialized
 *
 *   @eg
 *       CSL_LcdconvHandle		hLcdconv;
 *       CSL_LcdconvObj			lcdconvObj;
 *       CSL_LcdconvHwSetup  	hwSetup;
 *       CSL_status      		status;
 *
 *       ...
 *
 *       hLcdconv = CSL_lcdconvOpen (&lcdconvObj, CSL_LCD_CONV, NULL, &status); 
 *       hwSetup.mode			= CSL_LCDCONV_MODE_18BIT;
 *       hwSetup.writeclk	 	= CSL_LCDCONV_CLKEN_DISABLE;
 *       hwSetup.activeedge		= CSL_LCDCONV_FSYNCSENSE_POSITIVE;
 *           
 *       status = CSL_lcdconvHwSetup (hLcdconv, &hwSetup);
 * ===========================================================================
 */
extern CSL_Status  CSL_lcdconvHwSetup (
    CSL_LcdconvHandle           hLcdconv,
    CSL_LcdconvHwSetup*         pHwSetup
);

/* =============================================================================
 *   @func CSL_lcdconvHwControl
 *
 *   @desc
 *   @n	This function performs various control operations on the LCD data 
 *		conversion module, based on the command passed.
 *
 *   @arg    hLcdconv
 *           Handle to the LCD data conversion module
 *
 *   @arg    cmd
 *           Operation to be performed
 *
 *   @arg    pCmdArg
 *           Arguement specific to the command 
 *            
 *   @eg
 *       CSL_LcdconvMode	lcdconvMode = CSL_LCDCONV_MODE_18BIT;
 *       status = CSL_lcdconvHwControl (hLcdconv, CSL_LCDCONV_CMD_MODE, 
 *										&lcdconvMode);
 * =============================================================================
 */
extern CSL_Status  CSL_lcdconvHwControl (
	CSL_LcdconvHandle           hLcdconv,
	CSL_LcdconvHwControlCmd     cmd,
	void*						pCmdArg
);

/* =============================================================================
 *   @func CSL_lcdconvGetHwStatus
 *
 *   @desc
 *   @n This function is used to get the value of various parameters of the
 *		LCD data conversion module. The value returned depends on the query 
 *		passed.
 *
 *   @arg    hLcdconv
 *           Handle to the LCD data conversion module
 *
 *   @arg    query
 *           Query to be performed. 
 *
 *   @arg    pResponse
 *           Pointer to buffer to return the data requested by the query passed
 *
 *   @ret    CSL_Status
 *           CSL_SOK            - Successful completion of the query
 *           CSL_ESYS_BADHANDLE - Invalid handle
 *           CSL_ESYS_INVQUERY  - Query command not supported
 *
 *   @eg
 *       CSL_LcdconvMode	lcdconvMode;
 *       CSL_Status   		status;
 *
 *       ...              
 *
 *       status = CSL_lcdconvGetHwStatus (hLcdconv, CSL_LCDCONV_QUERY_MODE, 
 *									 	 &lcdconvMode);
 *
 *       ...
 * =============================================================================
 */
extern CSL_Status  CSL_lcdconvGetHwStatus (
	CSL_LcdconvHandle           hLcdconv,
	CSL_LcdconvHwStatusQuery    query,
	void*						pResponse
);

/*
 * =============================================================================
 *   @func CSL_lcdconvHwSetupRaw
 *
 *   @desc
 *   @n	This function configures the registers of LCD data conversion module 
 * 		as per the values given in the config structure.  
 *
 *   @arg hLcdconv
 *        Handle to the LCD data conversion module instance
 *
 *   @arg pHwConfig
 *        Pointer to the LCD data conversion module config structure
 *
 *   @ret CSL_Status
 *         CSL_SOK             - Configuration successful
 *         CSL_ESYS_BADHANDLE  - Invalid handle
 *
 *   @eg
 *    
 *        CSL_status            status;
 *        CSL_LcdconvConfig	    hwConfig = CSL_LCDCONV_CONFIG_DEFAULTS;
 *
 *        ...
 *		  hwConfig.CTRL	= 0x05;	
 *        status = CSL_lcdconvHwSetupRaw (hLcdconv, &hwConfig);
 *
 *        ...
 * ===========================================================================
 */
extern CSL_Status  CSL_lcdconvHwSetupRaw (
    CSL_LcdconvHandle       hLcdconv,
    CSL_LcdconvConfig*      pHwConfig
);

/** ============================================================================
 *   @func CSL_lcdconvGetHwSetup
 *
 *   @desc
 *   @n It retrives the hardware setup parameters of the LCD data conversion 
 *		module specified by the given handle.
 *
 *   @arg    hLcdconv
 *           Handle to the LCD data conversion module
 *
 *   @arg    pHwSetup
 *           Pointer to the harware setup structure
 *
 *   @ret    CSL_Status
 *           CSL_SOK            - Retrieving the hardware setup                                           parameters is successful
 *           CSL_ESYS_BADHANDLE - The handle passed is invalid
 *
 *   @eg
 *       CSL_LcdconvHandle   hLcdconv;
 *       CSL_LcdconvHwSetup  hwSetup;
 *
 *       ...
 *
 *       status = CSL_lcdconvGetHwSetup (hLcdconv, &hwSetup);
 *
 *       ...
 * ==============================================================================
 */
extern CSL_Status  CSL_lcdconvGetHwSetup(
    CSL_LcdconvHandle  		hLcdconv,
    CSL_LcdconvHwSetup*		pHwSetup
);

/** ============================================================================
 *   @n@b CSL_lcdconvGetBaseAddress
 *
 *   @b Description
 *   @n This function gets the base address of the given LCD data conversion 
 * 		module instance. 
 *
 *   @b Arguments
 *   @verbatim      
			lcdconvNum      Specifies the instance of the LCD data conversion 
							module for which the base address is requested
 
            pLcdconvParam   Module specific parameters.
 
            pBaseAddress    Pointer to the base address structure to return the
                            base address details.
     @endverbatim
 *
 *   <b> Return Value </b>  CSL_Status
 *   @li				    CSL_OK          Open call is successful
 *   @li					CSL_ESYS_FAIL   The LCD data conversion module 
 *											instance is not available.
 *
 *   <b> Pre Condition </b>
 *   @n  None
 *
 *   <b> Post Condition </b>
 *   @n  Base address structure is populated
 *
 *   @b Modifies
 *   @n    1. The status variable
 *
 *         2. Base address structure.
 *
 *   @b Example
 *   @verbatim
        CSL_Status          	status;
        CSL_LcdconvBaseAddress  baseAddress;

       ...
       
       status = CSL_lcdconvGetBaseAddress(CSL_LCD_CONV, NULL, &baseAddress);

    @endverbatim
 * ===========================================================================
 */
extern CSL_Status CSL_lcdconvGetBaseAddress (
        CSL_InstNum  			lcdconvNum,
        CSL_LcdconvParam*		pLcdconvParam,
        CSL_LcdconvBaseAddress*	pBaseAddress
);

#ifdef __cplusplus
}
#endif

#endif

⌨️ 快捷键说明

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