mirror of https://github.com/drowe67/librtlsdr.git
minor formatting
parent
3ef9ce972d
commit
38312eac03
|
@ -1,8 +1,8 @@
|
|||
#ifndef __TUNER_FC2580_H
|
||||
#define __TUNER_FC2580_H
|
||||
|
||||
#define BORDER_FREQ 2600000 //2.6GHz : The border frequency which determines whether Low VCO or High VCO is used
|
||||
#define USE_EXT_CLK 0 //0 : Use internal XTAL Oscillator / 1 : Use External Clock input
|
||||
#define BORDER_FREQ 2600000 /* 2.6GHz : The border frequency which determines whether Low VCO or High VCO is used */
|
||||
#define USE_EXT_CLK 0 /* 0 : Use internal XTAL Oscillator / 1 : Use External Clock input */
|
||||
#define OFS_RSSI 57
|
||||
|
||||
#define FC2580_I2C_ADDR 0xac
|
||||
|
|
|
@ -88,9 +88,7 @@ struct r82xx_priv {
|
|||
/* Store current mode */
|
||||
uint32_t delsys;
|
||||
enum r82xx_tuner_type type;
|
||||
|
||||
uint32_t bw; /* in MHz */
|
||||
|
||||
void *rtl_dev;
|
||||
};
|
||||
|
||||
|
|
|
@ -14,6 +14,9 @@
|
|||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#ifndef __CONVENIENCE_H
|
||||
#define __CONVENIENCE_H
|
||||
|
||||
|
||||
/* a collection of user friendly tools */
|
||||
|
||||
|
@ -140,3 +143,4 @@ int verbose_reset_buffer(rtlsdr_dev_t *dev);
|
|||
|
||||
int verbose_device_search(char *s);
|
||||
|
||||
#endif /*__CONVENIENCE_H*/
|
||||
|
|
|
@ -44,10 +44,7 @@ fc2580_fci_result_type fc2580_i2c_read(void *pTuner, unsigned char reg, unsigned
|
|||
return FC2580_FCI_SUCCESS;
|
||||
}
|
||||
|
||||
int
|
||||
fc2580_Initialize(
|
||||
void *pTuner
|
||||
)
|
||||
int fc2580_Initialize(void *pTuner)
|
||||
{
|
||||
int AgcMode;
|
||||
unsigned int CrystalFreqKhz;
|
||||
|
@ -70,11 +67,7 @@ error_status_initialize_tuner:
|
|||
return FUNCTION_ERROR;
|
||||
}
|
||||
|
||||
int
|
||||
fc2580_SetRfFreqHz(
|
||||
void *pTuner,
|
||||
unsigned long RfFreqHz
|
||||
)
|
||||
int fc2580_SetRfFreqHz(void *pTuner, unsigned long RfFreqHz)
|
||||
{
|
||||
unsigned int RfFreqKhz;
|
||||
unsigned int CrystalFreqKhz;
|
||||
|
@ -99,11 +92,7 @@ error_status_set_tuner_rf_frequency:
|
|||
@brief Set FC2580 tuner bandwidth mode.
|
||||
|
||||
*/
|
||||
int
|
||||
fc2580_SetBandwidthMode(
|
||||
void *pTuner,
|
||||
int BandwidthMode
|
||||
)
|
||||
int fc2580_SetBandwidthMode(void *pTuner, int BandwidthMode)
|
||||
{
|
||||
unsigned int CrystalFreqKhz;
|
||||
|
||||
|
@ -143,7 +132,7 @@ void fc2580_wait_msec(void *pTuner, int a)
|
|||
2 : Voltage Control Mode
|
||||
|
||||
==============================================================================*/
|
||||
fc2580_fci_result_type fc2580_set_init( void *pTuner, int ifagc_mode, unsigned int freq_xtal )
|
||||
fc2580_fci_result_type fc2580_set_init(void *pTuner, int ifagc_mode, unsigned int freq_xtal)
|
||||
{
|
||||
fc2580_fci_result_type result = FC2580_FCI_SUCCESS;
|
||||
|
||||
|
@ -192,7 +181,7 @@ fc2580_fci_result_type fc2580_set_init( void *pTuner, int ifagc_mode, unsigned i
|
|||
ex) 2.6GHz = 2600000
|
||||
|
||||
==============================================================================*/
|
||||
fc2580_fci_result_type fc2580_set_freq( void *pTuner, unsigned int f_lo, unsigned int freq_xtal )
|
||||
fc2580_fci_result_type fc2580_set_freq(void *pTuner, unsigned int f_lo, unsigned int freq_xtal)
|
||||
{
|
||||
unsigned int f_diff, f_diff_shifted, n_val, k_val;
|
||||
unsigned int f_vco, r_val, f_comp;
|
||||
|
@ -369,7 +358,7 @@ fc2580_fci_result_type fc2580_set_freq( void *pTuner, unsigned int f_lo, unsigne
|
|||
|
||||
|
||||
==============================================================================*/
|
||||
fc2580_fci_result_type fc2580_set_filter( void *pTuner, unsigned char filter_bw, unsigned int freq_xtal )
|
||||
fc2580_fci_result_type fc2580_set_filter(void *pTuner, unsigned char filter_bw, unsigned int freq_xtal)
|
||||
{
|
||||
unsigned char cal_mon = 0, i;
|
||||
fc2580_fci_result_type result = FC2580_FCI_SUCCESS;
|
||||
|
|
Loading…
Reference in New Issue