📄 csl_vfochwsetup.c
字号:
/** @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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -