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

📄 csl_cam.h

📁 dsp在音频处理中的运用
💻 H
📖 第 1 页 / 共 2 页
字号:
/*******************************************************************************
 * Camera interface global function declarations
 ******************************************************************************/
 
/*
 * =============================================================================
 *   @func CSL_camInit
 *
 *   @desc
 *   @n This is the initialization function for the camera interface CSL. This
 *      function needs to be called before any camera interface CSL functions
 *      are to be called. This function is idem-potent.
 *
 *   @arg pContext
 *		  Context information of camera interface CSL 
 *
 *   @ret CSL_Status
 *         CSL_SOK - Always returns
 *
 *   @eg
 *        CSL_camInit(NULL)
 * =============================================================================
 */
extern CSL_Status  CSL_camInit (
	    
    CSL_CamContext * pContext  
);

/*
 * =============================================================================
 *   @func   CSL_camOpen
 *
 *   @desc
 *   @n This function returns the handle to the camera interface instance. This
 *      handle is passed to all other CSL APIs.
 *
 *   @arg  camObj
 *              Pointer to the camera interface object - to be allocated by the
 *                                                       user
 *   @arg  camNum
 *              Instance number of the camera interface to be opened
 *
 *   @arg  pCamParam
 *              Camera interface module specific parameters.
 *   @arg  status
 *              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_CamHandle
 *              Valid handle, if status is CSL_SOK
 *
 *   @eg
 *          CSL_status          status;
 *          CSL_CamObj          camObj;
 *          CSL_CamHandle       hCam;
 *
 *          ...
 *
 *          hCam = CSL_camOpen (&camObj, CSL_CAM, NULL, &status);
 *
 *          ...
 *
 * =============================================================================
 */
extern CSL_CamHandle CSL_camOpen (
    CSL_CamObj *            camObj,
    CSL_InstNum             camNum,
    CSL_CamParam *			pCamParam,
    CSL_Status*             status
);

/** ============================================================================
 *   @n@b CSL_camGetBaseAddress
 *
 *   @b Description
 *   @n  This function gets the base address of the given camera interface
 *       instance. 
 *
 *   @b Arguments
 *   @verbatim      
            hCam            Pointer to the peripheral data object of the
                            camera interface instance
 
            camNum          Specifies the instance of the camera interface for
                            which the base address is requested
 
            pCamParam       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 camera interface 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_CamBaseAddress  baseAddress;

       ...
       
       status = CSL_camGetBaseAddress(CSL_CAM, NULL, &baseAddress);

    @endverbatim
 * ===========================================================================
 */
extern CSL_Status CSL_camGetBaseAddress (
        CSL_InstNum  			camNum,
        CSL_CamParam *			pCamParam,
        CSL_CamBaseAddress *	pBaseAddress
);

/* =============================================================================
 *   @func csl_camClose.c
 *
 *   @desc
 *     This function marks that CSL for the camera interface instance is closed. 
 *     CSL for the camera interface instance need to be reopened before using
 *     any camera interface CSL API again.
 *      
 *   @arg    hCam
 *           Handle to the camera interface instance 
 *
 *   @ret    CSL_Status
 *           CSL_SOK            - Camera interface instance is closed
 *                                successfully
 *
 *           CSL_ESYS_BADHANDLE - The handle passed is invalid
 *
 *   @eg
 *       CSL_camClose (hCam);
 * ===========================================================================
 */
extern CSL_Status  CSL_camClose (
    CSL_CamHandle    hCam
);

/* =============================================================================
 *   @func CSL_camHwSetup
 *
 *   @desc
 *       It configures the camera interface registers as per the values passed
 *       in the hardware setup structure.
 *
 *   @arg    hCam
 *           Handle to the camera interface module
 *            
 *   @arg    hwSetup         
 *           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_CamHandle   hCam;
 *       CSL_CamObj      camObj;
 *       CSL_CamHwSetup  hwSetup;
 *       CSL_status      status;
 *
 *       ...
 *
 *       hCam = CSL_camOpen (&camObj, CSL_CAM, NULL, &status); 
 *       
 *       hwSetup.lClkEnable = TRUE;
 *       hwSetup.mClkEnable = FALSE;
 *       hwSetup.camExClkEnable = FALSE;
 *       hwSetup.polClk = CSL_CAM_CTRLCLOCK_POLCLK_RISING_EDGE;
 *       hwSetup.camExClkFreq = CSL_CAM_CTRLCLOCK_FOSCMOD_ARM_PER_CK_8;
 *       hwSetup.resetFifo = TRUE;
 *       hwSetup.fifoFullIntEnable = TRUE;
 *       hwSetup.dataTxIntEnable = TRUE;
 *       hwSetup.threshold = 1;
 *       hwSetup.dmaModeEnable = TRUE;
 *       hwSetup.hsyncDownIntEnable = TRUE;
 *       hwSetup.hsyncUpIntEnable = TRUE;
 *       hwSetup.vsyncUpIntEnable = TRUE; 
 *       hwSetup.vsyncDownIntEnable = TRUE;  
 *       hwSetup.orderCamd = CSL_CAM_MODE_ORDERCAMD_NOT_SWAPPED;
 *       hwSetup.imgSize = CSL_CAM_IMG_VGA;
 *       hwSetup.camOsc = CSL_CAM_OSC_SYNC;
 *       hwSetup.resetCam = TRUE;
 *         
 *       status = CSL_camHwSetup(hCam, &hwSetup);
 * ===========================================================================
 */
extern CSL_Status  CSL_camHwSetup(
    CSL_CamHandle      hCam,
    CSL_CamHwSetup     *hwSetup
);

/* =============================================================================
 *   @func CSL_camHwControl
 *
 *   @desc
 *       This function performs various control operations on the camera
 *       interface, based on the command passed.
 *
 *   @arg    hCam
 *           Handle to the camera interface
 *
 *   @arg    cmd
 *           Operation to be performed on the camera interface
 *
 *   @arg    cmdArg
 *           Arguement specific to the command 
 *            
 *   @eg
 *       status = CSL_camHwControl (hCam, CSL_CMD_CAM_RST, NULL);
 * =============================================================================
 */
extern CSL_Status  CSL_camHwControl(
    CSL_CamHandle          hCam,
    CSL_CamHwControlCmd    cmd,
    void                   *cmdArg
);

/* =============================================================================
 *   @func CSL_camGetHwStatus
 *
 *   @desc
 *       This function is used to get the value of various parameters of the
 *       camera interface. The value returned depends on the query passed.
 *
 *   @arg    hCam
 *           Handle to the camera interface
 *
 *   @arg    query
 *           Query to be performed. 
 *
 *   @arg    response
 *           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
 *       Uint32       camData = 0;
 *       CSL_Status   status;
 *
 *       ...              
 *
 *       status = CSL_camGetHwStatus(hCam, CSL_CAM_QUERY_CAMDATA, &camData);
 *
 *       ...
* =============================================================================
 */
extern CSL_Status  CSL_camGetHwStatus (
    CSL_CamHandle          hCam,
    CSL_CamHwStatusQuery   query,
    void                   *response
);

/*
 * =============================================================================
 *   @func CSL_camHwSetupRaw
 *
 *   @desc
 *       This function configures the registers of camera interface as per the
 *       values given in the config structure.  
 *
 *   @arg hCam
 *        Handle to the camera interface instance
 *
 *   @arg hwConfig
 *        Pointer to the camera interface config structure
 *
 *   @ret CSL_Status
 *         CSL_SOK             - Configuration successful
 *         CSL_ESYS_BADHANDLE  - Invalid handle
 *
 *   @eg
 *    
 *        CSL_status            status;
 *        CSL_CamConfig	        hwConfig;
 *
 *        ...
 *
 *        status = CSL_camHwSetupRaw (hCam, &hwConfig);
 *
 *        ...
 * ===========================================================================
 */
extern CSL_Status  CSL_camHwSetupRaw (
    CSL_CamHandle           hCam,
    CSL_CamConfig *         config
);

/** ============================================================================
 *   @func CSL_camGetHwSetup
 *
 *   @desc
 *       It retrives the hardware setup parameters of the camera interface
 *       module specified by the given handle.
 *
 *   @arg    hCam
 *           Handle to the camera interface
 *
 *   @arg    hwSetup
 *           Pointer to the harware setup structure
 *
 *   @ret    CSL_Status
 *           CSL_SOK            - Retrieving the hardware setup                                           parameters is successful
 *           CSL_ESYS_BADHANDLE - The handle is passed is invalid
 *
 *   @eg
 *       CSL_CamHandle   hCam;
 *       CSL_CamHwSetup  hwSetup;
 *
 *       ...
 *
 *       status = CSL_camGetHwSetup(hCam, &hwSetup);
 *
 *       ...
* ==============================================================================
 */
extern CSL_Status  CSL_camGetHwSetup(
    CSL_CamHandle      hCam,
    CSL_CamHwSetup     *hwSetup
);

#ifdef __cplusplus
}
#endif

#endif  /* _CSL_CAM_H_ */

⌨️ 快捷键说明

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