aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/usrp2/mboard_impl.cpp
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2010-10-21 12:27:49 -0700
committerJosh Blum <josh@joshknows.com>2010-10-21 12:27:49 -0700
commitbd59192bd4eceaf86b60d91651e6b0bf11c2274e (patch)
tree11d8b02694f372d3ae53d648bffd1f363005cc04 /host/lib/usrp/usrp2/mboard_impl.cpp
parente2f76bddae7845024056b479658651c6da2b0f4d (diff)
downloaduhd-bd59192bd4eceaf86b60d91651e6b0bf11c2274e.tar.gz
uhd-bd59192bd4eceaf86b60d91651e6b0bf11c2274e.tar.bz2
uhd-bd59192bd4eceaf86b60d91651e6b0bf11c2274e.zip
usrp2: handle real overflow packets in host, reload continuous stream cmd, remove firmware handling
Diffstat (limited to 'host/lib/usrp/usrp2/mboard_impl.cpp')
-rw-r--r--host/lib/usrp/usrp2/mboard_impl.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/host/lib/usrp/usrp2/mboard_impl.cpp b/host/lib/usrp/usrp2/mboard_impl.cpp
index a0e6adfad..4c9f6af73 100644
--- a/host/lib/usrp/usrp2/mboard_impl.cpp
+++ b/host/lib/usrp/usrp2/mboard_impl.cpp
@@ -176,7 +176,15 @@ void usrp2_mboard_impl::set_time_spec(const time_spec_t &time_spec, bool now){
_iface->poke32(U2_REG_TIME64_SECS, boost::uint32_t(time_spec.get_full_secs()));
}
+void usrp2_mboard_impl::handle_overflow(void){
+ _iface->poke32(U2_REG_RX_CTRL_CLEAR_OVERRUN, 1);
+ if (_continuous_streaming){ //re-issue the stream command if already continuous
+ this->issue_ddc_stream_cmd(stream_cmd_t::STREAM_MODE_START_CONTINUOUS);
+ }
+}
+
void usrp2_mboard_impl::issue_ddc_stream_cmd(const stream_cmd_t &stream_cmd){
+ _continuous_streaming = stream_cmd.stream_mode == stream_cmd_t::STREAM_MODE_START_CONTINUOUS;
_iface->poke32(U2_REG_RX_CTRL_STREAM_CMD, dsp_type1::calc_stream_cmd_word(
stream_cmd, _recv_frame_size
));