本文整理汇总了C++中DVBT_DEMOD_MODULE::GetRegBitsWithPage方法的典型用法代码示例。如果您正苦于以下问题:C++ DVBT_DEMOD_MODULE::GetRegBitsWithPage方法的具体用法?C++ DVBT_DEMOD_MODULE::GetRegBitsWithPage怎么用?C++ DVBT_DEMOD_MODULE::GetRegBitsWithPage使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DVBT_DEMOD_MODULE
的用法示例。
在下文中一共展示了DVBT_DEMOD_MODULE::GetRegBitsWithPage方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
/**
@see DVBT_NIM_FP_GET_RF_POWER_LEVEL_DBM
*/
s32 rtl2832_tda18272_GetRfPowerLevelDbm(DVBT_NIM_MODULE *pNim, s64 *pRfPowerLevelDbm)
{
DVBT_DEMOD_MODULE *pDemod;
u64 FsmStage;
s64 IfAgc;
// Get demod module.
pDemod = pNim->pDemod;
// Get FSM stage and IF AGC value.
if(pDemod->GetRegBitsWithPage(pDemod, DVBT_FSM_STAGE, &FsmStage) != FUNCTION_SUCCESS)
goto error_status_get_registers;
if(pDemod->GetIfAgc(pDemod, &IfAgc) != FUNCTION_SUCCESS)
goto error_status_get_registers;
// Determine signal strength according to FSM stage and IF AGC value.
if(FsmStage < 10)
*pRfPowerLevelDbm = -120;
else
{
if(IfAgc > -1250)
*pRfPowerLevelDbm = -71 - (IfAgc / 165);
else
*pRfPowerLevelDbm = -60;
}
return FUNCTION_SUCCESS;
error_status_get_registers:
return FUNCTION_ERROR;
}
示例2:
// Additional definition for mt_control.c
UData_t
demod_get_pd(
handle_t demod_handle,
uint16_t *pd_value
)
{
DVBT_DEMOD_MODULE *pDemod;
unsigned long RssiR;
// Get demod module.
pDemod = (DVBT_DEMOD_MODULE *)demod_handle;
// Get RSSI_R value.
if(pDemod->GetRegBitsWithPage(pDemod, DVBT_RSSI_R, &RssiR) != FUNCTION_SUCCESS)
goto error_status_get_registers;
// Set pd_value according to RSSI_R.
*pd_value = (uint16_t)RssiR;
return MT_OK;
error_status_get_registers:
return MT_COMM_ERR;
}
示例3: BinToSignedInt
UData_t
demod_set_bbagclim(
handle_t demod_handle,
int on_off_status
)
{
DVBT_DEMOD_MODULE *pDemod;
unsigned long IfAgcMinBinary;
long IfAgcMinInt;
// Get demod module.
pDemod = (DVBT_DEMOD_MODULE *)demod_handle;
// Get IF_AGC_MIN binary value.
if(pDemod->GetRegBitsWithPage(pDemod, DVBT_IF_AGC_MIN, &IfAgcMinBinary) != FUNCTION_SUCCESS)
goto error_status_get_registers;
// Convert IF_AGC_MIN binary value to integer.
IfAgcMinInt = BinToSignedInt(IfAgcMinBinary, RTL2832_MT2266_IF_AGC_MIN_BIT_NUM);
// Modify IF_AGC_MIN integer according to on_off_status.
switch(on_off_status)
{
case 1:
IfAgcMinInt += RTL2832_MT2266_IF_AGC_MIN_INT_STEP;
if(IfAgcMinInt > RTL2832_MT2266_IF_AGC_MIN_INT_MAX)
IfAgcMinInt = RTL2832_MT2266_IF_AGC_MIN_INT_MAX;
break;
default:
case 0:
IfAgcMinInt -= RTL2832_MT2266_IF_AGC_MIN_INT_STEP;
if(IfAgcMinInt < RTL2832_MT2266_IF_AGC_MIN_INT_MIN)
IfAgcMinInt = RTL2832_MT2266_IF_AGC_MIN_INT_MIN;
break;
}
// Convert modified IF_AGC_MIN integer to binary value.
IfAgcMinBinary = SignedIntToBin(IfAgcMinInt, RTL2832_MT2266_IF_AGC_MIN_BIT_NUM);
// Set IF_AGC_MIN with modified binary value.
if(pDemod->SetRegBitsWithPage(pDemod, DVBT_IF_AGC_MIN, IfAgcMinBinary) != FUNCTION_SUCCESS)
goto error_status_set_registers;
return MT_OK;
error_status_set_registers:
error_status_get_registers:
return MT_COMM_ERR;
}
示例4:
/**
@brief Get tuner RSSI value when calibration is on.
One can use rtl2832_fc0013_GetTunerRssiCalOn() to get tuner calibration-on RSSI value.
@param [in] pNim The NIM module pointer
@retval FUNCTION_SUCCESS Get tuner calibration-on RSSI value successfully.
@retval FUNCTION_ERROR Get tuner calibration-on RSSI value unsuccessfully.
*/
int
rtl2832_fc0013_GetTunerRssiCalOn(
DVBT_NIM_MODULE *pNim
)
{
TUNER_MODULE *pTuner;
DVBT_DEMOD_MODULE *pDemod;
FC0013_EXTRA_MODULE *pTunerExtra;
RTL2832_FC0013_EXTRA_MODULE *pNimExtra;
BASE_INTERFACE_MODULE *pBaseInterface;
// Get tuner module and demod module.
pTuner = pNim->pTuner;
pDemod = pNim->pDemod;
// Get tuner extra module.
pTunerExtra = &(pTuner->Extra.Fc0013);
// Get NIM extra module.
pNimExtra = &(pNim->Extra.Rtl2832Fc0013);
// Get NIM base interface.
pBaseInterface = pNim->pBaseInterface;
// Set tuner EN_CAL_RSSI to 0x1.
if(fc0013_SetRegMaskBits(pTuner, 0x9, 4, 4, 0x1) != FC0013_I2C_SUCCESS)
goto error_status_set_registers;
// Set tuner LNA_POWER_DOWN to 0x1.
if(fc0013_SetRegMaskBits(pTuner, 0x6, 0, 0, 0x1) != FC0013_I2C_SUCCESS)
goto error_status_set_registers;
// Wait 100 ms.
pBaseInterface->WaitMs(pBaseInterface, 100);
// Get demod RSSI_R when tuner RSSI calibration is on.
if(pDemod->GetRegBitsWithPage(pDemod, DVBT_RSSI_R, &(pNimExtra->RssiRCalOn)) != FUNCTION_SUCCESS)
goto error_status_get_registers;
// Set tuner EN_CAL_RSSI to 0x0.
if(fc0013_SetRegMaskBits(pTuner, 0x9, 4, 4, 0x0) != FC0013_I2C_SUCCESS)
goto error_status_set_registers;
// Set tuner LNA_POWER_DOWN to 0x0.
if(fc0013_SetRegMaskBits(pTuner, 0x6, 0, 0, 0x0) != FC0013_I2C_SUCCESS)
goto error_status_set_registers;
return FUNCTION_SUCCESS;
error_status_get_registers:
error_status_set_registers:
return FUNCTION_ERROR;
}
开发者ID:BalintBanyasz,项目名称:DVB-Realtek-RTL2832U-2.2.2-10tuner-mod_kernel-3.0.0,代码行数:73,代码来源:nim_rtl2832_fc0013.c
示例5: if
/**
@brief Update tuner LNA_GAIN with RSSI.
One can use rtl2832_fc0013_UpdateTunerLnaGainWithRssi() to update tuner LNA_GAIN with RSSI.
@param [in] pNim The NIM module pointer
@retval FUNCTION_SUCCESS Update tuner LNA_GAIN with RSSI successfully.
@retval FUNCTION_ERROR Update tuner LNA_GAIN with RSSI unsuccessfully.
*/
int
rtl2832_fc0013_UpdateTunerLnaGainWithRssi(
DVBT_NIM_MODULE *pNim
)
{
TUNER_MODULE *pTuner;
DVBT_DEMOD_MODULE *pDemod;
FC0013_EXTRA_MODULE *pTunerExtra;
RTL2832_FC0013_EXTRA_MODULE *pNimExtra;
unsigned long RssiRCalOff;
long RssiRDiff;
unsigned char LnaGain;
unsigned char ReadValue;
// added from Fitipower, 2011-2-23, v0.8
int boolVhfFlag; // 0:false, 1:true
int boolEnInChgFlag; // 0:false, 1:true
int intGainShift;
// Get tuner module and demod module.
pTuner = pNim->pTuner;
pDemod = pNim->pDemod;
// Get tuner extra module.
pTunerExtra = &(pTuner->Extra.Fc0013);
// Get NIM extra module.
pNimExtra = &(pNim->Extra.Rtl2832Fc0013);
// Get demod RSSI_R when tuner RSSI calibration in off.
// Note: Tuner EN_CAL_RSSI and LNA_POWER_DOWN are set to 0x0 after rtl2832_fc0013_GetTunerRssiCalOn() executing.
if(pDemod->GetRegBitsWithPage(pDemod, DVBT_RSSI_R, &RssiRCalOff) != FUNCTION_SUCCESS)
goto error_status_get_registers;
// To avoid the wrong rssi calibration value in the environment with strong RF pulse signal.
if(RssiRCalOff < pNimExtra->RssiRCalOn)
pNimExtra->RssiRCalOn = RssiRCalOff;
// Calculate RSSI_R difference.
RssiRDiff = RssiRCalOff - pNimExtra->RssiRCalOn;
// Get tuner LNA_GAIN.
if(fc0013_GetRegMaskBits(pTuner, 0x14, 4, 0, &LnaGain) != FC0013_I2C_SUCCESS)
goto error_status_get_registers;
// Determine next LNA_GAIN according to RSSI_R difference and current LNA_GAIN.
switch(LnaGain)
{
default:
boolVhfFlag = 0;
boolEnInChgFlag = 1;
intGainShift = 10;
LnaGain = FC0013_LNA_GAIN_HIGH_19;
// Set tuner LNA_GAIN.
if(fc0013_SetRegMaskBits(pTuner, 0x14, 4, 0, LnaGain) != FC0013_I2C_SUCCESS)
goto error_status_set_registers;
break;
case FC0013_LNA_GAIN_HIGH_19:
if(RssiRDiff >= 10)
{
boolVhfFlag = 1;
boolEnInChgFlag = 0;
intGainShift = 10;
LnaGain = FC0013_LNA_GAIN_HIGH_17;
// Set tuner LNA_GAIN.
if(fc0013_SetRegMaskBits(pTuner, 0x14, 4, 0, LnaGain) != FC0013_I2C_SUCCESS)
goto error_status_set_registers;
break;
}
else
{
goto success_status_Lna_Gain_No_Change;
//.........这里部分代码省略.........
开发者ID:BalintBanyasz,项目名称:DVB-Realtek-RTL2832U-2.2.2-10tuner-mod_kernel-3.0.0,代码行数:101,代码来源:nim_rtl2832_fc0013.c