📄 csl_hist.h
字号:
Uint32 *buffer;
}CSL_HistReadDataInfo;
/**
* This structure is used to obtain horizontal & vertical
* no ofpixels/line when reading data from SDRAM/DDRAM of
* HIST @ CSL_histHwControl() function
*/
typedef struct CSL_HistPixelInfo{
/** Number of horizontal pixels */
Uint16 numPixelH;
/** Number of vertical lines */
Uint16 numLineV;
/** Sdram read address */
Uint32 *addr;
/** Sdram read line offset */
Uint16 offset;
}CSL_HistPixelInfo;
/** @brief This has all the fields required to configure HIST at Power Up
* (After a Hardware Reset) or a Soft Reset
*
* This structure is used to setup or obtain existing setup of
* HIST using @a CSL_histHwSetup() function.
*/
typedef struct CSL_HistHwSetup_ {
/** The following information is required. */
/** Set input source : CSL_HIST_SOURCE_CCDC, CSL_HIST_SOURCE_SDRAM */
Uint8 inputSource;
/** Set input data width : CSL_HIST_DATA_WIDTH_9_14, CSL_HIST_DATA_WIDTH_8*/
Uint8 inputDataWidth;
/** Set bit shift : (0-7) */
Uint8 bitShift;
/** Select CFA pattern : CSL_HIST_CFA_CONVENTIONAL, CSL_HIST_CFA_FOVEON*/
Uint8 cfaPattern;
/** Set White Balance gains */
CSL_HistWBGainInfo wbGain;
/** Select the number of bins : CSL_HIST_BINS_NUM_32, CSL_HIST_BINS_NUM_64, CSL_HIST_BINS_NUM_128, CSL_HIST_BINS_NUM_256*/
Uint8 numBins;
/** Select the clear data after read function : CSL_HIST_CLEAR_AFTER_READ, CSL_HIST_NO_CLEAR_AFTER_READ*/
Uint8 clearData;
/** The following information is not required. A NULL pointer may be returned if the infomation does not need to be set. */
/** Set region0 information */
CSL_HistRegInfo *region0;
/** Set region1 information */
CSL_HistRegInfo *region1;
/** Set region2 information */
CSL_HistRegInfo *region2;
/** Set region3 information */
CSL_HistRegInfo *region3;
/** Data required when source of image is SDRAM */
CSL_HistPixelInfo *pixInfo;
}CSL_HistHwSetup;
/**************************************************************************\
* HIST global function declarations
\**************************************************************************/
/** This function is idempotent in that calling it many times is same as
* calling it once. This function initializes the HIST 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_histInit()) {
return;
}
@endverbatim
*
* @return returns the status of the operation
*
*/
CSL_Status CSL_histInit(
void
);
/** The open call sets up the data structures for the particular instance of
* HIST device. The device can be re-opened anytime after it has been normally
* closed if so required. HIST 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 hist must be successfully initialized
* via @a CSL_sysInit() and @a CSL_histInit() before calling this
* function. Memory for the @a CSL_histObj must be allocated outside
* this call. This object must be retained while usage of this peripheral.
*
* @b Example:
* @verbatim
CSL_HistObj histObj;
CSL_Status status;
...
hHist = CSL_histOpen(&histObj,
CSL_HIST_0,
CSL_EXCLUSIVE,
&status);
@endverbatim
*
* @return returns a handle @a CSL_HistHandle to the requested instance of
* HIST if the call is successful, otherwise, a @a NULL is returned.
*
*/
CSL_HistHandle CSL_histOpen (
/** Pointer to the object that holds reference to the
* instance of HIST requested after the call
*/
CSL_HistObj *hHistObj,
/** Instance of HIST to which a handle is requested
*/
CSL_HistNum histNum,
/** Specifies if HIST 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_histInit() and @a CSL_histOpen() must be called successfully
* in that order before @a CSL_histClose() can be called.
*
* @b Example:
* @verbatim
CSL_HistHandle hHist;
...
CSL_histClose(hHist);
@endverbatim
*
* @return returns the status of the operation (see @a CSL_Status)
*
*/
CSL_Status CSL_histClose(
/** Pointer to the object that holds reference to the
* instance of HIST requested after the call
*/
CSL_HistHandle hHist
);
/** 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_HistHwSetup.
*
* <b> Usage Constraints: </b>
* Both @a CSL_histInit() and @a CSL_histOpen() 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_HistHandle hHist;
CSL_HistHwSetup hwSetup = CSL_HIST_HWSETUP_DEFAULTS;
CSL_histHwSetup(hHist, &hwSetup);
@endverbatim
*
* @return Returns the status of the setup operation
*
*/
CSL_Status CSL_histHwSetup(
/** Pointer to the object that holds reference to the
* instance of HIST requested after the call
*/
CSL_HistHandle hHist,
/** Pointer to setup structure which contains the
* information to program HIST to a useful state
*/
CSL_HistHwSetup *setup
);
/** Control operations for the HIST. 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_HistHwControlCmd.
*
* <b> Usage Constraints: </b>
* Both @a CSL_histInit() and @a CSL_histOpen() must be called successfully
* in that order before @a CSL_histHwControl() can be called. For the
* argument type that can be @a void* casted & passed with a particular command
* refer to @a CSL_HistHwControlCmd
*
* @b Example:
* @verbatim
CSL_HistHandle hHist;
CSL_Status status;
...
status = CSL_histHwControl(hHist,
CSL_HIST_CMD_START,
&command);
@endverbatim
*
* @return returns the status of the operation (see @a CSL_Status)
*
*/
CSL_Status CSL_histHwControl(
/** Pointer to the object that holds reference to the
* instance of HIST requested after the call
*/
CSL_HistHandle hHist,
/** The command to this API indicates the action to be taken
*/
CSL_HistHwControlCmd 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_HistHwStatusQuery
*
* <b> Usage Constraints: </b>
* Both @a CSL_histInit() and @a CSL_histOpen() must be called successfully
* in that order before @a CSL_histGetHwStatus() can be called. For the
* argument type that can be @a void* casted & passed with a particular command
* refer to @a CSL_HistHwStatusQuery
*
* @b Example:
* @verbatim
CSL_HistHandle hHist;
CSL_Status status;
Uint16 response;
...
status = CSL_histGetHwStatus(hHist,
CSL_HIST_QUERY_BUS_BUSY,
&response);
@endverbatim
*
* @return Returns the status of the operation (see @a CSL_Status)
*
*/
CSL_Status CSL_histGetHwStatus(
/** Pointer to the object that holds reference to the
* instance of HIST requested after the call
*/
CSL_HistHandle hHist,
/** The query to this API which indicates the status
* to be returned
*/
CSL_HistHwStatusQuery 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 + -