aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/dboard/db_sbx_common.hpp
diff options
context:
space:
mode:
authorAshish Chaudhari <ashish@ettus.com>2013-11-13 16:51:26 -0800
committerAshish Chaudhari <ashish@ettus.com>2013-11-13 16:51:26 -0800
commitc0bf255bcdaa5e2b2f0220c0eea20344792de650 (patch)
tree92e2ab474206da0ef4f7c3b58efa375b09ff6171 /host/lib/usrp/dboard/db_sbx_common.hpp
parent6b484a59a40d8a576e71886b88414803c493a322 (diff)
downloaduhd-c0bf255bcdaa5e2b2f0220c0eea20344792de650.tar.gz
uhd-c0bf255bcdaa5e2b2f0220c0eea20344792de650.tar.bz2
uhd-c0bf255bcdaa5e2b2f0220c0eea20344792de650.zip
sbx: bugfix#55 and refactored ADF435X tuning code in the SBX driver.
Diffstat (limited to 'host/lib/usrp/dboard/db_sbx_common.hpp')
-rw-r--r--host/lib/usrp/dboard/db_sbx_common.hpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/host/lib/usrp/dboard/db_sbx_common.hpp b/host/lib/usrp/dboard/db_sbx_common.hpp
index 4f3a2eeaa..e9bb2434c 100644
--- a/host/lib/usrp/dboard/db_sbx_common.hpp
+++ b/host/lib/usrp/dboard/db_sbx_common.hpp
@@ -181,6 +181,34 @@ protected:
~sbx_versionx(void) {}
virtual double set_lo_freq(dboard_iface::unit_t unit, double target_freq) = 0;
+ protected:
+ struct adf435x_tuning_constraints {
+ bool force_frac0;
+ double ref_doubler_threshold;
+ double pfd_freq_max;
+ double band_sel_freq_max;
+ uhd::range_t rf_divider_range;
+ uhd::range_t int_range;
+ };
+
+ struct adf435x_tuning_settings {
+ boost::uint16_t frac_12_bit;
+ boost::uint16_t int_16_bit;
+ boost::uint16_t mod_12_bit;
+ boost::uint16_t r_counter_10_bit;
+ bool r_doubler_en;
+ bool r_divide_by_2_en;
+ boost::uint16_t clock_divider_12_bit;
+ boost::uint8_t band_select_clock_div;
+ boost::uint16_t rf_divider;
+ bool feedback_after_divider;
+ };
+
+ adf435x_tuning_settings _tune_adf435x_synth(
+ double target_freq,
+ double ref_freq,
+ const adf435x_tuning_constraints& constraints,
+ double& actual_freq);
};
/*!