aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/usrp2/mboard_impl.cpp
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2010-12-16 00:07:19 -0800
committerJosh Blum <josh@joshknows.com>2010-12-16 00:07:19 -0800
commit28194df43e34b8f5c89d7a3f0fdea0be3a15b7b2 (patch)
treeed0a45655371281d2ef9da6581e4ef4d19157e35 /host/lib/usrp/usrp2/mboard_impl.cpp
parentfa7d4a2a15cf332085b218373e7746604285bf2c (diff)
downloaduhd-28194df43e34b8f5c89d7a3f0fdea0be3a15b7b2.tar.gz
uhd-28194df43e34b8f5c89d7a3f0fdea0be3a15b7b2.tar.bz2
uhd-28194df43e34b8f5c89d7a3f0fdea0be3a15b7b2.zip
usrp2: brought err0 transports into device and mboard constructors
Diffstat (limited to 'host/lib/usrp/usrp2/mboard_impl.cpp')
-rw-r--r--host/lib/usrp/usrp2/mboard_impl.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/host/lib/usrp/usrp2/mboard_impl.cpp b/host/lib/usrp/usrp2/mboard_impl.cpp
index b64d4e3f6..9afa6eda7 100644
--- a/host/lib/usrp/usrp2/mboard_impl.cpp
+++ b/host/lib/usrp/usrp2/mboard_impl.cpp
@@ -38,6 +38,7 @@ usrp2_mboard_impl::usrp2_mboard_impl(
size_t index,
transport::udp_simple::sptr ctrl_transport,
transport::zero_copy_if::sptr data_transport,
+ transport::zero_copy_if::sptr err0_transport,
const device_addr_t &device_args,
size_t recv_samps_per_packet
):
@@ -47,11 +48,15 @@ usrp2_mboard_impl::usrp2_mboard_impl(
//Send a small data packet so the usrp2 knows the udp source port.
//This setup must happen before further initialization occurs
//or the async update packets will cause ICMP destination unreachable.
- transport::managed_send_buffer::sptr send_buff = data_transport->get_send_buff();
+ transport::managed_send_buffer::sptr send_buff;
static const boost::uint32_t data[2] = {
uhd::htonx(boost::uint32_t(0 /* don't care seq num */)),
uhd::htonx(boost::uint32_t(USRP2_INVALID_VRT_HEADER))
};
+ send_buff = data_transport->get_send_buff();
+ std::memcpy(send_buff->cast<void*>(), &data, sizeof(data));
+ send_buff->commit(sizeof(data));
+ send_buff = err0_transport->get_send_buff();
std::memcpy(send_buff->cast<void*>(), &data, sizeof(data));
send_buff->commit(sizeof(data));