rtl2832-tuner_e4000.h
rtl2832.h
rtl2832-tuner_e4000.h
rtl2832.h
libusb/libusb.h
map
stdarg.h
stdio.h
string
vector
RTL2832_NAMESPACE::TUNERS_NAMESPACE::e4000
RTL2832_NAMESPACE
RTL2832_NAMESPACE::TUNERS_NAMESPACE
E4000_1_SUCCESS
1
E4000_1_FAIL
0
E4000_I2C_SUCCESS
1
E4000_I2C_FAIL
0
RTL2832_E4000_ADDITIONAL_INIT_REG_TABLE_LEN
34
RTL2832_E4000_LNA_GAIN_TABLE_LEN
16
RTL2832_E4000_LNA_GAIN_ADD_TABLE_LEN
8
RTL2832_E4000_MIXER_GAIN_TABLE_LEN
2
RTL2832_E4000_IF_STAGE_1_GAIN_TABLE_LEN
2
RTL2832_E4000_IF_STAGE_2_GAIN_TABLE_LEN
4
RTL2832_E4000_IF_STAGE_3_GAIN_TABLE_LEN
4
RTL2832_E4000_IF_STAGE_4_GAIN_TABLE_LEN
4
RTL2832_E4000_IF_STAGE_5_GAIN_TABLE_LEN
8
RTL2832_E4000_IF_STAGE_6_GAIN_TABLE_LEN
8
RTL2832_E4000_LNA_GAIN_BAND_NUM
2
RTL2832_E4000_MIXER_GAIN_BAND_NUM
2
RTL2832_E4000_RF_BAND_BOUNDARY_HZ
300000000
RTL2832_E4000_LNA_GAIN_ADDR
0x14
RTL2832_E4000_LNA_GAIN_MASK
0xf
RTL2832_E4000_LNA_GAIN_SHIFT
0
RTL2832_E4000_LNA_GAIN_ADD_ADDR
0x24
RTL2832_E4000_LNA_GAIN_ADD_MASK
0x7
RTL2832_E4000_LNA_GAIN_ADD_SHIFT
0
RTL2832_E4000_MIXER_GAIN_ADDR
0x15
RTL2832_E4000_MIXER_GAIN_MASK
0x1
RTL2832_E4000_MIXER_GAIN_SHIFT
0
RTL2832_E4000_IF_STAGE_1_GAIN_ADDR
0x16
RTL2832_E4000_IF_STAGE_1_GAIN_MASK
0x1
RTL2832_E4000_IF_STAGE_1_GAIN_SHIFT
0
RTL2832_E4000_IF_STAGE_2_GAIN_ADDR
0x16
RTL2832_E4000_IF_STAGE_2_GAIN_MASK
0x6
RTL2832_E4000_IF_STAGE_2_GAIN_SHIFT
1
RTL2832_E4000_IF_STAGE_3_GAIN_ADDR
0x16
RTL2832_E4000_IF_STAGE_3_GAIN_MASK
0x18
RTL2832_E4000_IF_STAGE_3_GAIN_SHIFT
3
RTL2832_E4000_IF_STAGE_4_GAIN_ADDR
0x16
RTL2832_E4000_IF_STAGE_4_GAIN_MASK
0x60
RTL2832_E4000_IF_STAGE_4_GAIN_SHIFT
5
RTL2832_E4000_IF_STAGE_5_GAIN_ADDR
0x17
RTL2832_E4000_IF_STAGE_5_GAIN_MASK
0x7
RTL2832_E4000_IF_STAGE_5_GAIN_SHIFT
0
RTL2832_E4000_IF_STAGE_6_GAIN_ADDR
0x17
RTL2832_E4000_IF_STAGE_6_GAIN_MASK
0x38
RTL2832_E4000_IF_STAGE_6_GAIN_SHIFT
3
RTL2832_E4000_TUNER_OUTPUT_POWER_UNIT_0P1_DBM
-100
RTL2832_E4000_TUNER_MODE_UPDATE_WAIT_TIME_MS
1000
RTL2832_E4000_TUNER_GAIN_MODE
RTL2832_E4000_TUNER_GAIN_SENSITIVE
= RTL2832_NAMESPACE::tuner::DEFAULT
RTL2832_E4000_TUNER_GAIN_NORMAL
RTL2832_E4000_TUNER_GAIN_LINEAR
int int tunerreset (RTL2832_NAMESPACE::tuner *pTuner) tunerreset RTL2832_NAMESPACE::tuner * pTuner
int int Tunerclock (RTL2832_NAMESPACE::tuner *pTuner) Tunerclock RTL2832_NAMESPACE::tuner * pTuner
int int Qpeak (RTL2832_NAMESPACE::tuner *pTuner) Qpeak RTL2832_NAMESPACE::tuner * pTuner
int int DCoffloop (RTL2832_NAMESPACE::tuner *pTuner) DCoffloop RTL2832_NAMESPACE::tuner * pTuner
int int GainControlinit (RTL2832_NAMESPACE::tuner *pTuner) GainControlinit RTL2832_NAMESPACE::tuner * pTuner
int int Gainmanual (RTL2832_NAMESPACE::tuner *pTuner) Gainmanual RTL2832_NAMESPACE::tuner * pTuner
int int E4000_gain_freq (RTL2832_NAMESPACE::tuner *pTuner, int frequency) E4000_gain_freq RTL2832_NAMESPACE::tuner * pTuner int frequency
int int PLL (RTL2832_NAMESPACE::tuner *pTuner, int Ref_clk, int Freq) PLL RTL2832_NAMESPACE::tuner * pTuner int Ref_clk int Freq
int int LNAfilter (RTL2832_NAMESPACE::tuner *pTuner, int Freq) LNAfilter RTL2832_NAMESPACE::tuner * pTuner int Freq
int int IFfilter (RTL2832_NAMESPACE::tuner *pTuner, int bandwidth, int Ref_clk) IFfilter RTL2832_NAMESPACE::tuner * pTuner int bandwidth int Ref_clk
int int freqband (RTL2832_NAMESPACE::tuner *pTuner, int Freq) freqband RTL2832_NAMESPACE::tuner * pTuner int Freq
int int DCoffLUT (RTL2832_NAMESPACE::tuner *pTuner) DCoffLUT RTL2832_NAMESPACE::tuner * pTuner
int int GainControlauto (RTL2832_NAMESPACE::tuner *pTuner) GainControlauto RTL2832_NAMESPACE::tuner * pTuner
int int E4000_sensitivity (RTL2832_NAMESPACE::tuner *pTuner, int Freq, int bandwidth) E4000_sensitivity RTL2832_NAMESPACE::tuner * pTuner int Freq int bandwidth
int int E4000_linearity (RTL2832_NAMESPACE::tuner *pTuner, int Freq, int bandwidth) E4000_linearity RTL2832_NAMESPACE::tuner * pTuner int Freq int bandwidth
int int E4000_high_linearity (RTL2832_NAMESPACE::tuner *pTuner) E4000_high_linearity RTL2832_NAMESPACE::tuner * pTuner
int int E4000_nominal (RTL2832_NAMESPACE::tuner *pTuner, int Freq, int bandwidth) E4000_nominal RTL2832_NAMESPACE::tuner * pTuner int Freq int bandwidth
void void e4000_GetTunerType (RTL2832_NAMESPACE::tuner *pTuner, int *pTunerType) e4000_GetTunerType RTL2832_NAMESPACE::tuner * pTuner int * pTunerType
void void e4000_GetDeviceAddr (RTL2832_NAMESPACE::tuner *pTuner, unsigned char *pDeviceAddr) e4000_GetDeviceAddr RTL2832_NAMESPACE::tuner * pTuner unsigned char * pDeviceAddr
int int e4000_Initialize (RTL2832_NAMESPACE::tuner *pTuner, bool enable_dc_offset_loop=true, bool set_manual_gain=false) e4000_Initialize RTL2832_NAMESPACE::tuner * pTuner bool enable_dc_offset_loop true bool set_manual_gain false
int int e4000_SetRfFreqHz (RTL2832_NAMESPACE::tuner *pTuner, unsigned long RfFreqHz, bool update_gain_control=true, bool enable_dc_offset_lut=true) e4000_SetRfFreqHz RTL2832_NAMESPACE::tuner * pTuner unsigned long RfFreqHz bool update_gain_control true bool enable_dc_offset_lut true
int int e4000_GetRfFreqHz (RTL2832_NAMESPACE::tuner *pTuner, unsigned long *pRfFreqHz) e4000_GetRfFreqHz RTL2832_NAMESPACE::tuner * pTuner unsigned long * pRfFreqHz
int int e4000_GetRegByte (RTL2832_NAMESPACE::tuner *pTuner, unsigned char RegAddr, unsigned char *pReadingByte) e4000_GetRegByte RTL2832_NAMESPACE::tuner * pTuner unsigned char RegAddr unsigned char * pReadingByte
int int e4000_SetBandwidthHz (RTL2832_NAMESPACE::tuner *pTuner, unsigned long BandwidthHz) e4000_SetBandwidthHz RTL2832_NAMESPACE::tuner * pTuner unsigned long BandwidthHz
int int e4000_GetBandwidthHz (RTL2832_NAMESPACE::tuner *pTuner, unsigned long *pBandwidthHz) e4000_GetBandwidthHz RTL2832_NAMESPACE::tuner * pTuner unsigned long * pBandwidthHz

