diff options
author | Josh Blum <josh@joshknows.com> | 2011-06-10 15:23:24 -0700 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2011-06-10 15:23:24 -0700 |
commit | 09cf8eb16444b0c744b47b39b077f9d0fbb09886 (patch) | |
tree | 6f7c381b2736860378838e5bab6baeef8f602e13 /host/lib/usrp/usrp2/mboard_impl.cpp | |
parent | e709e4d36516f4459cc08c46ae6eea1e12feb70b (diff) | |
download | uhd-09cf8eb16444b0c744b47b39b077f9d0fbb09886.tar.gz uhd-09cf8eb16444b0c744b47b39b077f9d0fbb09886.tar.bz2 uhd-09cf8eb16444b0c744b47b39b077f9d0fbb09886.zip |
uhd: added more SAFE_CALL macros to hardware wrapper dtors
And removed the calls on the sptr resets (not needed now).
Diffstat (limited to 'host/lib/usrp/usrp2/mboard_impl.cpp')
-rw-r--r-- | host/lib/usrp/usrp2/mboard_impl.cpp | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/host/lib/usrp/usrp2/mboard_impl.cpp b/host/lib/usrp/usrp2/mboard_impl.cpp index bf1fd5cce..4a28ea9c4 100644 --- a/host/lib/usrp/usrp2/mboard_impl.cpp +++ b/host/lib/usrp/usrp2/mboard_impl.cpp @@ -176,18 +176,10 @@ usrp2_mboard_impl::usrp2_mboard_impl( //------------------------------------------------------------------ } -usrp2_mboard_impl::~usrp2_mboard_impl(void){ - //Safely destruct all RAII objects in an mboard. - //This prevents the mboard deconstructor from throwing, - //which allows the device to be safely deconstructed. - UHD_SAFE_CALL(_iface->poke32(U2_REG_TX_CTRL_CYCLES_PER_UP, 0);) - UHD_SAFE_CALL(_iface->poke32(U2_REG_TX_CTRL_PACKETS_PER_UP, 0);) - UHD_SAFE_CALL(_dboard_manager.reset();) - UHD_SAFE_CALL(_dboard_iface.reset();) - UHD_SAFE_CALL(_codec_ctrl.reset();) - UHD_SAFE_CALL(_clock_ctrl.reset();) - UHD_SAFE_CALL(_gps_ctrl.reset();) -} +usrp2_mboard_impl::~usrp2_mboard_impl(void){UHD_SAFE_CALL( + _iface->poke32(U2_REG_TX_CTRL_CYCLES_PER_UP, 0); + _iface->poke32(U2_REG_TX_CTRL_PACKETS_PER_UP, 0); +)} /*********************************************************************** * Helper Methods |