From 0ce526f302de68ece342545b4533aab699336028 Mon Sep 17 00:00:00 2001 From: Nicholas Corgan Date: Wed, 19 Aug 2015 11:13:20 -0700 Subject: Fixed minor warnings * Unreferenced exceptions in try-catch statements * Incorrect function documentation * Unlabelled unused variables --- host/lib/usrp/common/max287x.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'host/lib/usrp/common') diff --git a/host/lib/usrp/common/max287x.hpp b/host/lib/usrp/common/max287x.hpp index d084dcfbe..53d967d0e 100644 --- a/host/lib/usrp/common/max287x.hpp +++ b/host/lib/usrp/common/max287x.hpp @@ -772,7 +772,7 @@ void max287x::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))); -- cgit v1.2.3 From 5d3ad761d5479c981858dfe7d13e5fb11c25d8d6 Mon Sep 17 00:00:00 2001 From: michael-west Date: Tue, 25 Aug 2015 13:39:45 -0700 Subject: UHD: Fix max287x N divider ranges --- host/lib/usrp/common/max287x.hpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'host/lib/usrp/common') diff --git a/host/lib/usrp/common/max287x.hpp b/host/lib/usrp/common/max287x.hpp index 53d967d0e..fe5da195c 100644 --- a/host/lib/usrp/common/max287x.hpp +++ b/host/lib/usrp/common/max287x.hpp @@ -412,7 +412,7 @@ double max287x::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::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 -- cgit v1.2.3