📄 csl_histhwsetup.c
字号:
/** @file csl_histHwSetup.c
*
* @brief File for functional layer of CSL API @a CSL_histHwSetup()
*
* Description
* - The @a CSL_histHwSetup() function definition & it's associated
* functions
*
* Modification 1
* - Modified on: 10/19/2004
* - Reason: created the sources
*
* @date 19th Oct, 2004
* @author Sandeep Tiwari.
*/
#include<csl_hist.h>
#pragma CODE_SECTION (CSL_histHwSetup, ".text:csl_section:hist");
/** @brief Configures the HIST using the values passed in through the
* setup structure.
*/
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
){
CSL_Status status=CSL_SOK;
if(setup == NULL) return (CSL_ESYS_INVPARAMS);
// Clear the histogram RAM
CSL_histClearData(hHist);
if(CSL_histSelInputSource(hHist, setup->inputSource) != CSL_SOK) status = CSL_ESYS_INVPARAMS;
if(CSL_histSelInputDataWidth(hHist, setup->inputDataWidth) != CSL_SOK) status = CSL_ESYS_INVPARAMS;
if(CSL_histSetBitShift(hHist, setup->bitShift) != CSL_SOK) status = CSL_ESYS_INVPARAMS;
if(CSL_histSelCfaPatrn(hHist, setup->cfaPattern) != CSL_SOK) status = CSL_ESYS_INVPARAMS;
if(CSL_histSelBins(hHist, setup->numBins) != CSL_SOK) status = CSL_ESYS_INVPARAMS;
if(CSL_histSelClearData(hHist, setup->clearData) != CSL_SOK) status = CSL_ESYS_INVPARAMS;
CSL_histSetRegionInfo(hHist, setup->region0);
CSL_histSetRegionInfo(hHist, setup->region1);
CSL_histSetRegionInfo(hHist, setup->region2);
CSL_histSetRegionInfo(hHist, setup->region3);
CSL_histSetPixelInfo(hHist, setup->pixInfo);
return status;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -