_csl_reszsetresizevalue.c

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

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

#include <csl_resz_aux.h>

#pragma CODE_SECTION (CSL_reszSetResizeValue, ".text:csl_section:resz");

/** @brief Sets the resize values
 *	
 */
CSL_Status  CSL_reszSetResizeValue(
    /** Pointer to the object that holds reference to the
     *  instance of RESZ requested after the call 
	 */
    CSL_ReszHandle                         hResz,
    /** Pointer to structure holding the data
	 */
    CSL_ReszResizeValue					   *data
	){

	CSL_ReszRegsOvly reszRegs =  hResz->regs; 
    if(data == NULL) return (CSL_ESYS_INVPARAMS);

	CSL_FINS(reszRegs->RSZ_CNT,RESZ_RSZ_CNT_VRSZ,data->vrzValue-1);
	CSL_FINS(reszRegs->RSZ_CNT,RESZ_RSZ_CNT_HRSZ,data->hrzValue-1);

	if(	data->vrzValue < 64		||
		data->vrzValue > 1024	||
		data->hrzValue < 64		||
		data->hrzValue > 1024
	  )
		return (CSL_ESYS_INVPARAMS);
	else
		return (CSL_SOK);
}

⌨️ 快捷键说明

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