Personally I'm using a patched UHD where I expose the SPI device :
diff --git a/host/lib/usrp/b200/b200_impl.cpp b/host/lib/usrp/b200/b200_impl.cpp
index a513e1336..01c1e3b51 100644
--- a/host/lib/usrp/b200/b200_impl.cpp
+++ b/host/lib/usrp/b200/b200_impl.cpp
@@ -549,6 +549,8 @@ b200_impl::b200_impl(const uhd::device_addr_t&
device_addr, usb_device_handle::s
_adf4001_iface = boost::make_shared<b200_ref_pll_ctrl>(_spi_iface);
}
+ _tree->create<spi_iface::sptr>(mb_path / ("spi")).set(_spi_iface);
+
////////////////////////////////////////////////////////////////////
// Init codec - turns on clocks
////////////////////////////////////////////////////////////////////
Then in my code I can get the SPI object :
uhd::spi_iface::sptr spi =
usrp->get_device()->get_tree()->access<uhd::spi_iface::sptr>("/mboards/0/spi").get();
and use read_spi / write_spi to control any register I want.
Cheers,
Sylvain
_______________________________________________
USRP-users mailing list
[email protected]
http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com