MxL_ERR_MSG MxL_Get_Register(void * DevHandle,MxL5007_TunerConfigS* myTuner, UINT8 RegAddr, UINT8 *RegData) { if(MxL_I2C_Read(DevHandle,(UINT8)myTuner->I2C_Addr, RegAddr, RegData)) return MxL_ERR_GET_REG; return MxL_OK; }
MxL_ERR_MSG MxL_Get_Register(MxL5007_TunerConfigS* myTuner, UINT8 RegAddr, UINT8 *RegData) { // if(MxL_I2C_Read((UINT8)myTuner->I2C_Addr, RegAddr, RegData)) if(MxL_I2C_Read(myTuner, RegAddr, RegData)) return MxL_ERR_GET_REG; return MxL_OK; }
MxL_ERR_MSG MxL_REFSynth_Lock_Status(MxL5007_TunerConfigS *myTuner, uint8 *isLock) { uint8 Data; *isLock = 0; if(MxL_I2C_Read((uint8)myTuner->I2C_Addr, 0xD8, &Data)) return MxL_ERR_OTHERS; Data &= 0x03; if (Data == 0x03) *isLock = 1; //REF Synthesizer is Lock return MxL_OK; }
MxL_ERR_MSG MxL_REFSynth_Lock_Status(void * DevHandle,MxL5007_TunerConfigS* myTuner, BOOL* isLock) { UINT8 Data; *isLock = FALSE; if(MxL_I2C_Read(DevHandle,(UINT8)myTuner->I2C_Addr, 0xD8, &Data)) return MxL_ERR_OTHERS; Data &= 0x03; if (Data == 0x03) *isLock = TRUE; //REF Synthesizer is Lock return MxL_OK; }
MxL_ERR_MSG MxL_RFSynth_Lock_Status(MxL5007_TunerConfigS* myTuner, BOOL* isLock) { UINT8 Data; *isLock = MxL_FALSE; // if(MxL_I2C_Read((UINT8)myTuner->I2C_Addr, 0xD8, &Data)) if(MxL_I2C_Read(myTuner, 0xD8, &Data)) return MxL_ERR_OTHERS; Data &= 0x0C; if (Data == 0x0C) *isLock = MxL_TRUE; //RF Synthesizer is Lock return MxL_OK; }
MxL5007_ChipVersion MxL_Check_ChipVersion(MxL5007_TunerConfigS *myTuner) { uint8 Data; if(MxL_I2C_Read((uint8)myTuner->I2C_Addr, 0xD3, &Data)) return MxL_GET_ID_FAIL; switch(Data) { case 0x41: return MxL_5007T_V4; break; default: return MxL_UNKNOWN_ID; } }
MxL5007_ChipVersion MxL_Check_ChipVersion(void * DevHandle,MxL5007_TunerConfigS* myTuner) { UINT8 Data; if(MxL_I2C_Read(DevHandle,(UINT8)myTuner->I2C_Addr, 0xD9, &Data)) return MxL_GET_ID_FAIL; switch(Data) { case 0x14: return MxL_5007T_V4; break; default: return MxL_UNKNOWN_ID; } }
MxL_ERR_MSG MxL_Get_Register(MxL5007_TunerConfigS *myTuner, uint8 RegAddr, uint8 *RegData) { if(MxL_I2C_Read((uint8)myTuner->I2C_Addr, RegAddr, RegData)) return MxL_ERR_GET_REG; return MxL_OK; }