本文整理汇总了C++中DVBT_DEMOD_MODULE::UpdateFunction方法的典型用法代码示例。如果您正苦于以下问题:C++ DVBT_DEMOD_MODULE::UpdateFunction方法的具体用法?C++ DVBT_DEMOD_MODULE::UpdateFunction怎么用?C++ DVBT_DEMOD_MODULE::UpdateFunction使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DVBT_DEMOD_MODULE
的用法示例。
在下文中一共展示了DVBT_DEMOD_MODULE::UpdateFunction方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
/**
@see DVBT_NIM_FP_UPDATE_FUNCTION
*/
int
rtl2832_fc0013_UpdateFunction(
DVBT_NIM_MODULE *pNim
)
{
DVBT_DEMOD_MODULE *pDemod;
RTL2832_FC0013_EXTRA_MODULE *pNimExtra;
// Get demod module.
pDemod = pNim->pDemod;
// Get NIM extra module.
pNimExtra = &(pNim->Extra.Rtl2832Fc0013);
// Update demod particular registers.
if(pDemod->UpdateFunction(pDemod) != FUNCTION_SUCCESS)
goto error_status_execute_function;
// Increase tuner LNA_GAIN update waiting time.
pNimExtra->LnaUpdateWaitTime += 1;
// Check if need to update tuner LNA_GAIN according to update waiting time.
if(pNimExtra->LnaUpdateWaitTime == pNimExtra->LnaUpdateWaitTimeMax)
{
// Reset update waiting time.
pNimExtra->LnaUpdateWaitTime = 0;
// Enable demod DVBT_IIC_REPEAT.
if(pDemod->SetRegBitsWithPage(pDemod, DVBT_IIC_REPEAT, 0x1) != FUNCTION_SUCCESS)
goto error_status_set_registers;
// Update tuner LNA gain with RSSI.
if(rtl2832_fc0013_UpdateTunerLnaGainWithRssi(pNim) != FUNCTION_SUCCESS)
goto error_status_execute_function;
// Disable demod DVBT_IIC_REPEAT.
if(pDemod->SetRegBitsWithPage(pDemod, DVBT_IIC_REPEAT, 0x0) != FUNCTION_SUCCESS)
goto error_status_set_registers;
}
return FUNCTION_SUCCESS;
error_status_set_registers:
error_status_execute_function:
return FUNCTION_ERROR;
}
开发者ID:BalintBanyasz,项目名称:DVB-Realtek-RTL2832U-2.2.2-10tuner-mod_kernel-3.0.0,代码行数:57,代码来源:nim_rtl2832_fc0013.c
示例2:
/**
@see DVBT_NIM_FP_UPDATE_FUNCTION
*/
s32
dvbt_nim_default_UpdateFunction(
DVBT_NIM_MODULE *pNim
)
{
DVBT_DEMOD_MODULE *pDemod;
// Get demod module.
pDemod = pNim->pDemod;
// Update demod particular registers.
if(pDemod->UpdateFunction(pDemod) != FUNCTION_SUCCESS)
goto error_status_execute_function;
return FUNCTION_SUCCESS;
error_status_execute_function:
return FUNCTION_ERROR;
}
示例3:
/**
@see DVBT_NIM_FP_UPDATE_FUNCTION
*/
int
rtl2832_mt2266_UpdateFunction(
DVBT_NIM_MODULE *pNim
)
{
TUNER_MODULE *pTuner;
DVBT_DEMOD_MODULE *pDemod;
MT2266_EXTRA_MODULE *pMt2266Extra;
RTL2832_MT2266_EXTRA_MODULE *pRtl2832Mt2266Extra;
Handle_t Mt2266Handle;
UData_t Status;
// Get tuner module and demod module.
pTuner = pNim->pTuner;
pDemod = pNim->pDemod;
// Get tuner extra module and tuner handle.
pMt2266Extra = (MT2266_EXTRA_MODULE *)pTuner->pExtra;
pMt2266Extra->GetHandle(pTuner, &Mt2266Handle);
// Get NIM extra module.
pRtl2832Mt2266Extra = (RTL2832_MT2266_EXTRA_MODULE *)pNim->pExtra;
// Update demod particular registers.
if(pDemod->UpdateFunction(pDemod) != FUNCTION_SUCCESS)
goto error_status_execute_function;
// Enable demod DVBT_IIC_REPEAT.
if(pDemod->SetRegBitsWithPage(pDemod, DVBT_IIC_REPEAT, 0x1) != FUNCTION_SUCCESS)
goto error_status_set_registers;
// Update demod and tuner register setting.
Status = demod_pdcontrol(
pDemod,
Mt2266Handle,
&pRtl2832Mt2266Extra->LnaConfig,
&pRtl2832Mt2266Extra->UhfSens,
&pRtl2832Mt2266Extra->AgcCurrentState,
(uint32_t *)&pRtl2832Mt2266Extra->LnaGainOld
);
if(MT_IS_ERROR(Status))
goto error_status_execute_function;
// Disable demod DVBT_IIC_REPEAT.
if(pDemod->SetRegBitsWithPage(pDemod, DVBT_IIC_REPEAT, 0x0) != FUNCTION_SUCCESS)
goto error_status_set_registers;
return FUNCTION_SUCCESS;
error_status_execute_function:
error_status_set_registers:
return FUNCTION_ERROR;
}
示例4:
/**
@see DVBT_NIM_FP_UPDATE_FUNCTION
*/
int
rtl2832_mt2266_UpdateFunction(
DVBT_NIM_MODULE *pNim
)
{
TUNER_MODULE *pTuner;
DVBT_DEMOD_MODULE *pDemod;
MT2266_EXTRA_MODULE *pTunerExtra;
RTL2832_MT2266_EXTRA_MODULE *pNimExtra;
Handle_t Mt2266Handle;
UData_t Status;
// Get tuner module and demod module.
pTuner = pNim->pTuner;
pDemod = pNim->pDemod;
// Get tuner extra module and tuner handle.
pTunerExtra = &(pTuner->Extra.Mt2266);
pTunerExtra->GetHandle(pTuner, &Mt2266Handle);
// Get NIM extra module.
pNimExtra = &(pNim->Extra.Rtl2832Mt2266);
// Update demod particular registers.
if(pDemod->UpdateFunction(pDemod) != FUNCTION_SUCCESS)
goto error_status_execute_function;
// Enable demod DVBT_IIC_REPEAT.
if(pDemod->SetRegBitsWithPage(pDemod, DVBT_IIC_REPEAT, 0x1) != FUNCTION_SUCCESS)
goto error_status_set_registers;
// Update demod and tuner register setting.
Status = demod_pdcontrol(
pDemod,
Mt2266Handle,
&pNimExtra->LnaConfig,
&pNimExtra->UhfSens,
&pNimExtra->AgcCurrentState,
&pNimExtra->LnaGainOld
);
/*
handle_t demod_handle,
handle_t tuner_handle,
unsigned char* lna_config,
unsigned char* uhf_sens,
unsigned char *agc_current_state,
unsigned long *lna_gain_old
unsigned char LnaConfig;
unsigned char UhfSens;
unsigned char AgcCurrentState;
unsigned long LnaGainOld;
*/
if(MT_IS_ERROR(Status))
goto error_status_execute_function;
// Disable demod DVBT_IIC_REPEAT.
if(pDemod->SetRegBitsWithPage(pDemod, DVBT_IIC_REPEAT, 0x0) != FUNCTION_SUCCESS)
goto error_status_set_registers;
return FUNCTION_SUCCESS;
error_status_execute_function:
error_status_set_registers:
return FUNCTION_ERROR;
}