diff options
author | Josh Blum <josh@joshknows.com> | 2011-06-28 11:11:04 -0700 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2011-06-28 11:11:04 -0700 |
commit | 4888233252d58f0df3c8773ec3268a0ed7bea1d2 (patch) | |
tree | 33daab577ff64117e647bb5d6e97397c89ff6b11 /host/lib/usrp/cores | |
parent | 3a6187515677b277489df4ec59f9cf21f1ed62bc (diff) | |
download | uhd-4888233252d58f0df3c8773ec3268a0ed7bea1d2.tar.gz uhd-4888233252d58f0df3c8773ec3268a0ed7bea1d2.tar.bz2 uhd-4888233252d58f0df3c8773ec3268a0ed7bea1d2.zip |
uhd: re-work to make the properties easier to use
Diffstat (limited to 'host/lib/usrp/cores')
-rw-r--r-- | host/lib/usrp/cores/rx_dsp_core_200.cpp | 14 | ||||
-rw-r--r-- | host/lib/usrp/cores/rx_dsp_core_200.hpp | 2 |
2 files changed, 12 insertions, 4 deletions
diff --git a/host/lib/usrp/cores/rx_dsp_core_200.cpp b/host/lib/usrp/cores/rx_dsp_core_200.cpp index 5aa32c630..b13cc8f03 100644 --- a/host/lib/usrp/cores/rx_dsp_core_200.cpp +++ b/host/lib/usrp/cores/rx_dsp_core_200.cpp @@ -48,10 +48,18 @@ public: rx_dsp_core_200_impl( wb_iface::sptr iface, const size_t dsp_base, const size_t ctrl_base, - const boost::uint32_t sid + const boost::uint32_t sid, const bool lingering_packet ): _iface(iface), _dsp_base(dsp_base), _ctrl_base(ctrl_base) { + //This is a hack/fix for the lingering packet problem. + //The caller should also flush the recv transports + if (lingering_packet){ + stream_cmd_t stream_cmd(stream_cmd_t::STREAM_MODE_NUM_SAMPS_AND_DONE); + stream_cmd.num_samps = 1; + issue_stream_command(stream_cmd); + } + _iface->poke32(REG_RX_CTRL_CLEAR, 1); //reset _iface->poke32(REG_RX_CTRL_NCHANNELS, 1); _iface->poke32(REG_RX_CTRL_VRT_HDR, 0 @@ -162,6 +170,6 @@ private: bool _continuous_streaming; }; -rx_dsp_core_200::sptr rx_dsp_core_200::make(wb_iface::sptr iface, const size_t dsp_base, const size_t ctrl_base, const boost::uint32_t sid){ - return sptr(new rx_dsp_core_200_impl(iface, dsp_base, ctrl_base, sid)); +rx_dsp_core_200::sptr rx_dsp_core_200::make(wb_iface::sptr iface, const size_t dsp_base, const size_t ctrl_base, const boost::uint32_t sid, const bool lingering_packet){ + return sptr(new rx_dsp_core_200_impl(iface, dsp_base, ctrl_base, sid, lingering_packet)); } diff --git a/host/lib/usrp/cores/rx_dsp_core_200.hpp b/host/lib/usrp/cores/rx_dsp_core_200.hpp index 6bc7c6102..c496fca76 100644 --- a/host/lib/usrp/cores/rx_dsp_core_200.hpp +++ b/host/lib/usrp/cores/rx_dsp_core_200.hpp @@ -32,7 +32,7 @@ public: static sptr make( wb_iface::sptr iface, const size_t dsp_base, const size_t ctrl_base, - const boost::uint32_t sid + const boost::uint32_t sid, const bool lingering_packet = false ); virtual void set_nsamps_per_packet(const size_t nsamps) = 0; |