aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/usrp2/dboard_iface.cpp
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2010-04-16 22:10:35 -0700
committerJosh Blum <josh@joshknows.com>2010-04-16 22:10:35 -0700
commit8375ae721cd819b54fae4cc22e76285552033945 (patch)
tree5f2140a4e358d9f5259c617d17316d1a6ee17fdf /host/lib/usrp/usrp2/dboard_iface.cpp
parent632ca4afbbc2e383b956a7abe8e35ee1020c7306 (diff)
downloaduhd-8375ae721cd819b54fae4cc22e76285552033945.tar.gz
uhd-8375ae721cd819b54fae4cc22e76285552033945.tar.bz2
uhd-8375ae721cd819b54fae4cc22e76285552033945.zip
moved spi and i2c api into serial.hpp, its used for more than the dboard interfacing
Diffstat (limited to 'host/lib/usrp/usrp2/dboard_iface.cpp')
-rw-r--r--host/lib/usrp/usrp2/dboard_iface.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/host/lib/usrp/usrp2/dboard_iface.cpp b/host/lib/usrp/usrp2/dboard_iface.cpp
index 2859a7981..5ccb6fa47 100644
--- a/host/lib/usrp/usrp2/dboard_iface.cpp
+++ b/host/lib/usrp/usrp2/dboard_iface.cpp
@@ -17,7 +17,8 @@
#include "usrp2_iface.hpp"
#include "clock_control.hpp"
-#include "usrp2_regs.hpp"
+#include "usrp2_regs.hpp" //wishbone address constants
+#include <uhd/usrp/dboard_iface.hpp>
#include <uhd/types/dict.hpp>
#include <uhd/utils/assert.hpp>
#include <boost/assign/list_of.hpp>
@@ -25,6 +26,7 @@
#include <boost/math/special_functions/round.hpp>
#include <algorithm>
+using namespace uhd;
using namespace uhd::usrp;
class usrp2_dboard_iface : public dboard_iface{
@@ -214,7 +216,7 @@ void usrp2_dboard_iface::write_i2c(int i2c_addr, const byte_vector_t &buf){
ASSERT_THROW(htonl(in_data.id) == USRP2_CTRL_ID_COOL_IM_DONE_I2C_WRITE_DUDE);
}
-dboard_iface::byte_vector_t usrp2_dboard_iface::read_i2c(int i2c_addr, size_t num_bytes){
+byte_vector_t usrp2_dboard_iface::read_i2c(int i2c_addr, size_t num_bytes){
//setup the out data
usrp2_ctrl_data_t out_data;
out_data.id = htonl(USRP2_CTRL_ID_DO_AN_I2C_READ_FOR_ME_BRO);