📄 csl_h3a.h
字号:
/** @mainpage H3A 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 H3A 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 H3A module. While other cases
* this list of APIs may not be sufficient to cover all the features of a
* particular H3A 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
* -# H3A_SPEC, H3A Detailed Design Specification, Version 1.00.w.17
*
*/
/** @file csl_h3a.h
*
* @brief Header file for functional layer of CSL
*
* Description
* - The different enumerations, structure definitions
* and function declarations
*
* Modification 1
* - modified on: 10/18/2004
* - reason: Created the sources
*
* Modification 2
* - modified on: 04/08/2005
* - reason: Added several modifications based on DSC feedback
*
*
* @date 18th Oct, 2004
* @author Sandeep Tiwari
*
*/
#ifndef _CSL_H3A_H_
#define _CSL_H3A_H_
#ifdef __cplusplus
extern "C" {
#endif
#include <cslr.h>
#include <csl_error.h>
#include <csl_sysData.h>
#include <csl_types.h>
#include <cslr_h3a.h>
/****** ********************************************************************\
* H3A global macro declarations
\**************************************************************************/
/** Constants for passing parameters to theH3A Hardware Setup function
*/
/** For indicating that the AE/AWB is enabled */
#define CSL_H3A_AEW_ENABLE (CSL_H3A_PCR_AEW_EN_ENABLE)
/** For indicating that the AE/AWB is disabled */
#define CSL_H3A_AEW_DISABLE (CSL_H3A_PCR_AEW_EN_DISABLE)
/** For indicating that the AE/AWB A-LAW is enabled */
#define CSL_H3A_AEW_ALAW_ENABLE (CSL_H3A_PCR_AEW_ALAW_EN_ENABLE)
/** For indicating that the AE/AWB A-LAW is disabled */
#define CSL_H3A_AEW_ALAW_DISABLE (CSL_H3A_PCR_AEW_ALAW_EN_DISABLE)
/** For indicating that the AF is enabled */
#define CSL_H3A_AF_ENABLE (CSL_H3A_PCR_AF_EN_ENABLE)
/** For indicating that the AF is disabled */
#define CSL_H3A_AF_DISABLE (CSL_H3A_PCR_AF_EN_DISABLE)
/** For indicating that the AF A-LAW is enabled */
#define CSL_H3A_AF_ALAW_ENABLE (CSL_H3A_PCR_AF_ALAW_EN_ENABLE)
/** For indicating that the AF A-LAW is disabled */
#define CSL_H3A_AF_ALAW_DISABLE (CSL_H3A_PCR_AF_ALAW_EN_DISABLE)
/** For indicating that the AF MEDIAN filter is enabled */
#define CSL_H3A_AF_MED_ENABLE (CSL_H3A_PCR_AF_MED_EN_ENABLE)
/** For indicating that the AF MEDIAN filter is diasbled */
#define CSL_H3A_AF_MED_DISABLE (CSL_H3A_PCR_AF_MED_EN_DISABLE)
/** For indicating that the AF accumulation mode is summode */
#define CSL_H3A_AF_SUM_MODE (CSL_H3A_PCR_FVMODE_SUMMODE)
/** For indicating that the AF accumulaton mode is peak mode */
#define CSL_H3A_AF_PEAK_MODE (CSL_H3A_PCR_FVMODE_PEAKMODE)
/** For indicating the red, green, and blue pixel location in the AF windows */
#define CSL_H3A_AF_RGBPOS_GR_GB_BAYER (CSL_H3A_PCR_RGBPOS_GR_GB_BAYER)
#define CSL_H3A_AF_RGBPOS_RG_GB_BAYER (CSL_H3A_PCR_RGBPOS_RG_GB_BAYER)
#define CSL_H3A_AF_RGBPOS_GR_BG_BAYER (CSL_H3A_PCR_RGBPOS_GR_BG_BAYER)
#define CSL_H3A_AF_RGBPOS_RG_BG_BAYER (CSL_H3A_PCR_RGBPOS_RG_BG_BAYER)
#define CSL_H3A_AF_RGBPOS_GG_RB_CUSTOM (CSL_H3A_PCR_RGBPOS_GG_RB_CUSTOM)
#define CSL_H3A_AF_RGBPOS_RB_GG_CUSTOM (CSL_H3A_PCR_RGBPOS_RB_GG_CUSTOM)
/**************************************************************************\
* H3A global typedef declarations
\**************************************************************************/
/** @brief This object contains the reference to the instance of H3A opened
* using the @a CSL_h3aOpen().
*
* The pointer to this, is passed to all H3A CSL APIs.
*/
typedef struct CSL_H3aObj {
/** This is the mode which the CSL instance is opened */
CSL_OpenMode openMode;
/** This is a unique identifier to the instance of H3A 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 H3A with
* other peripherals
*/
CSL_Xio xio;
/** This is a pointer to the registers of the instance of H3A
* referred to by this object
*/
CSL_H3aRegsOvly regs;
/** This is the instance of H3A being referred to by this object */
CSL_H3aNum perNum;
}CSL_H3aObj;
typedef struct CSL_H3aObj *CSL_H3aHandle;
/**@brief AF Configuration Structure
* This structure is used to set the parameters of AF engine of
* H3A @ CSL_h3aHwSetup() function
*/
typedef struct CSL_H3aAfConfig_{
/** AF engine ALAW enable/disable: CSL_H3A_AF_ALAW_ENABLE, CSL_H3A_AF_ALAW_DISABLE*/
Uint16 alawEnable;
/** AF engine median filter enable/disable: CSL_H3A_AF_MED_ENABLE, CSL_H3A_AF_MED_DISABLE*/
Uint16 medEnable;
/** AF engine focus value accumulation mode: CSL_H3A_AF_SUM_MODE, CSL_H3A_AF_PEAK_MODE*/
Uint16 fvMode;
/** AF engine RGB pixel positon in the windows:
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
*/
Uint16 rgbPosition;
/** AF engine paxel width (even number within range [6:256])*/
Uint16 paxWidth;
/** AF engine paxel height (even number within range [2:256])*/
Uint16 paxHeight;
/** AF engine line increment (even number within range [2:32]) */
Uint16 paxLineIncr;
/** AF engine vertical paxel count (number within range [1:128])*/
Uint16 paxVertCount;
/** AF engine horizontal paxel count (number within range [2:36])*/
Uint16 paxHorzCount;
/** AF engine paxel horizontal start position (even number within range [2:4094])
(must be >= iirStartH+2) */
Uint16 paxStartH;
/** AF engine paxel vertical start position (number within range [0:4095])*/
Uint16 paxStartV;
/** AF engine IIR horizontal start position (even number within range [0:4094])*/
Uint16 iirStartH;
/** SDRAM start address (must be on a 64 byte boundary)*/
Uint32 *sdramAddress;
/** AF engine: IIR filter coeff for SET 0 */
Uint16 iirCoef_0[11];
/** AF engine: IIR filter coeff for SET 1*/
Uint16 iirCoef_1[11];
}CSL_H3aAfConfig;
/**@brief AE/AWB Configuration Structure
* This structure is used to set the parameters of AE/AWB engine of
* H3A @ CSL_h3aHwSetup() function
*/
typedef struct CSL_H3aAewbConfig_{
/** AE/AWB engine ALAW enable/disable: CSL_H3A_AEW_ALAW_ENABLE, CSL_H3A_AEW_ALAW_DISABLE*/
Uint16 alawEnable;
/** AE/AWB engine saturation limit (number within range [0:1023])
This is the value that all sub sampled pixels in the AE/AWB engine are compared to. If the
data is greater or equal to this data then the block is considered saturated.*/
Uint16 saturationLimit;
/** AE/AWB engine window width (even number within range [6:256])*/
Uint16 winWidth;
/** AE/AWB engine window height (even number within range [2:256])*/
Uint16 winHeight;
/** AE/AWB engine vertical window count (number within range [1:128])*/
Uint16 winVertCount;
/** AE/AWB engine horizontal window count (number within range [2:36])*/
Uint16 winHorzCount;
/** AE/AWB engine horizontal window start position (number within range [0:4095])*/
Uint16 winStartH;
/** AE/AWB engine vertical window start position (number within range [0:4095])*/
Uint16 winStartV;
/** AE/AWB engine vertical window start position
for single black line of windows (number within range [0:4095])*/
Uint16 winBlacklineStartV;
/** AE/AWB engine window height for single black
line of windows (even number within range [2:256])*/
Uint16 winBlacklineHeight;
/** AE/AWB engine vertical sample increment (even number within range [2:32])*/
Uint16 winSampleIncrV;
/** AE/AWB engine horizintal sample increment (even number within range [2:32])*/
Uint16 winSampleIncrH;
/** SDRAM start address (must be on a 64 byte boundary)*/
Uint32 *sdramAddress;
}CSL_H3aAewbConfig;
/** @brief This has all the fields required to configure H3A at Power Up
* (After a Hardware Reset) or a Soft Reset
*
* This structure is used to setup the H3A using @a CSL_h3aHwSetup() function.
* If only a setup of one of the two submodules is desired, then pass a NULL
* pointer to the other one.
*/
typedef struct CSL_H3aHwSetup_ {
/**Structure for AF engine Configuration */
CSL_H3aAfConfig *afConfig;
/** structure for AE/AWB engine Configuration */
CSL_H3aAewbConfig *aewbConfig;
}CSL_H3aHwSetup;
/** @brief H3A Peripheral ID, Class, and Revision structure
*
* This structure is used for querying the H3A peripheral ID, class, and revision
*/
typedef struct CSL_H3aRevStatus_{
/** H3A Peripheral ID */
Uint16 peripheralID;
/** Class Identification */
Uint16 classID;
/** Revision Number*/
Uint16 revNum;
}CSL_H3aRevStatus;
/** @brief Enumeration for queries passed to @a CSL_h3aGetHwStatus()
*
* This is used to get the status of different operations or to get the
* existing setup of H3A.
*/
typedef enum {
/** Get the H3A module ID and revision numbers (response type: @a (CSL_H3aRevStatus*)) */
CSL_H3A_QUERY_REV_ID = 1,
/** Get the busy status for AF (response type: @a (Uint16 *)) */
CSL_H3A_QUERY_IS_BUSY_AF,
/** Get the busy status for AE/AWB (response type: @a (Uint16 *)) */
CSL_H3A_QUERY_IS_BUSY_AEAWB
} CSL_H3aHwStatusQuery;
/** @brief Enumeration for queries passed to @a CSL_h3aHwControl()
*
* This is used to select the commands to control the operations
* existing setup of H3A. The arguments to be passed with each
* enumeration if any are specified next to the enumeration.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -