aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/usrp2
diff options
context:
space:
mode:
Diffstat (limited to 'host/lib/usrp/usrp2')
-rw-r--r--host/lib/usrp/usrp2/dboard_iface.cpp8
-rw-r--r--host/lib/usrp/usrp2/io_impl.cpp3
-rw-r--r--host/lib/usrp/usrp2/usrp2_fifo_ctrl.hpp5
-rw-r--r--host/lib/usrp/usrp2/usrp2_iface.cpp4
-rw-r--r--host/lib/usrp/usrp2/usrp2_iface.hpp7
-rw-r--r--host/lib/usrp/usrp2/usrp2_impl.hpp4
6 files changed, 18 insertions, 13 deletions
diff --git a/host/lib/usrp/usrp2/dboard_iface.cpp b/host/lib/usrp/usrp2/dboard_iface.cpp
index edd9ef242..8f2d0f0dc 100644
--- a/host/lib/usrp/usrp2/dboard_iface.cpp
+++ b/host/lib/usrp/usrp2/dboard_iface.cpp
@@ -60,8 +60,8 @@ public:
void set_gpio_debug(unit_t, int);
boost::uint16_t read_gpio(unit_t);
- void write_i2c(boost::uint8_t, const byte_vector_t &);
- byte_vector_t read_i2c(boost::uint8_t, size_t);
+ void write_i2c(boost::uint16_t, const byte_vector_t &);
+ byte_vector_t read_i2c(boost::uint16_t, size_t);
void set_clock_rate(unit_t, double);
double get_clock_rate(unit_t);
@@ -229,11 +229,11 @@ boost::uint32_t usrp2_dboard_iface::read_write_spi(
/***********************************************************************
* I2C
**********************************************************************/
-void usrp2_dboard_iface::write_i2c(boost::uint8_t addr, const byte_vector_t &bytes){
+void usrp2_dboard_iface::write_i2c(boost::uint16_t addr, const byte_vector_t &bytes){
return _i2c_iface->write_i2c(addr, bytes);
}
-byte_vector_t usrp2_dboard_iface::read_i2c(boost::uint8_t addr, size_t num_bytes){
+byte_vector_t usrp2_dboard_iface::read_i2c(boost::uint16_t addr, size_t num_bytes){
return _i2c_iface->read_i2c(addr, num_bytes);
}
diff --git a/host/lib/usrp/usrp2/io_impl.cpp b/host/lib/usrp/usrp2/io_impl.cpp
index e06cf8f6f..9ee6abed0 100644
--- a/host/lib/usrp/usrp2/io_impl.cpp
+++ b/host/lib/usrp/usrp2/io_impl.cpp
@@ -467,6 +467,8 @@ rx_streamer::sptr usrp2_impl::get_rx_stream(const uhd::stream_args_t &args_){
my_streamer->set_xport_chan_get_buff(chan_i, boost::bind(
&zero_copy_if::get_recv_buff, _mbc[mb].rx_dsp_xports[dsp], _1
), true /*flush*/);
+ my_streamer->set_issue_stream_cmd(chan_i, boost::bind(
+ &rx_dsp_core_200::issue_stream_command, _mbc[mb].rx_dsps[dsp], _1));
_mbc[mb].rx_streamers[dsp] = my_streamer; //store weak pointer
break;
}
@@ -536,6 +538,7 @@ tx_streamer::sptr usrp2_impl::get_tx_stream(const uhd::stream_args_t &args_){
my_streamer->set_xport_chan_get_buff(chan_i, boost::bind(
&usrp2_impl::io_impl::get_send_buff, _io_impl.get(), abs, _1
));
+ my_streamer->set_async_receiver(boost::bind(&bounded_buffer<async_metadata_t>::pop_with_timed_wait, &(_io_impl->async_msg_fifo), _1, _2));
_mbc[mb].tx_streamers[dsp] = my_streamer; //store weak pointer
break;
}
diff --git a/host/lib/usrp/usrp2/usrp2_fifo_ctrl.hpp b/host/lib/usrp/usrp2/usrp2_fifo_ctrl.hpp
index b48d05aa2..13dfb5b46 100644
--- a/host/lib/usrp/usrp2/usrp2_fifo_ctrl.hpp
+++ b/host/lib/usrp/usrp2/usrp2_fifo_ctrl.hpp
@@ -23,14 +23,15 @@
#include <uhd/transport/zero_copy.hpp>
#include <boost/shared_ptr.hpp>
#include <boost/utility.hpp>
-#include "wb_iface.hpp"
+#include <uhd/types/wb_iface.hpp>
#include <string>
/*!
* The usrp2 FIFO control class:
* Provide high-speed peek/poke interface.
*/
-class usrp2_fifo_ctrl : public wb_iface, public uhd::spi_iface{
+class usrp2_fifo_ctrl : public uhd::wb_iface, public uhd::spi_iface
+{
public:
typedef boost::shared_ptr<usrp2_fifo_ctrl> sptr;
diff --git a/host/lib/usrp/usrp2/usrp2_iface.cpp b/host/lib/usrp/usrp2/usrp2_iface.cpp
index 8804433e7..3b230ca69 100644
--- a/host/lib/usrp/usrp2/usrp2_iface.cpp
+++ b/host/lib/usrp/usrp2/usrp2_iface.cpp
@@ -240,7 +240,7 @@ public:
/***********************************************************************
* I2C
**********************************************************************/
- void write_i2c(boost::uint8_t addr, const byte_vector_t &buf){
+ void write_i2c(boost::uint16_t addr, const byte_vector_t &buf){
//setup the out data
usrp2_ctrl_data_t out_data = usrp2_ctrl_data_t();
out_data.id = htonl(USRP2_CTRL_ID_WRITE_THESE_I2C_VALUES_BRO);
@@ -258,7 +258,7 @@ public:
UHD_ASSERT_THROW(ntohl(in_data.id) == USRP2_CTRL_ID_COOL_IM_DONE_I2C_WRITE_DUDE);
}
- byte_vector_t read_i2c(boost::uint8_t addr, size_t num_bytes){
+ byte_vector_t read_i2c(boost::uint16_t addr, size_t num_bytes){
//setup the out data
usrp2_ctrl_data_t out_data = usrp2_ctrl_data_t();
out_data.id = htonl(USRP2_CTRL_ID_DO_AN_I2C_READ_FOR_ME_BRO);
diff --git a/host/lib/usrp/usrp2/usrp2_iface.hpp b/host/lib/usrp/usrp2/usrp2_iface.hpp
index ed4de02d5..a01f2ccfa 100644
--- a/host/lib/usrp/usrp2/usrp2_iface.hpp
+++ b/host/lib/usrp/usrp2/usrp2_iface.hpp
@@ -1,5 +1,5 @@
//
-// Copyright 2010-2012 Ettus Research LLC
+// Copyright 2010-2013 Ettus Research LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -25,7 +25,7 @@
#include <boost/utility.hpp>
#include <boost/function.hpp>
#include "usrp2_regs.hpp"
-#include "wb_iface.hpp"
+#include <uhd/types/wb_iface.hpp>
#include <string>
/*!
@@ -33,7 +33,8 @@
* Provides a set of functions to implementation layer.
* Including spi, peek, poke, control...
*/
-class usrp2_iface : public wb_iface, public uhd::spi_iface, public uhd::i2c_iface{
+class usrp2_iface : public uhd::wb_iface, public uhd::spi_iface, public uhd::i2c_iface
+{
public:
typedef boost::shared_ptr<usrp2_iface> sptr;
/*!
diff --git a/host/lib/usrp/usrp2/usrp2_impl.hpp b/host/lib/usrp/usrp2/usrp2_impl.hpp
index a6c0d87cf..f9988287f 100644
--- a/host/lib/usrp/usrp2/usrp2_impl.hpp
+++ b/host/lib/usrp/usrp2/usrp2_impl.hpp
@@ -57,7 +57,7 @@ static const std::string USRP2_EEPROM_MAP_KEY = "N100";
//! Make a usrp2 dboard interface.
uhd::usrp::dboard_iface::sptr make_usrp2_dboard_iface(
- wb_iface::sptr wb_iface,
+ uhd::wb_iface::sptr wb_iface,
uhd::i2c_iface::sptr i2c_iface,
uhd::spi_iface::sptr spi_iface,
usrp2_clock_ctrl::sptr clk_ctrl
@@ -84,7 +84,7 @@ private:
usrp2_iface::sptr iface;
usrp2_fifo_ctrl::sptr fifo_ctrl;
uhd::spi_iface::sptr spiface;
- wb_iface::sptr wbiface;
+ uhd::wb_iface::sptr wbiface;
usrp2_clock_ctrl::sptr clock;
usrp2_codec_ctrl::sptr codec;
uhd::gps_ctrl::sptr gps;