aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/b100/io_impl.cpp
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2011-06-30 11:32:26 -0700
committerJosh Blum <josh@joshknows.com>2011-06-30 11:32:26 -0700
commit6f4fb27955333ed9db372ec42aea52f3b605a968 (patch)
tree31d62d3b48ca29763cc0dbc816e56811233f11cb /host/lib/usrp/b100/io_impl.cpp
parentf4dc4bf74e65d185ef76e48d3cb172bf0a66f24a (diff)
downloaduhd-6f4fb27955333ed9db372ec42aea52f3b605a968.tar.gz
uhd-6f4fb27955333ed9db372ec42aea52f3b605a968.tar.bz2
uhd-6f4fb27955333ed9db372ec42aea52f3b605a968.zip
b100: made async callback safer, other tweaks (still issues)
Diffstat (limited to 'host/lib/usrp/b100/io_impl.cpp')
-rw-r--r--host/lib/usrp/b100/io_impl.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/host/lib/usrp/b100/io_impl.cpp b/host/lib/usrp/b100/io_impl.cpp
index cb8d035a2..894876a7c 100644
--- a/host/lib/usrp/b100/io_impl.cpp
+++ b/host/lib/usrp/b100/io_impl.cpp
@@ -101,12 +101,18 @@ void b100_impl::io_init(void){
_tx_otw_type.shift = 0;
_tx_otw_type.byteorder = uhd::otw_type_t::BO_BIG_ENDIAN;
+ //TODO best place to put this?
+ this->reset_gpif(6);
+
//set the expected packet size in USB frames
_fpga_ctrl->poke32(B100_REG_MISC_RX_LEN, 4);
//create new io impl
_io_impl = UHD_PIMPL_MAKE(io_impl, (_data_transport, _rx_dsps.size()));
+ //now its safe to register the async callback
+ _fpga_ctrl->set_async_cb(boost::bind(&b100_impl::handle_async_message, this, _1));
+
//init some handler stuff
_io_impl->recv_handler.set_vrt_unpacker(&vrt::if_hdr_unpack_le);
_io_impl->recv_handler.set_converter(_rx_otw_type);