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

📄 csl_vfoc.h

📁 TI的DM6446的硬件平台搭建的相关例子
💻 H
📖 第 1 页 / 共 2 页
字号:
/** @mainpage VFOC CSL 3.x
 *
 * @section Introduction
 *
 * @subsection xxx Purpose and Scope
 * The purpose of this document is to identify a set of common CSL APIs for
 * the VFOC module across various devices. The CSL developer is expected to
 * refer to this document while designing APIs for these modules. Some of the
 * listed APIs may not be applicable to a given VFOC module. While other cases
 * this list of APIs may not be sufficient to cover all the features of a
 * particular VFOC Module. The CSL developer should use his discretion designing
 * new APIs or extending the existing ones to cover these.
 *
 * @subsection aaa Terms and Abbreviations
 *   -# CSL:  Chip Support Library
 *   -# API:  Application Programmer Interface
 *
 * @subsection References
 *    -# CSL-001-DES, CSL 3.x Design Specification DocumentVersion 1.02
 *    -# VFOC_SPEC, VFOC Detailed Design Specification, Version 1.00.w.11 
 *
 */

/** @file csl_vfoc.h
 *
 * @brief    Header file for functional layer of CSL
 *
 * Description
 *    - The different enumerations, structure definitions
 *      and function declarations
 *
 * Modification 1
 *    - modified on: 1/10/2004
 *    - reason: Created the sources
 *
 * Modification 2
 *    - modified on: 04/08/2005
 *    - reason: Added several modifications based on DSC feedback
 *
 *
 * @date 1st OCT, 2004
 * @author Sandeep Tiwari
 *
 */
#ifndef _CSL_VFOC_H_
#define _CSL_VFOC_H_

