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

📄 csl_h3a.h

📁 TI达芬奇dm644x各硬件模块测试代码
💻 H
📖 第 1 页 / 共 2 页
字号:
 */
 typedef enum {

		/** Enable/Disable AF : argument (Uint16*) 
			CSL_H3A_AF_ENABLE, CSL_H3A_AF_DISABLE */ 
		CSL_H3A_CMD_ENABLE_AF = 1,
		/** Enable/Disable AE/AWB: argument (Uint16*) 
			CSL_H3A_AEW_ENABLE, CSL_H3A_AEW_DISABLE  */
		CSL_H3A_CMD_ENABLE_AE_AWB,
		/** Set the AF SDRAM Output Address: argument @a (Uint32*) 
			(must be on a 64 byte boundary)*/      
		CSL_H3A_CMD_SET_AF_SDRAM_ADDR,
		/** Set the AE/AWB SDRAM Output Address: argument @a (Uint32*) 
			(must be on a 64 byte boundary)*/      
		CSL_H3A_CMD_SET_AEWB_SDRAM_ADDR,
		/** Enable AF A-Law : argument (Uint16*) 
			CSL_H3A_AF_ALAW_ENABLE, CSL_H3A_AF_ALAW_DISABLE */        
		CSL_H3A_CMD_ENABLE_AF_ALAW,
		/** Enable AE/AWB A-Law : argument (Uint16*) 
			CSL_H3A_AEW_ALAW_ENABLE, CSL_H3A_AEW_ALAW_DISABLE */         
		CSL_H3A_CMD_ENABLE_AEWB_ALAW,
		/** Enable median filter : argument (Uint16*) 
			CSL_H3A_AF_MED_ENABLE, CSL_H3A_AF_MED_DISABLE */  
		CSL_H3A_CMD_ENABLE_AF_MEDIAN_FILT,
		/** Set the median fiter threshold: argument @a (Uint16*) */      
		CSL_H3A_CMD_SET_MEDIAN_FILT_THR,
		/** Set focus value accumulation mode : argument @a (Uint16*) 
			CSL_H3A_AF_SUM_MODE, CSL_H3A_AF_PEAK_MODE */
		CSL_H3A_CMD_SET_AF_FV_ACCUM_MODE,
		/** Config pixel location of R,G,B in AF windows : argument @a (Uint16*) 
			CSL_H3A_AF_RGBPOS_GR_GB_BAYER	
			CSL_H3A_AF_RGBPOS_RG_GB_BAYER	
			CSL_H3A_AF_RGBPOS_GR_BG_BAYER	
			CSL_H3A_AF_RGBPOS_RG_BG_BAYER	
			CSL_H3A_AF_RGBPOS_GG_RB_CUSTOM	
			CSL_H3A_AF_RGBPOS_RB_GG_CUSTOM	*/
		CSL_H3A_CMD_SELECT_AF_RGBPOS_WIN,
		/** Set the AE/AWB saturation limit : argument @a (Uint16*) */
		CSL_H3A_CMD_SET_AEWB_SATURATION_LIMIT,
		/** Set the setup configuration for the AF submodule: argument @a (CSL_H3aAfConfig) */
		CSL_H3A_CMD_SET_AF_CONFIG,
		/** Set the setup configuration for the AE/AWB submodule: argument @a (CSL_H3aAewbConfig) */
		CSL_H3A_CMD_SET_AEWB_CONFIG
               
} CSL_H3aHwControlCmd;



/**************************************************************************\
* H3A global function declarations
\**************************************************************************/

/**  This function is idempotent in that calling it many times is same as
 *   calling it once. This function initializes the H3A CSL data structures.
 *
 * <b> Usage Constraints: </b>
 * CSL system initialization must be successfully completed by invoking
 * @a CSL_sysInit() before calling this function. This function should be
 * called before using any of the CSL APIs
 *
 * @b Example:
 * @verbatim


   ...
   CSL_sysInit();
   if (CSL_SOK != CSL_h3aInit()) {
       return;
   }
   @endverbatim
 *
 * @return returns the status of the operation
 *
 */
CSL_Status  CSL_h3aInit(
   void
);


/** The open call sets up the data structures for the particular instance of
 *  H3A device. The device can be re-opened anytime after it has been normally
 *  closed if so required. H3A Hardware setup will be performed at the end of
 *  the open call only if the HwSetup Pointer supplied was non- NULL. 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 h3a must be successfully initialized
 *  via @a CSL_sysInit() and @a CSL_h3aInit() before calling this
 *  function. Memory for the @a CSL_h3aObj must be allocated outside
 *  this call. This object must be retained while usage of this peripheral.
 *
 *  @b Example:
 *  @verbatim

	  CSL_H3aObj     h3aObj;
	  CSL_H3aHwSetup h3aSetup;
	  CSL_Status       status;
 		...
	  hH3a = CSL_h3aOpen(&h3aObj,
                          CSL_H3A_0,
                          CSL_EXCLUSIVE,
                          &h3aSetup,
                          &status);
   @endverbatim
 *
 * @return returns a handle @a CSL_H3aHandle to the requested instance of
 * H3A if the call is successful, otherwise, a @a NULL is returned.
 *
 */
