aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/usrp2/dsp_impl.cpp
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2010-04-28 11:10:50 -0700
committerJosh Blum <josh@joshknows.com>2010-04-28 11:10:50 -0700
commitcbd9e1da0866893d86320787a99cf4257478c539 (patch)
tree0b2515cd96d9c341795b91efed25df0616ea821c /host/lib/usrp/usrp2/dsp_impl.cpp
parentf5b6776a0b642c0357fbecdead9d2b1ac6ece3d3 (diff)
parent8497eb2ac016f72e2b9a9028e5126bc73f5b0c9a (diff)
downloaduhd-cbd9e1da0866893d86320787a99cf4257478c539.tar.gz
uhd-cbd9e1da0866893d86320787a99cf4257478c539.tar.bz2
uhd-cbd9e1da0866893d86320787a99cf4257478c539.zip
Merge branch 'master' of git@ettus.sourcerepo.com:ettus/uhdpriv into usrp_e
Diffstat (limited to 'host/lib/usrp/usrp2/dsp_impl.cpp')
-rw-r--r--host/lib/usrp/usrp2/dsp_impl.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/host/lib/usrp/usrp2/dsp_impl.cpp b/host/lib/usrp/usrp2/dsp_impl.cpp
index 204277ba7..84314a656 100644
--- a/host/lib/usrp/usrp2/dsp_impl.cpp
+++ b/host/lib/usrp/usrp2/dsp_impl.cpp
@@ -40,7 +40,7 @@ template <class T> T log2(T num){
* DDC Helper Methods
**********************************************************************/
static boost::uint32_t calculate_freq_word_and_update_actual_freq(double &freq, double clock_freq){
- ASSERT_THROW(std::abs(freq) < clock_freq/2.0);
+ UHD_ASSERT_THROW(std::abs(freq) < clock_freq/2.0);
static const double scale_factor = std::pow(2.0, 32);
//calculate the freq register word
@@ -117,6 +117,8 @@ void usrp2_impl::ddc_get(const wax::obj &key, wax::obj &val){
case DSP_PROP_HOST_RATE:
val = get_master_clock_freq()/_ddc_decim;
return;
+
+ default: UHD_THROW_PROP_GET_ERROR();
}
}
@@ -139,8 +141,7 @@ void usrp2_impl::ddc_set(const wax::obj &key, const wax::obj &val){
}
return;
- default:
- throw std::runtime_error("Error: trying to set read-only property on usrp2 ddc0");
+ default: UHD_THROW_PROP_SET_ERROR();
}
}
@@ -200,6 +201,8 @@ void usrp2_impl::duc_get(const wax::obj &key, wax::obj &val){
case DSP_PROP_HOST_RATE:
val = get_master_clock_freq()/_duc_interp;
return;
+
+ default: UHD_THROW_PROP_GET_ERROR();
}
}
@@ -222,7 +225,6 @@ void usrp2_impl::duc_set(const wax::obj &key, const wax::obj &val){
}
return;
- default:
- throw std::runtime_error("Error: trying to set read-only property on usrp2 duc0");
+ default: UHD_THROW_PROP_SET_ERROR();
}
}