csl_vfochwsetup.c
来自「TI达芬奇dm644x各硬件模块测试代码」· C语言 代码 · 共 61 行
C
61 行
/** @file csl_vfocHwSetup.c
*
* @brief File for functional layer of CSL API @a CSL_vfocHwSetup()
*
* Description
* - The @a CSL_vfocHwSetup() function definition & it's associated
* functions
*
* Modification 1
* - Modified on: 10/12/2004
* - Reason: created the sources
*
* @date 12th Oct, 2004
* @author Sandeep Tiwari.
*/
#include<csl_vfoc.h>
#pragma CODE_SECTION (CSL_vfocHwSetup, ".text:csl_section:vfoc");
/** @brief Configures the VFOC using the values passed in through the
* setup structure.
*/
CSL_Status CSL_vfocHwSetup(
/** Pointer to the object that holds reference to the
* instance of VFOC requested after the call
*/
CSL_VfocHandle hVfoc,
/** Pointer to setup structure which contains the
* information to program VFOC to a useful state
*/
CSL_VfocHwSetup *setup
){
CSL_Status status=CSL_SOK;
if(setup == NULL) return (CSL_ESYS_INVPARAMS);
// Clear the vfoc data
if(CSL_vfocClearData(hVfoc) != CSL_SOK) status = CSL_ESYS_INVPARAMS;
if(CSL_vfocBinEn(hVfoc, setup->binning) != CSL_SOK) status = CSL_ESYS_INVPARAMS;
if(CSL_vfocSelAbs(hVfoc, setup->abs) != CSL_SOK) status = CSL_ESYS_INVPARAMS;
CSL_vfocWriteLut(hVfoc, setup->lutEntry);
CSL_vfocSetWinSize(hVfoc, setup->win0);
CSL_vfocSetWinSize(hVfoc, setup->win1);
CSL_vfocSetWinSize(hVfoc, setup->win2);
CSL_vfocSetWinSize(hVfoc, setup->win3);
CSL_vfocSetWinSize(hVfoc, setup->win4);
CSL_vfocSetWinSize(hVfoc, setup->win5);
return status;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?