_csl_prevsetblackcomp.c

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

C
51
字号
/** @file _csl_prevSetBlackAdj.c
 *
 *  @brief    File for functional layer of CSL API @a _CSL_prevSetBlackAdj()
 *
 *  Description
 *    - The @a _CSL_prevSetBlackAdj() function definition & it's associated
 *      functions
 *
 *  @date 19th October, 2004
 *  @author Vignesh LA.
 */

#include <csl_prev_aux.h>

#pragma CODE_SECTION (CSL_prevSetBlackAdj, ".text:csl_section:prev");

/** @brief Configures the PREV using the values passed in through the
 *  Black level adjustment offsets passed.
 */
CSL_Status  CSL_prevSetBlackAdj(
    /** Pointer to the object that holds reference to the
     *  instance of PREV requested after the call 
	 */
    CSL_PrevHandle                         hPrev,
    /** Pointer to the structure giving the black level adjustment offsets.
	 */
    CSL_PrevBlackAdjData                   *data
	){
	
    if(data == NULL) return (CSL_ESYS_INVPARAMS);
	
	hPrev->regs->BLKADJOFF	 = CSL_FMK(PREV_BLKADJOFF_R,data->red)|
	                           CSL_FMK(PREV_BLKADJOFF_G,data->green)|
	                           CSL_FMK(PREV_BLKADJOFF_B,data->blue);
	
    return (CSL_SOK);
}













⌨️ 快捷键说明

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