csl_histhwsetup.c
来自「TI达芬奇dm644x各硬件模块测试代码」· C语言 代码 · 共 64 行
C
64 行
/** @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 + =
减小字号Ctrl + -
显示快捷键?