CSL_H3aHandle CSL_h3aOpen (
    /** Pointer to the object that holds reference to the
     *  instance of H3A requested after the call
     */
    CSL_H3aObj              *hH3aObj,
    /** Instance of H3A to which a handle is requested
     */
    CSL_H3aNum               h3aNum,
    /** Specifies if H3A should be opened with exclusive or
     *  shared access to the associate pins
     */
    CSL_OpenMode                openMode,
    /** This returns the status (success/errors) of the call
     */
    CSL_Status                  *status
);

/**  The Close call releases the resource and appropriate shared pins.
 *
 * <b> Usage Constraints: </b>
 * Both @a CSL_h3aInit() and @a CSL_h3aOpen() must be called successfully
 * in that order before @a CSL_h3aClose() can be called.
 *
 * @b Example:
 * @verbatim


   CSL_H3aHandle hH3a;
   ...
   CSL_h3aClose(hH3a);
   @endverbatim
 *
 * @return returns the status of the operation (see @a CSL_Status)
 *
 */
CSL_Status  CSL_h3aClose(
    /** Pointer to the object that holds reference to the
     *  instance of H3A requested after the call
     */
    CSL_H3aHandle                         hH3a
);


/** This function initializes the device registers with the appropriate values
 *  provided through the HwSetup Data structure. This function needs to be called
 *  only if the HwSetup Structure was not previously passed through the Open call.
 *  After the Setup is completed, the serial device is ready for data transfer.
 *  For information passed through the HwSetup Data structure refer
 *  @a CSL_H3aHwSetup.
 *
 *  <b> Usage Constraints: </b>
 *  Both @a CSL_h3aInit() and @a CSL_h3aOpen() must be called
 *  successfully in that order before this function can be called. The user
 *  has to allocate space for & fill in the main setup structure appropriately
 *  before calling this function
 *
 * @b Example:
 * @verbatim
     CSL_H3aHandle hH3a;
     CSL_H3aHwSetup hwSetup = CSL_H3A_HWSETUP_DEFAULTS;
     CSL_h3aHwSetup(hH3a, &hwSetup);
  @endverbatim
 *
 * @return Returns the status of the setup operation
 *
 */
CSL_Status  CSL_h3aHwSetup(
    /** Pointer to the object that holds reference to the
     *  instance of H3A requested after the call
     */
    CSL_H3aHandle                         hH3a,
    /** Pointer to setup structure which contains the
     *  information to program H3A to a useful state
     */
    CSL_H3aHwSetup                        *setup
);


/** Control operations for the H3A.  For a particular control operation, the
 *  pointer to the corresponding data type needs to be passed as argument HwControl
 *  function Call. All the arguments (Structure elements included) passed to  the
 *  HwControl function are inputs. For the list of commands supported and argument
 *  type that can be @a void* casted & passed with a particular command refer to
 *  @a CSL_H3aHwControlCmd.
 *
 *  <b> Usage Constraints: </b>
 *  Both @a CSL_h3aInit() and @a CSL_h3aOpen() must be called successfully
 *  in that order before @a CSL_h3aHwControl() can be called. For the
 *  argument type that can be @a void* casted & passed with a particular command
 *  refer to @a CSL_H3aHwControlCmd
 *
 * @b Example:
 * @verbatim
       CSL_H3aHandle hH3a;
       CSL_Status status;
       ...
       status = CSL_h3aHwControl(hH3a,
                                    CSL_H3A_CMD_ENABLE_AF,
                                   &command);
   @endverbatim
 *
 *  @return returns the status of the operation (see @a CSL_Status)
 *
 */
CSL_Status  CSL_h3aHwControl(
    /** Pointer to the object that holds reference to the
     *  instance of H3A requested after the call
     */
    CSL_H3aHandle                        hH3a,
    /** The command to this API indicates the action to be taken
     */
    CSL_H3aHwControlCmd                  cmd,
    /** An optional argument @a void* casted
     */
    void                                 *arg
);


/** This function is used to read the current device configuration, status flags
 *  and the value present associated registers. Following table details the various
 *  status queries supported and the associated data structure to record the response.
 *  User should allocate memory for the said data type and pass its pointer as an
 *  unadorned void* argument to the status query call. For details about the various
 *  status queries supported and the associated data structure to record the response,
 *  refer to @a CSL_H3aHwStatusQuery
 *
 *  <b> Usage Constraints: </b>
 *  Both @a CSL_h3aInit() and @a CSL_h3aOpen() must be called successfully
 *  in that order before @a CSL_h3aGetHwStatus() can be called. For the
 *  argument type that can be @a void* casted & passed with a particular command
 *  refer to @a CSL_H3aHwStatusQuery
 *
 * @b Example:
 * @verbatim
	  CSL_H3aHandle hH3a;
	  CSL_Status status;
	  Uint16  response;
	   ...
	  status = CSL_h3aGetHwStatus(hH3a,
                           CSL_H3A_QUERY_BUSY_AF,
                                  &response);
   @endverbatim
 *
 * @return Returns the status of the operation (see @a CSL_Status)
 *
 */
CSL_Status  CSL_h3aGetHwStatus(
    /** Pointer to the object that holds reference to the
     *  instance of H3A requested after the call
     */
    CSL_H3aHandle                         hH3a,
    /** The query to this API which indicates the status
     *  to be returned
     */
    CSL_H3aHwStatusQuery                  query,
    /** Placeholder to return the status. @a void* casted */
    void                                    *response
);

#ifdef __cplusplus
}
#endif


#endif

⌨️ 快捷键说明

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