gr-baz Package
rtl2832-tuner_fc0013.h
Go to the documentation of this file.
1 #ifndef __TUNER_FC0013_H
2 #define __TUNER_FC0013_H
3 
4 #include "rtl2832.h"
5 
6 namespace RTL2832_NAMESPACE
7 {
8 namespace TUNERS_NAMESPACE
9 {
10 
12 {
14 public:
15  fc0013(demod* p);
16 public:
17  inline virtual const char* name() const
18  { return "Fitipower FC0013"; }
19 public:
20  int initialise(tuner::PPARAMS params = NULL);
21  int set_frequency(double freq);
22  int set_bandwidth(double bw);
23  int set_gain(double gain);
24 };
25 
26 }
27 }
28 
29 /**
30 @file
31 
32 @brief FC0013 tuner module declaration
33 
34 One can manipulate FC0013 tuner through FC0013 module.
35 FC0013 module is derived from tuner module.
36 
37 // The following context is implemented for FC0013 source code.
38 **/
39 
40 // Definitions
42 {
45 };
46 
48 {
51 };
52 
54 {
57 };
58 /*
59 // Functions
60 int FC0013_Read(RTL2832_NAMESPACE::tuner* pTuner, unsigned char RegAddr, unsigned char *pByte);
61 int FC0013_Write(RTL2832_NAMESPACE::tuner* pTuner, unsigned char RegAddr, unsigned char Byte);
62 
63 int
64 fc0013_SetRegMaskBits(
65  RTL2832_NAMESPACE::tuner* pTuner,
66  unsigned char RegAddr,
67  unsigned char Msb,
68  unsigned char Lsb,
69  const unsigned char WritingValue
70  );
71 
72 int
73 fc0013_GetRegMaskBits(
74  RTL2832_NAMESPACE::tuner* pTuner,
75  unsigned char RegAddr,
76  unsigned char Msb,
77  unsigned char Lsb,
78  unsigned char *pReadingValue
79  );
80 */
82 int FC0013_SetFrequency(RTL2832_NAMESPACE::tuner* pTuner, unsigned long Frequency, unsigned short Bandwidth);
83 
84 // Set VHF Track depends on input frequency
85 int FC0013_SetVhfTrack(RTL2832_NAMESPACE::tuner* pTuner, unsigned long Frequency);
86 
87 // The following context is FC0013 tuner API source code
88 
89 // Definitions
90 
91 // Bandwidth mode
93 {
97 };
98 
99 // Default for initialing
100 #define FC0013_RF_FREQ_HZ_DEFAULT 50000000
101 #define FC0013_BANDWIDTH_MODE_DEFAULT FC0013_BANDWIDTH_8000000HZ
102 
103 // Tuner LNA
105 {
106  FC0013_LNA_GAIN_LOW = 0x00, // -6.3dB
107  FC0013_LNA_GAIN_MIDDLE = 0x08, // 7.1dB
108  FC0013_LNA_GAIN_HIGH_17 = 0x11, // 19.1dB
109  FC0013_LNA_GAIN_HIGH_19 = 0x10, // 19.7dB
110 };
111 
112 // Manipulaing functions
113 void
115  RTL2832_NAMESPACE::tuner* pTuner,
116  int *pTunerType
117  );
118 
119 void
121  RTL2832_NAMESPACE::tuner* pTuner,
122  unsigned char *pDeviceAddr
123  );
124 
125 int
128  );
129 
130 int
132  RTL2832_NAMESPACE::tuner* pTuner,
133  unsigned long RfFreqHz
134  );
135 
136 int
138  RTL2832_NAMESPACE::tuner* pTuner,
139  unsigned long *pRfFreqHz
140  );
141 
142 // Extra manipulaing functions
143 int
145  RTL2832_NAMESPACE::tuner* pTuner,
146  int BandwidthMode
147  );
148 
149 int
151  RTL2832_NAMESPACE::tuner* pTuner,
152  int *pBandwidthMode
153  );
154 
155 int
158  );
159 
160 int
162  RTL2832_NAMESPACE::tuner* pTuner,
163  int RcValue
164  );
165 
166 #endif
Definition: rtl2832-tuner_fc0013.h:94
Definition: rtl2832-tuner_fc0013.h:106
Definition: rtl2832-tuner_fc0013.h:56
const tuner::PARAMS & params() const
Definition: rtl2832.h:253
FC0013_I2C_STATUS
Definition: rtl2832-tuner_fc0013.h:47
Definition: rtl2832.h:144
int fc0013_Initialize(RTL2832_NAMESPACE::tuner *pTuner)
int FC0013_SetFrequency(RTL2832_NAMESPACE::tuner *pTuner, unsigned long Frequency, unsigned short Bandwidth)
Definition: rtl2832-tuner_fc0013.h:108
Definition: rtl2832-tuner_fc0013.h:49
int FC0013_SetVhfTrack(RTL2832_NAMESPACE::tuner *pTuner, unsigned long Frequency)
#define IMPLEMENT_INLINE_TUNER_FACTORY(class_name)
Definition: rtl2832.h:77
int fc0013_RcCalReset(RTL2832_NAMESPACE::tuner *pTuner)
int initialise(tuner::PPARAMS params=NULL)
Definition: rtl2832-tuner_fc0013.h:95
Definition: rtl2832.h:309
void fc0013_GetDeviceAddr(RTL2832_NAMESPACE::tuner *pTuner, unsigned char *pDeviceAddr)
Definition: rtl2832.h:186
int fc0013_GetBandwidthMode(RTL2832_NAMESPACE::tuner *pTuner, int *pBandwidthMode)
Definition: rtl2832-tuner_fc0013.h:107
Definition: rtl2832.h:137
FC0013_LNA_GAIN_VALUE
Definition: rtl2832-tuner_fc0013.h:104
#define TUNERS_NAMESPACE
Definition: rtl2832.h:66
int fc0013_SetRfFreqHz(RTL2832_NAMESPACE::tuner *pTuner, unsigned long RfFreqHz)
Definition: rtl2832-tuner_fc0013.h:96
FC0013_TRUE_FALSE_STATUS
Definition: rtl2832-tuner_fc0013.h:41
FC0013_FUNCTION_STATUS
Definition: rtl2832-tuner_fc0013.h:53
virtual double gain() const
Definition: rtl2832.h:228
Definition: rtl2832-tuner_fc0013.h:55
Definition: rtl2832-tuner_fc0013.h:44
Definition: rtl2832-tuner_fc0013.h:11
int fc0013_GetRfFreqHz(RTL2832_NAMESPACE::tuner *pTuner, unsigned long *pRfFreqHz)
int fc0013_SetBandwidthMode(RTL2832_NAMESPACE::tuner *pTuner, int BandwidthMode)
Definition: rtl2832-tuner_fc0013.h:109
Definition: rtl2832-tuner_fc0013.h:50
int FC0013_Open(RTL2832_NAMESPACE::tuner *pTuner)
Definition: rtl2832-tuner_fc0013.h:43
int fc0013_RcCalAdd(RTL2832_NAMESPACE::tuner *pTuner, int RcValue)
FC0013_BANDWIDTH_MODE
Definition: rtl2832-tuner_fc0013.h:92
Definition: rtl2832-tuner_e4000.h:6
virtual const char * name() const
Definition: rtl2832-tuner_fc0013.h:17
void fc0013_GetTunerType(RTL2832_NAMESPACE::tuner *pTuner, int *pTunerType)