예제 #1
0
Dword Demodulator_readRegister (
    IN  Demodulator*    demodulator,
    IN  Processor       processor,
    IN  Dword           registerAddress,
    OUT Byte*           value
) {
    return (Standard_readRegister (demodulator, processor, registerAddress, value));
}
예제 #2
0
파일: tuner.c 프로젝트: chinjianji/it9507
Dword OMEGA_supportLNA (
    IN  Demodulator*    demodulator,
    IN  Byte            supporttype
 ) {
     Dword error = Error_INVALID_DEV_TYPE;
     Byte chip_version = 0;
	 Dword chip_Type;
	 Byte var[2];
	
	error = Standard_readRegister(demodulator, Processor_LINK, chip_version_7_0, &chip_version);
	if (error) goto exit;
	error = Standard_readRegisters(demodulator, Processor_LINK, chip_version_7_0+1, 2, var);
	if (error) goto exit;
	chip_Type = var[1]<<8 | var[0];	

    error = Error_INVALID_DEV_TYPE;
	if(chip_Type==0x9135 && chip_version == 2){	
		switch (supporttype){
			case OMEGA_NORMAL:			
				tunerDescription.tunerScriptTable = V2_OMEGA_scripts;
				tunerDescription.tunerScriptSetsTable = V2_OMEGA_scriptSets;
                tunerDescription.tunerId = 0x60;				
				error = Error_NO_ERROR;
				break;
			case OMEGA_LNA_Config_1:
				tunerDescription.tunerScriptTable = V2_OMEGA_LNA_Config_1_scripts;
				tunerDescription.tunerScriptSetsTable = V2_OMEGA_LNA_Config_1_scriptSets;
				tunerDescription.tunerId = 0x61;
				error = Error_NO_ERROR;
				break;
			case OMEGA_LNA_Config_2:
				tunerDescription.tunerScriptTable = V2_OMEGA_LNA_Config_2_scripts;
				tunerDescription.tunerScriptSetsTable = V2_OMEGA_LNA_Config_2_scriptSets;
				tunerDescription.tunerId = 0x62;
				error = Error_NO_ERROR;
				break;				
			case OMEGA_LNA_Config_3:
				tunerDescription.tunerScriptTable = V2_OMEGA_LNA_Config_3_scripts;
				tunerDescription.tunerScriptSetsTable = V2_OMEGA_LNA_Config_3_scriptSets;
				tunerDescription.tunerId = 0x63;
				error = Error_NO_ERROR;
				break;
			default:				
		        break;
	   }
	}else{
		switch (supporttype){
			case OMEGA_NORMAL:			
				tunerDescription.tunerScriptTable = OMEGA_scripts;
				tunerDescription.tunerScriptSetsTable = OMEGA_scriptSets;
				tunerDescription.tunerId = 0x38;
				error = Error_NO_ERROR;
				break;
			case OMEGA_LNA_Config_1:
				tunerDescription.tunerScriptTable = OMEGA_LNA_Config_1_scripts;
				tunerDescription.tunerScriptSetsTable = OMEGA_LNA_Config_1_scriptSets;
				tunerDescription.tunerId = 0x51;
				error = Error_NO_ERROR;
				break;
			case OMEGA_LNA_Config_2:
				tunerDescription.tunerScriptTable = OMEGA_LNA_Config_2_scripts;
				tunerDescription.tunerScriptSetsTable = OMEGA_LNA_Config_2_scriptSets;
				tunerDescription.tunerId = 0x52;
				error = Error_NO_ERROR;
				break;
			default:
				
				break;

		 }
	}
exit:
    return (error); 	
}