#ifdef __cplusplus
extern "C" {
#endif

#include <cslr.h>
#include <csl_error.h>
#include <csl_sysData.h>
#include <csl_types.h>
#include <cslr_vfoc.h>

/****** ********************************************************************\
*		VFOC global macro declarations
\**************************************************************************/

/** Constants for passing parameters to the VFOC Hardware Setup function
 */

/** For indicating that the VFOC module is enabled    */
#define CSL_VFOC_ENABLE							(CSL_VFOC_PCR_ENABLE_ENABLE)
/** For indicating that the VFOC module is disabled   */
#define CSL_VFOC_DISABLE						(CSL_VFOC_PCR_ENABLE_DISABLE)

/** For indicating that the VFOC module is busy    */
#define CSL_VFOC_BUSY							(CSL_VFOC_PCR_BUSY_BUSY)
/** For indicating that the VFOC module is not busy    */
#define CSL_VFOC_NOT_BUSY						(CSL_VFOC_PCR_BUSY_NOTBUSY)

/** For setting the select abs(1-3)   */
#define CSL_VFOC_SELECT_ABS_13					(CSL_VFOC_VFOCUS_CNT_PDIF_ABS_1TO3)
/** For setting the select abs(1-5)    */
#define CSL_VFOC_SELECT_ABS_15					(CSL_VFOC_VFOCUS_CNT_PDIF_ABS_1TO5)

/** For indicating that the BINNING is enabled    */
#define CSL_VFOC_BIN_ENABLE						(CSL_VFOC_VFOCUS_CNT_BIN_AVG_2LIKECOLOR_PIXELSH)
/** For indicating that the BINNING is disabled  */
#define CSL_VFOC_BIN_DISABLE					(CSL_VFOC_VFOCUS_CNT_BIN_NOBIN)


/**************************************************************************\
* VFOC global typedef declarations
\**************************************************************************/

/** @brief This object contains the reference to the instance of VFOC opened
 *  using the @a CSL_vfocOpen().
 *
 *  The pointer to this, is passed to all VFOC CSL APIs.
 */
typedef struct CSL_VfocObj {
	/** This is the mode which the CSL instance is opened     */
	CSL_OpenMode openMode;
	/** This is a unique identifier to the instance of VFOC being
	 *  referred to by this object
	 */
	CSL_Uid uid;
	/** This is the variable that contains the current state of a
	 *  resource being shared by current instance of VFOC with
     *  other peripherals
     */
	CSL_Xio xio;
	/** This is a pointer to the registers of the instance of VFOC
     *  referred to by this object
     */
	CSL_VfocRegsOvly regs;
	/** This is the instance of VFOC being referred to by this object  */
	CSL_VfocNum perNum;
}CSL_VfocObj;

typedef struct CSL_VfocObj *CSL_VfocHandle;



/** @brief Enumeration for queries passed to @a CSL_vfocGetHwStatus()
 *
 * This is used to get the status of different operations or to get the
 * existing setup of VFOC.
 */

typedef enum {
 	   /** Get the VFOC module ID and revision numbers (response type: @a (CSL_HistRevStatus*)) */  
	   CSL_VFOC_QUERY_REV_ID = 1,
	   /** Get the VFOC busy status (reponse type: @a Uint16 *) */      
	   CSL_VFOC_QUERY_IS_BUSY,    
       /** Get the window accumulated value for R,G,B (response type @a (CSL_VfocWinAccVal *) */
       CSL_VFOC_QUERY_WIN_ACCUM_VAL 
} CSL_VfocHwStatusQuery;


/** @brief Enumeration for queries passed to @a CSL_vfocHwControl()
 *
 * This is used to select the commands to control the operations
 * existing setup of VFOC. The arguments to be passed with each
 * enumeration if any are specified next to the enumeration.
 */
 typedef enum {
       /** Enable/Disable the VFOC: argument @a (Uint16*)
			CSL_VFOC_ENABLE, CSL_VFOC_DISABLE*/
       CSL_VFOC_CMD_ENABLE = 1,	
       /** Clears the accumulators: no argument */
       CSL_VFOC_CMD_CLEAR_DATA,
       /** Select absolute difference of pixels on lines (1-3) or lines (1-5):argument @a (Uint16*) 
			CSL_VFOC_SELECT_ABS_13, CSL_VFOC_SELECT_ABS_15*/
       CSL_VFOC_CMD_SELECT_ABS,
       /** Average two same color pixels horizontally : argument @a (Uint16*)
			CSL_VFOC_BIN_ENABLE, CSL_VFOC_BIN_DISABLE */
       CSL_VFOC_CMD_BIN_ENABLE,
       /** Set a window size(num; start:vert,horz;end:vert,horz):argument @a (CSL_VfocWinSize *) */
       CSL_VFOC_CMD_SET_WIN_SIZE,
       /** Write the lookup table :argument @a (Uint32 *) */
       CSL_VFOC_CMD_WRITE_LUT      
} CSL_VfocHwControlCmd;

/** @brief Enumeration for region numbers for @a CSL_VfocWinSize struct
 *
 * This is used to identify which window is being set.
 */
typedef enum {
		/** Window 0 */  
		CSL_VFOC_W0 = 0,
		/** Window 1 */  
		CSL_VFOC_W1,
		/** Window 2 */  
		CSL_VFOC_W2,
		/** Window 3 */  
		CSL_VFOC_W3,
		/** Window 4 */  
		CSL_VFOC_W4,
		/** Window 5 */  
		CSL_VFOC_W5
 } CSL_VfocWinNum;


/** @brief This has all the fields required to configure the start and
 * end positions of a window
 *
 *  This structure is used to configure the window start and send postions
 * (both vertical and horizontal) using the CSL_VfocHwControl() function
 */

typedef struct CSL_VfocWinSize_ {
    /** Window Number */
	CSL_VfocWinNum  winNum;
    /** Start horizontal position */
    Uint16 startHorz;
    /** End horizontal position */
    Uint16 endHorz;
    /** Start Vertical position */
    Uint16 startVert;
    /** End Vertical position*/
    Uint16 endVert;
}CSL_VfocWinSize;

/** @brief This has all the fields required to get the accumulated values for
 *  R,G,and B colors
 *
 *  This structure is used to query the R,G and B accumulated window for each
 *  window using the CSL_VfocGetHwStatus() function
 */

typedef struct CSL_VfocWinAccVal_ {
    /** Window Number */
	CSL_VfocWinNum  winNum;
    /** Red value: lower 32 bits */
    Uint32 rlow;
    /** Red value: upper 8 bits  */
    Uint16 rhigh;
    /** Green value: lower 32 bits */
    Uint32 glow;
    /** Green value: upper 8 bits  */
    Uint16 ghigh;
    /** Blue value: lower 32 bits */
    Uint32 blow;
    /** Blue value: upper 8 bits  */
    Uint16 bhigh;
}CSL_VfocWinAccVal;


/** @brief VFOC Peripheral ID, Class, and Revision structure
*
*  This structure is used for querying the VFOC peripheral ID, class, and revision 
*/
typedef struct CSL_VfocRevStatus_{
     /** Vfoc Peripheral ID */
     Uint16 peripheralID;
     /** Class Identification */
     Uint16 classID;
     /**  Revision Number*/
     Uint16 revNum;
}CSL_VfocRevStatus;	 


/** @brief This has all the fields required to configure VFOC at Power Up
 *  (After a Hardware Reset) or a Soft Reset
 *
 *  This structure is used to setup VFOC using @a CSL_vfocHwSetup() function.
 */
typedef struct CSL_VfocHwSetup_ {

		/** The following settings are required */
		
        /** binning: CSL_VFOC_BIN_ENABLE, CSL_VFOC_BIN_DISABLE */
        Uint8 binning;
        /** abs: CSL_VFOC_SELECT_ABS_13, CSL_VFOC_SELECT_ABS_15 */
        Uint8 abs;

⌨️ 快捷键说明

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