E4000 tuner module declaration One can manipulate E4000 tuner through E4000 module. E4000 module is derived from tuner module.

# Example:

    //Theexampleisthesameasthetunerexampleintuner_base.hexceptthelistedlines.

    #include"tuner_e4000.h"
    ...
    intmain(void)
    {
    TUNER_MODULE*pTuner;
    E4000_EXTRA_MODULE*pTunerExtra;

    TUNER_MODULETunerModuleMemory;
    BASE_INTERFACE_MODULEBaseInterfaceModuleMemory;
    //I2C_BRIDGE_MODULEI2cBridgeModuleMemory;

    unsignedlongBandwidthMode;

    ...

    //BuildE4000tunermodule.
    BuildE4000Module(
    &pTuner,
    &TunerModuleMemory,
    &BaseInterfaceModuleMemory,
    &I2cBridgeModuleMemory,
    0xac,//I2Cdeviceaddressis0xacin8-bitformat.
    CRYSTAL_FREQ_16384000HZ,//Crystalfrequencyis16.384MHz.
    E4000_AGC_INTERNAL//TheE4000AGCmodeisinternalAGCmode.
    );

    //GetE4000tunerextramodule.
    pTunerExtra=(T2266_EXTRA_MODULE*)(pTuner->pExtra);

    //====Initializetunerandsetitsparameters=====
    ...

    //SetE4000bandwidth.
    pTunerExtra->SetBandwidthMode(pTuner,E4000_BANDWIDTH_6MHZ);

    //====Gettunerinformation=====
    ...

    //GetE4000bandwidth.
    pTunerExtra->GetBandwidthMode(pTuner,&BandwidthMode);

    //Seetheexampleforothertunerfunctionsintuner_base.h

    return0;
    }