4 #define R820T_I2C_ADDR 0x34
5 #define R820T_CHECK_ADDR 0x00
6 #define R820T_CHECK_VAL 0x69
8 #define R820T_IF_FREQ 3570000
10 //***************************************************************
12 //***************************************************************
13 #define VERSION "R820T_v1.49_ASTRO"
16 #define USE_16M_XTAL FALSE
17 #define R828_Xtal 28800
19 #define USE_DIPLEXER FALSE
20 #define TUNER_CLK_OUT TRUE
24 typedef unsigned char UINT8;
25 typedef unsigned short UINT16;
26 typedef unsigned int UINT32;
32 #define FUNCTION_SUCCESS 0
33 #define FUNCTION_ERROR -1
35 typedef enum _R828_ErrCode
41 typedef enum _Rafael_Chip_Type //Don't modify chip list
51 //----------------------------------------------------------//
53 //----------------------------------------------------------//
55 extern UINT8 R828_ADDRESS;
57 #define DIP_FREQ 320000
59 #define VCO_pwr_ref 0x02
61 extern UINT32 R828_IF_khz;
62 extern UINT32 R828_CAL_LO_khz;
63 extern UINT8 R828_IMR_point_num;
64 extern UINT8 R828_IMR_done_flag;
65 extern UINT8 Rafael_Chip;
67 typedef enum _R828_Standard_Type //Don't remove standand list!!
73 PAL_BGH_8M, //for PAL B/G, PAL G/H
75 SECAM_L1_INV, //for SECAM L'
97 extern UINT8 R828_Fil_Cal_flag[STD_SIZE];
99 typedef enum _R828_SetFreq_Type
105 typedef enum _R828_LoopThrough_Type
109 }R828_LoopThrough_Type;
112 typedef enum _R828_InputMode_Type
117 }R828_InputMode_Type;
119 typedef enum _R828_IfAgc_Type
125 typedef enum _R828_GPIO_Type
131 typedef struct _R828_Set_Info
135 R828_Standard_Type R828_Standard;
136 R828_LoopThrough_Type RT_Input;
137 R828_InputMode_Type RT_InputMode;
138 R828_IfAgc_Type R828_IfAgc_Select;
141 typedef struct _R828_RF_Gain_Info
148 typedef enum _R828_RF_Gain_TYPE
154 typedef struct _R828_I2C_LEN_TYPE
161 typedef struct _R828_I2C_TYPE
166 //----------------------------------------------------------//
168 //----------------------------------------------------------//
169 R828_ErrCode R828_Init(void *pTuner);
170 R828_ErrCode R828_Standby(void *pTuner, R828_LoopThrough_Type R828_LoopSwitch);
171 R828_ErrCode R828_GPIO(void *pTuner, R828_GPIO_Type R828_GPIO_Conrl);
172 R828_ErrCode R828_SetStandard(void *pTuner, R828_Standard_Type RT_Standard);
173 R828_ErrCode R828_SetFrequency(void *pTuner, R828_Set_Info R828_INFO, R828_SetFreq_Type R828_SetFreqMode);
174 R828_ErrCode R828_GetRfGain(void *pTuner, R828_RF_Gain_Info *pR828_rf_gain);
175 R828_ErrCode R828_SetRfGain(void *pTuner, int gain);
176 R828_ErrCode R828_RfGainMode(void *pTuner, int manual);
181 unsigned long RfFreqHz
185 r820t_SetStandardMode(
196 #endif /* _R820T_TUNER_H */