diff options
| author | Josh Blum <josh@joshknows.com> | 2012-05-31 11:57:53 -0700 | 
|---|---|---|
| committer | Josh Blum <josh@joshknows.com> | 2012-06-05 17:59:27 -0700 | 
| commit | b216f715bc69a624e985021655ee1922b04adb3d (patch) | |
| tree | 49cd1bda9dd101e2984e2be7b9184aedaf639ac8 | |
| parent | 8b9ebe0a85fe9d5676a99699a8eeb12519392f3e (diff) | |
| download | uhd-b216f715bc69a624e985021655ee1922b04adb3d.tar.gz uhd-b216f715bc69a624e985021655ee1922b04adb3d.tar.bz2 uhd-b216f715bc69a624e985021655ee1922b04adb3d.zip  | |
usrp: clear rx dsp on deconstruction
| -rw-r--r-- | host/lib/usrp/cores/rx_dsp_core_200.cpp | 10 | 
1 files changed, 10 insertions, 0 deletions
diff --git a/host/lib/usrp/cores/rx_dsp_core_200.cpp b/host/lib/usrp/cores/rx_dsp_core_200.cpp index d0afda769..a89405039 100644 --- a/host/lib/usrp/cores/rx_dsp_core_200.cpp +++ b/host/lib/usrp/cores/rx_dsp_core_200.cpp @@ -19,6 +19,7 @@  #include <uhd/types/dict.hpp>  #include <uhd/exception.hpp>  #include <uhd/utils/msg.hpp> +#include <uhd/utils/safe_call.hpp>  #include <uhd/utils/algorithm.hpp>  #include <boost/assign/list_of.hpp>  #include <boost/thread/thread.hpp> //thread sleep @@ -76,6 +77,15 @@ public:          this->clear();      } +    ~rx_dsp_core_200_impl(void) +    { +        UHD_SAFE_CALL +        ( +            //shutdown any possible streaming +            this->clear(); +        ) +    } +      void clear(void){          _iface->poke32(REG_RX_CTRL_NCHANNELS, 0); //also reset          _iface->poke32(REG_RX_CTRL_VRT_HDR, 0  | 
