aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/common/max287x.hpp
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2015-09-01 15:20:42 -0700
committerMartin Braun <martin.braun@ettus.com>2015-09-01 15:20:42 -0700
commit6464a000150858b5d65a53490f0593d5ba1e4ca6 (patch)
treea199c3773d683d9e37fa300900291c3628cff6e4 /host/lib/usrp/common/max287x.hpp
parentd697bff4547b6a7fb95e127ec12e2989fc6fc2e5 (diff)
parent8adefb1d80f08a53856fef45b80ed5a07f0a9a26 (diff)
downloaduhd-6464a000150858b5d65a53490f0593d5ba1e4ca6.tar.gz
uhd-6464a000150858b5d65a53490f0593d5ba1e4ca6.tar.bz2
uhd-6464a000150858b5d65a53490f0593d5ba1e4ca6.zip
Merge branch 'maint'
Diffstat (limited to 'host/lib/usrp/common/max287x.hpp')
-rw-r--r--host/lib/usrp/common/max287x.hpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/host/lib/usrp/common/max287x.hpp b/host/lib/usrp/common/max287x.hpp
index d084dcfbe..fe5da195c 100644
--- a/host/lib/usrp/common/max287x.hpp
+++ b/host/lib/usrp/common/max287x.hpp
@@ -412,7 +412,7 @@ double max287x<max287x_regs_t>::set_frequency(
(128, max287x_regs_t::RF_DIVIDER_SELECT_DIV128);
//map mode setting to valid integer divider (N) values
- static const uhd::range_t int_n_mode_div_range(16,65536,1);
+ static const uhd::range_t int_n_mode_div_range(16,65535,1);
static const uhd::range_t frac_n_mode_div_range(19,4091,1);
//other ranges and constants from MAX287X datasheets
@@ -486,13 +486,13 @@ double max287x<max287x_regs_t>::set_frequency(
//keep N within int divider requirements
if(is_int_n)
{
- if(N < int_n_mode_div_range.start()) continue;
- if(N > int_n_mode_div_range.stop()) continue;
+ if(N <= int_n_mode_div_range.start()) continue;
+ if(N >= int_n_mode_div_range.stop()) continue;
}
else
{
- if(N < frac_n_mode_div_range.start()) continue;
- if(N > frac_n_mode_div_range.stop()) continue;
+ if(N <= frac_n_mode_div_range.start()) continue;
+ if(N >= frac_n_mode_div_range.stop()) continue;
}
//keep pfd freq low enough to achieve 50kHz BS clock
@@ -772,7 +772,7 @@ void max287x<max287x_regs_t>::commit()
if (changed_regs.find(boost::uint32_t(addr)) != changed_regs.end())
regs.push_back(_regs.get_reg(boost::uint32_t(addr)));
}
- } catch (uhd::runtime_error& e) {
+ } catch (uhd::runtime_error&) {
// No saved state - write all regs
for (int addr = 5; addr >= 0; addr--)
regs.push_back(_regs.get_reg(boost::uint32_t(addr)));