_csl_h3asetaewbconfig.c

来自「TI达芬奇dm644x各硬件模块测试代码」· C语言 代码 · 共 55 行

C
55
字号
/** @file _csl_h3aSetAewbConfig.c
 *
 *  @brief    File for functional layer of CSL API @a CSL_h3aSetAewbConfig()
 *
 *  Description
 *    - The @a CSL_h3aSetAewbConfig() function definition & it's associated
 *      functions
 *
 *  @date 26th May, 2005
 *  @author Jesse Villarreal
 */

#include <csl_h3a_aux.h>

#pragma CODE_SECTION (CSL_h3aSetAewbConfig, ".text:csl_section:h3a");

/** @brief Sets the AE/AWB parameters for the H3A module
 *	
 */
CSL_Status  CSL_h3aSetAewbConfig(
    /** Pointer to the object that holds reference to the
     *  instance of H3A requested after the call 
	 */
    CSL_H3aHandle                         hH3a,
    /** Sets the AE/AWB parameters for the H3A module
	 */
    CSL_H3aAewbConfig					   *config
	){

    CSL_H3aRegsOvly h3aRegs =  hH3a->regs; 
	CSL_Status   status=CSL_SOK;
    if(config == NULL) return (CSL_ESYS_INVPARAMS);

	/**Set H3A AE/AWB engine configuration */

	CSL_h3aAewbAlawEn(hH3a, config->alawEnable);
	CSL_h3aSetAewbSatLimit(hH3a, config->saturationLimit);

	h3aRegs->AEWWIN1 =		CSL_FMK(H3A_AEWWIN1_WINH,((config->winHeight>>1)-1))	|
			                CSL_FMK(H3A_AEWWIN1_WINW,((config->winWidth>>1)-1))		|
                            CSL_FMK(H3A_AEWWIN1_WINVC,(config->winVertCount-1))		|
                            CSL_FMK(H3A_AEWWIN1_WINHC,(config->winHorzCount-1));
	h3aRegs->AEWINSTART =	CSL_FMK(H3A_AEWINSTART_WINSV,config->winStartV)	|
		                    CSL_FMK(H3A_AEWINSTART_WINSH,config->winStartH);
	h3aRegs->AEWINBLK =		CSL_FMK(H3A_AEWINBLK_WINSV,config->winBlacklineStartV)	|
			                CSL_FMK(H3A_AEWINBLK_WINH,((config->winBlacklineHeight>>1)-1));
	h3aRegs->AEWSUBWIN =	CSL_FMK(H3A_AEWSUBWIN_AEWINCV,((config->winSampleIncrV>>1)-1))	|
			                CSL_FMK(H3A_AEWSUBWIN_AEWINCH,((config->winSampleIncrH>>1)-1));

	status = CSL_h3aSetAewbAddr(hH3a, config->sdramAddress);

    return status;
}

⌨️ 快捷键说明

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