📄 csl_ccdchwcontrol.c
字号:
/** @file csl_ccdcHwControl.c
*
* @brief File for functional layer of CSL API @a CSL_ccdcHwControl()
*
* Description
* - The @a CSL_ccdcHwControl() function definition & it's associated
* functions
*
* Modification 1
* - Modified on: 10/21/2004
* - Reason: created the sources
*
* @date 21st Oct, 2004
* @author Santosh Narayanan.
*/
#include <csl_ccdc.h>
#include <csl_ccdc_aux.h>
#pragma CODE_SECTION (CSL_ccdcHwControl, ".text:csl_section:ccdc");
/** @brief Takes a command with an optional argument & implements it.
*/
CSL_Status CSL_ccdcHwControl(
/** Pointer to the object that holds reference to the
* instance of CCDC requested after the call
*/
CSL_CcdcHandle hCcdc,
/** The command to this API indicates the action to be taken
*/
CSL_CcdcHwControlCmd cmd,
/** An optional argument @a void* casted
*/
void *arg
)
{
CSL_Status status = CSL_SOK;
switch(cmd)
{
case CSL_CCDC_CMD_ENABLE:
status = CSL_ccdcEnable(hCcdc, *(Uint16*)arg);
break;
case CSL_CCDC_CMD_SET_MODE:
status = CSL_ccdcSetMode(hCcdc, (CSL_CcdcMode*)arg);
break;
case CSL_CCDC_CMD_VD_HD_ENABLE:
status = CSL_ccdcVdHdEn(hCcdc, *(Uint16*)arg);
break;
case CSL_CCDC_CMD_FMT_ENABLE:
status = CSL_ccdcFmtEn(hCcdc, *(Uint16*)arg);
break;
case CSL_CCDC_CMD_SET_FMT_VP_IN_SIZE:
status = CSL_ccdcSetFmtVpIn(hCcdc, (CSL_CcdcFmtVpInConfig*)arg);
break;
case CSL_CCDC_CMD_SET_VP_OUT_SIZE:
status = CSL_ccdcSetVpOut(hCcdc, (CSL_CcdcVpOutConfig*)arg);
break;
case CSL_CCDC_CMD_VP_ENABLE:
status = CSL_ccdcVpEn(hCcdc, *(Uint16*)arg);
break;
case CSL_CCDC_CMD_VP2SDR_ENABLE:
status = CSL_ccdcVp2SdrEn(hCcdc, *(Uint16*)arg);
break;
case CSL_CCDC_CMD_SDRAM_OUTPUT_ENABLE:
status = CSL_ccdcSdramOutEn(hCcdc, *(Uint16*)arg);
break;
case CSL_CCDC_CMD_SET_SDRAM_ADDR:
status = CSL_ccdcSetSdrAddr(hCcdc, (Uint32*)arg);
break;
case CSL_CCDC_CMD_SET_SDRAM_OFFSET:
status = CSL_ccdcSetSdrOffset(hCcdc, *(Uint16*)arg);
break;
case CSL_CCDC_CMD_SET_SDRAM_OUT_SIZE:
status = CSL_ccdcSetSdrOutSize(hCcdc, (CSL_CcdcSdrOutSizeConfig*)arg);
break;
case CSL_CCDC_CMD_SET_PIX_LINES:
status = CSL_ccdcSetPixLines(hCcdc, (CSL_CcdcPixLinesConfig*)arg);
break;
case CSL_CCDC_CMD_SET_SYNC_MODE:
status = CSL_ccdcSetSyncMode(hCcdc, (CSL_CcdcSyncModeConfig*)arg);
break;
case CSL_CCDC_CMD_SET_CULLING_CONTROL:
status = CSL_ccdcSetCullControl(hCcdc, (CSL_CcdcCullingControl*)arg);
break;
case CSL_CCDC_CMD_OPT_BLACK_CLAMP_ENABLE:
status = CSL_ccdcOptBlackClampEn(hCcdc, *(Uint16*)arg);
break;
case CSL_CCDC_CMD_SET_OPT_BLACK_CLAMP:
status = CSL_ccdcSetOptBlackClamp(hCcdc, (CSL_CcdcOptBlackClampConfig*)arg);
break;
case CSL_CCDC_CMD_SET_BLACK_COMP:
status = CSL_ccdcSetBlackCmp(hCcdc, (CSL_CcdcBlackCmpConfig*)arg);
break;
case CSL_CCDC_CMD_SET_FPC:
status = CSL_ccdcSetFPC(hCcdc, (CSL_CcdcFPCConfig*)arg);
break;
case CSL_CCDC_CMD_SET_VD_INT:
status = CSL_ccdcSetVdInt(hCcdc, (CSL_CcdcVdIntTiming*)arg);
break;
case CSL_CCDC_CMD_SET_ALAW_CONFIG:
status = CSL_ccdcSetAlaw(hCcdc, (CSL_CcdcALawConfig*)arg);
break;
case CSL_CCDC_CMD_REC656_ENABLE:
status = CSL_ccdcRec656En(hCcdc, *(Uint16*)arg);
break;
case CSL_CCDC_CMD_REC656_ECCFVH_ENABLE:
status = CSL_ccdcEccFvhEn(hCcdc, *(Uint16*)arg);
break;
default:
status = CSL_ESYS_INVCMD ;
break;
};
return status;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -