summaryrefslogtreecommitdiffstats
path: root/host/lib
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2011-12-05 13:32:02 -0800
committerJosh Blum <josh@joshknows.com>2011-12-05 13:32:02 -0800
commit7dc76db5737943fa24a0321dd7a4ace36db6c2c6 (patch)
tree088e997a536fbe7ef34a9382de3d0cc832a632c3 /host/lib
parent04da3ec10aee9b04dbc34cb10c3adf026adf03c7 (diff)
downloaduhd-7dc76db5737943fa24a0321dd7a4ace36db6c2c6.tar.gz
uhd-7dc76db5737943fa24a0321dd7a4ace36db6c2c6.tar.bz2
uhd-7dc76db5737943fa24a0321dd7a4ace36db6c2c6.zip
usrp: rx dsp move init code into clear (like tx)
Diffstat (limited to 'host/lib')
-rw-r--r--host/lib/usrp/cores/rx_dsp_core_200.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/host/lib/usrp/cores/rx_dsp_core_200.cpp b/host/lib/usrp/cores/rx_dsp_core_200.cpp
index 481260e32..f184a8346 100644
--- a/host/lib/usrp/cores/rx_dsp_core_200.cpp
+++ b/host/lib/usrp/cores/rx_dsp_core_200.cpp
@@ -57,7 +57,7 @@ public:
const size_t dsp_base, const size_t ctrl_base,
const boost::uint32_t sid, const bool lingering_packet
):
- _iface(iface), _dsp_base(dsp_base), _ctrl_base(ctrl_base)
+ _iface(iface), _dsp_base(dsp_base), _ctrl_base(ctrl_base), _sid(sid)
{
//This is a hack/fix for the lingering packet problem.
//The caller should also flush the recv transports
@@ -67,6 +67,10 @@ public:
issue_stream_command(stream_cmd);
}
+ this->clear();
+ }
+
+ void clear(void){
_iface->poke32(REG_RX_CTRL_CLEAR, 1); //reset
_iface->poke32(REG_RX_CTRL_NCHANNELS, 1);
_iface->poke32(REG_RX_CTRL_VRT_HDR, 0
@@ -75,14 +79,10 @@ public:
| (0x3 << 22) //integer time other
| (0x1 << 20) //fractional time sample count
);
- _iface->poke32(REG_RX_CTRL_VRT_SID, sid);
+ _iface->poke32(REG_RX_CTRL_VRT_SID, _sid);
_iface->poke32(REG_RX_CTRL_VRT_TLR, 0);
}
- void clear(void){
- _iface->poke32(REG_RX_CTRL_CLEAR, 1); //reset
- }
-
void set_nsamps_per_packet(const size_t nsamps){
_iface->poke32(REG_RX_CTRL_NSAMPS_PP, nsamps);
}
@@ -230,6 +230,7 @@ private:
double _tick_rate, _link_rate;
bool _continuous_streaming;
double _scaling_adjustment, _fxpt_scale_adj;
+ const boost::uint32_t _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){