From 56f391ad6486d956740225b9aed9954865572bdd Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Fri, 4 Oct 2013 16:11:50 -0700 Subject: uhd: wb_iface is now a public interface --- host/lib/types/CMakeLists.txt | 3 +- host/lib/types/wb_iface.cpp | 56 +++++++++++++++++++ host/lib/usrp/b100/b100_impl.hpp | 2 +- host/lib/usrp/b200/b200_impl.hpp | 4 +- host/lib/usrp/common/fifo_ctrl_excelsior.hpp | 5 +- host/lib/usrp/cores/CMakeLists.txt | 1 - host/lib/usrp/cores/gpio_core_200.hpp | 6 +-- host/lib/usrp/cores/i2c_core_100.hpp | 4 +- host/lib/usrp/cores/i2c_core_100_wb32.hpp | 4 +- host/lib/usrp/cores/i2c_core_200.hpp | 4 +- host/lib/usrp/cores/radio_ctrl_core_3000.hpp | 4 +- host/lib/usrp/cores/rx_dsp_core_200.hpp | 4 +- host/lib/usrp/cores/rx_dsp_core_3000.hpp | 4 +- host/lib/usrp/cores/rx_frontend_core_200.cpp | 2 + host/lib/usrp/cores/rx_frontend_core_200.hpp | 4 +- host/lib/usrp/cores/rx_vita_core_3000.hpp | 4 +- host/lib/usrp/cores/spi_core_100.hpp | 4 +- host/lib/usrp/cores/spi_core_3000.hpp | 4 +- host/lib/usrp/cores/time64_core_200.hpp | 4 +- host/lib/usrp/cores/time_core_3000.hpp | 4 +- host/lib/usrp/cores/tx_dsp_core_200.hpp | 4 +- host/lib/usrp/cores/tx_dsp_core_3000.hpp | 4 +- host/lib/usrp/cores/tx_frontend_core_200.cpp | 2 + host/lib/usrp/cores/tx_frontend_core_200.hpp | 4 +- host/lib/usrp/cores/tx_vita_core_3000.hpp | 4 +- host/lib/usrp/cores/user_settings_core_200.cpp | 2 + host/lib/usrp/cores/user_settings_core_200.hpp | 4 +- host/lib/usrp/cores/wb_iface.cpp | 51 ------------------ host/lib/usrp/cores/wb_iface.hpp | 75 -------------------------- host/lib/usrp/e100/e100_impl.hpp | 2 +- host/lib/usrp/usrp1/usrp1_iface.hpp | 7 +-- host/lib/usrp/usrp2/usrp2_fifo_ctrl.hpp | 5 +- host/lib/usrp/usrp2/usrp2_iface.hpp | 7 +-- host/lib/usrp/usrp2/usrp2_impl.hpp | 4 +- 34 files changed, 121 insertions(+), 181 deletions(-) create mode 100644 host/lib/types/wb_iface.cpp delete mode 100644 host/lib/usrp/cores/wb_iface.cpp delete mode 100644 host/lib/usrp/cores/wb_iface.hpp (limited to 'host/lib') diff --git a/host/lib/types/CMakeLists.txt b/host/lib/types/CMakeLists.txt index 2ca0faef7..b69c8e487 100644 --- a/host/lib/types/CMakeLists.txt +++ b/host/lib/types/CMakeLists.txt @@ -1,5 +1,5 @@ # -# Copyright 2011 Ettus Research LLC +# Copyright 2011-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 @@ -88,4 +88,5 @@ LIBUHD_APPEND_SOURCES( ${CMAKE_CURRENT_SOURCE_DIR}/time_spec.cpp ${CMAKE_CURRENT_SOURCE_DIR}/tune.cpp ${CMAKE_CURRENT_SOURCE_DIR}/types.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/wb_iface.cpp ) diff --git a/host/lib/types/wb_iface.cpp b/host/lib/types/wb_iface.cpp new file mode 100644 index 000000000..6edfdfe2f --- /dev/null +++ b/host/lib/types/wb_iface.cpp @@ -0,0 +1,56 @@ +// +// Copyright 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 +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// + +#include +#include + +using namespace uhd; + +wb_iface::~wb_iface(void) +{ + //NOP +} + +void wb_iface::poke64(const wb_iface::wb_addr_type, const boost::uint64_t) +{ + throw uhd::not_implemented_error("poke64 not implemented"); +} + +boost::uint64_t wb_iface::peek64(const wb_iface::wb_addr_type) +{ + throw uhd::not_implemented_error("peek64 not implemented"); +} + +void wb_iface::poke32(const wb_iface::wb_addr_type, const boost::uint32_t) +{ + throw uhd::not_implemented_error("poke32 not implemented"); +} + +boost::uint32_t wb_iface::peek32(const wb_iface::wb_addr_type) +{ + throw uhd::not_implemented_error("peek32 not implemented"); +} + +void wb_iface::poke16(const wb_iface::wb_addr_type, const boost::uint16_t) +{ + throw uhd::not_implemented_error("poke16 not implemented"); +} + +boost::uint16_t wb_iface::peek16(const wb_iface::wb_addr_type) +{ + throw uhd::not_implemented_error("peek16 not implemented"); +} diff --git a/host/lib/usrp/b100/b100_impl.hpp b/host/lib/usrp/b100/b100_impl.hpp index f81aa3568..ab83c80a3 100644 --- a/host/lib/usrp/b100/b100_impl.hpp +++ b/host/lib/usrp/b100/b100_impl.hpp @@ -67,7 +67,7 @@ static const std::string B100_EEPROM_MAP_KEY = "B100"; //! Make a b100 dboard interface uhd::usrp::dboard_iface::sptr make_b100_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, b100_clock_ctrl::sptr clock, diff --git a/host/lib/usrp/b200/b200_impl.hpp b/host/lib/usrp/b200/b200_impl.hpp index 818906e60..eced4a539 100644 --- a/host/lib/usrp/b200/b200_impl.hpp +++ b/host/lib/usrp/b200/b200_impl.hpp @@ -132,8 +132,8 @@ struct b200_impl : public uhd::device boost::shared_ptr _async_task_data; void handle_async_task(uhd::transport::zero_copy_if::sptr, boost::shared_ptr); - void register_loopback_self_test(wb_iface::sptr iface); - void codec_loopback_self_test(wb_iface::sptr iface); + void register_loopback_self_test(uhd::wb_iface::sptr iface); + void codec_loopback_self_test(uhd::wb_iface::sptr iface); void set_mb_eeprom(const uhd::usrp::mboard_eeprom_t &); void check_fw_compat(void); void check_fpga_compat(void); diff --git a/host/lib/usrp/common/fifo_ctrl_excelsior.hpp b/host/lib/usrp/common/fifo_ctrl_excelsior.hpp index c3ef65a2c..bd7777ffa 100644 --- a/host/lib/usrp/common/fifo_ctrl_excelsior.hpp +++ b/host/lib/usrp/common/fifo_ctrl_excelsior.hpp @@ -24,7 +24,7 @@ #include #include #include -#include "wb_iface.hpp" +#include #include @@ -40,7 +40,8 @@ struct fifo_ctrl_excelsior_config /*! * Provide access to peek, poke, spi, and async messages. */ -class fifo_ctrl_excelsior : public wb_iface, public uhd::spi_iface{ +class fifo_ctrl_excelsior : public uhd::wb_iface, public uhd::spi_iface +{ public: typedef boost::shared_ptr sptr; diff --git a/host/lib/usrp/cores/CMakeLists.txt b/host/lib/usrp/cores/CMakeLists.txt index f526319bc..f28ae040f 100644 --- a/host/lib/usrp/cores/CMakeLists.txt +++ b/host/lib/usrp/cores/CMakeLists.txt @@ -22,7 +22,6 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) LIBUHD_APPEND_SOURCES( - ${CMAKE_CURRENT_SOURCE_DIR}/wb_iface.cpp ${CMAKE_CURRENT_SOURCE_DIR}/gpio_core_200.cpp ${CMAKE_CURRENT_SOURCE_DIR}/i2c_core_100.cpp ${CMAKE_CURRENT_SOURCE_DIR}/i2c_core_200.cpp diff --git a/host/lib/usrp/cores/gpio_core_200.hpp b/host/lib/usrp/cores/gpio_core_200.hpp index a3edf5454..15fe5f2dd 100644 --- a/host/lib/usrp/cores/gpio_core_200.hpp +++ b/host/lib/usrp/cores/gpio_core_200.hpp @@ -23,7 +23,7 @@ #include #include #include -#include "wb_iface.hpp" +#include class gpio_core_200 : boost::noncopyable{ public: @@ -33,7 +33,7 @@ public: typedef uhd::usrp::dboard_iface::atr_reg_t atr_reg_t; //! makes a new GPIO core from iface and slave base - static sptr make(wb_iface::sptr iface, const size_t base, const size_t rb_addr); + static sptr make(uhd::wb_iface::sptr iface, const size_t base, const size_t rb_addr); //! 1 = ATR virtual void set_pin_ctrl(const unit_t unit, const boost::uint16_t value) = 0; @@ -56,7 +56,7 @@ public: typedef uhd::usrp::dboard_iface::atr_reg_t atr_reg_t; - static sptr make(wb_iface::sptr iface, const size_t); + static sptr make(uhd::wb_iface::sptr iface, const size_t); virtual void set_atr_reg(const atr_reg_t atr, const boost::uint32_t value) = 0; diff --git a/host/lib/usrp/cores/i2c_core_100.hpp b/host/lib/usrp/cores/i2c_core_100.hpp index f7a5ae4f7..4e7a2874b 100644 --- a/host/lib/usrp/cores/i2c_core_100.hpp +++ b/host/lib/usrp/cores/i2c_core_100.hpp @@ -22,14 +22,14 @@ #include #include #include -#include "wb_iface.hpp" +#include class i2c_core_100 : boost::noncopyable, public uhd::i2c_iface{ public: typedef boost::shared_ptr sptr; //! makes a new i2c core from iface and slave base - static sptr make(wb_iface::sptr iface, const size_t base); + static sptr make(uhd::wb_iface::sptr iface, const size_t base); }; #endif /* INCLUDED_LIBUHD_USRP_I2C_CORE_100_HPP */ diff --git a/host/lib/usrp/cores/i2c_core_100_wb32.hpp b/host/lib/usrp/cores/i2c_core_100_wb32.hpp index f2ac98292..b5912ba9a 100644 --- a/host/lib/usrp/cores/i2c_core_100_wb32.hpp +++ b/host/lib/usrp/cores/i2c_core_100_wb32.hpp @@ -22,14 +22,14 @@ #include #include #include -#include "wb_iface.hpp" +#include class i2c_core_100_wb32 : boost::noncopyable, public uhd::i2c_iface{ public: typedef boost::shared_ptr sptr; //! makes a new i2c core from iface and slave base - static sptr make(wb_iface::sptr iface, const size_t base); + static sptr make(uhd::wb_iface::sptr iface, const size_t base); virtual void set_clock_rate(const double rate) = 0; }; diff --git a/host/lib/usrp/cores/i2c_core_200.hpp b/host/lib/usrp/cores/i2c_core_200.hpp index 508855985..1b20455d3 100644 --- a/host/lib/usrp/cores/i2c_core_200.hpp +++ b/host/lib/usrp/cores/i2c_core_200.hpp @@ -22,14 +22,14 @@ #include #include #include -#include "wb_iface.hpp" +#include class i2c_core_200 : boost::noncopyable, public uhd::i2c_iface{ public: typedef boost::shared_ptr sptr; //! makes a new i2c core from iface and slave base - static sptr make(wb_iface::sptr iface, const size_t base, const size_t readback); + static sptr make(uhd::wb_iface::sptr iface, const size_t base, const size_t readback); }; #endif /* INCLUDED_LIBUHD_USRP_I2C_CORE_200_HPP */ diff --git a/host/lib/usrp/cores/radio_ctrl_core_3000.hpp b/host/lib/usrp/cores/radio_ctrl_core_3000.hpp index 8c0548d89..a49ca2a4b 100644 --- a/host/lib/usrp/cores/radio_ctrl_core_3000.hpp +++ b/host/lib/usrp/cores/radio_ctrl_core_3000.hpp @@ -22,13 +22,13 @@ #include #include #include -#include "wb_iface.hpp" +#include #include /*! * Provide access to peek, poke for the radio ctrl module */ -class radio_ctrl_core_3000 : public wb_iface +class radio_ctrl_core_3000 : public uhd::wb_iface { public: typedef boost::shared_ptr sptr; diff --git a/host/lib/usrp/cores/rx_dsp_core_200.hpp b/host/lib/usrp/cores/rx_dsp_core_200.hpp index b01f751e9..3937df9e8 100644 --- a/host/lib/usrp/cores/rx_dsp_core_200.hpp +++ b/host/lib/usrp/cores/rx_dsp_core_200.hpp @@ -24,7 +24,7 @@ #include #include #include -#include "wb_iface.hpp" +#include #include class rx_dsp_core_200 : boost::noncopyable{ @@ -32,7 +32,7 @@ public: typedef boost::shared_ptr sptr; static sptr make( - wb_iface::sptr iface, + uhd::wb_iface::sptr iface, const size_t dsp_base, const size_t ctrl_base, const boost::uint32_t sid, const bool lingering_packet = false ); diff --git a/host/lib/usrp/cores/rx_dsp_core_3000.hpp b/host/lib/usrp/cores/rx_dsp_core_3000.hpp index 23b12b9b7..02e5587a2 100644 --- a/host/lib/usrp/cores/rx_dsp_core_3000.hpp +++ b/host/lib/usrp/cores/rx_dsp_core_3000.hpp @@ -24,7 +24,7 @@ #include #include #include -#include "wb_iface.hpp" +#include #include class rx_dsp_core_3000 : boost::noncopyable{ @@ -32,7 +32,7 @@ public: typedef boost::shared_ptr sptr; static sptr make( - wb_iface::sptr iface, + uhd::wb_iface::sptr iface, const size_t dsp_base ); diff --git a/host/lib/usrp/cores/rx_frontend_core_200.cpp b/host/lib/usrp/cores/rx_frontend_core_200.cpp index 1813758da..09b36c1a6 100644 --- a/host/lib/usrp/cores/rx_frontend_core_200.cpp +++ b/host/lib/usrp/cores/rx_frontend_core_200.cpp @@ -18,6 +18,8 @@ #include "rx_frontend_core_200.hpp" #include +using namespace uhd; + #define REG_RX_FE_SWAP_IQ _base + 0 //lower bit #define REG_RX_FE_MAG_CORRECTION _base + 4 //18 bits #define REG_RX_FE_PHASE_CORRECTION _base + 8 //18 bits diff --git a/host/lib/usrp/cores/rx_frontend_core_200.hpp b/host/lib/usrp/cores/rx_frontend_core_200.hpp index 5755424c8..8327aef8b 100644 --- a/host/lib/usrp/cores/rx_frontend_core_200.hpp +++ b/host/lib/usrp/cores/rx_frontend_core_200.hpp @@ -21,7 +21,7 @@ #include #include #include -#include "wb_iface.hpp" +#include #include #include @@ -29,7 +29,7 @@ class rx_frontend_core_200 : boost::noncopyable{ public: typedef boost::shared_ptr sptr; - static sptr make(wb_iface::sptr iface, const size_t base); + static sptr make(uhd::wb_iface::sptr iface, const size_t base); virtual void set_mux(const bool swap) = 0; diff --git a/host/lib/usrp/cores/rx_vita_core_3000.hpp b/host/lib/usrp/cores/rx_vita_core_3000.hpp index b011a7388..577510728 100644 --- a/host/lib/usrp/cores/rx_vita_core_3000.hpp +++ b/host/lib/usrp/cores/rx_vita_core_3000.hpp @@ -24,7 +24,7 @@ #include #include #include -#include "wb_iface.hpp" +#include #include class rx_vita_core_3000 : boost::noncopyable @@ -33,7 +33,7 @@ public: typedef boost::shared_ptr sptr; static sptr make( - wb_iface::sptr iface, + uhd::wb_iface::sptr iface, const size_t base ); diff --git a/host/lib/usrp/cores/spi_core_100.hpp b/host/lib/usrp/cores/spi_core_100.hpp index 87d328aaa..ce53c0b86 100644 --- a/host/lib/usrp/cores/spi_core_100.hpp +++ b/host/lib/usrp/cores/spi_core_100.hpp @@ -22,14 +22,14 @@ #include #include #include -#include "wb_iface.hpp" +#include class spi_core_100 : boost::noncopyable, public uhd::spi_iface{ public: typedef boost::shared_ptr sptr; //! makes a new spi core from iface and slave base - static sptr make(wb_iface::sptr iface, const size_t base); + static sptr make(uhd::wb_iface::sptr iface, const size_t base); }; #endif /* INCLUDED_LIBUHD_USRP_SPI_CORE_100_HPP */ diff --git a/host/lib/usrp/cores/spi_core_3000.hpp b/host/lib/usrp/cores/spi_core_3000.hpp index 995ad59db..923efed3d 100644 --- a/host/lib/usrp/cores/spi_core_3000.hpp +++ b/host/lib/usrp/cores/spi_core_3000.hpp @@ -22,7 +22,7 @@ #include #include #include -#include "wb_iface.hpp" +#include class spi_core_3000 : boost::noncopyable, public uhd::spi_iface { @@ -30,7 +30,7 @@ public: typedef boost::shared_ptr sptr; //! makes a new spi core from iface and slave base - static sptr make(wb_iface::sptr iface, const size_t base, const size_t readback); + static sptr make(uhd::wb_iface::sptr iface, const size_t base, const size_t readback); //! Set the spi clock divider to something usable virtual void set_divider(const double div) = 0; diff --git a/host/lib/usrp/cores/time64_core_200.hpp b/host/lib/usrp/cores/time64_core_200.hpp index 315f2ba67..e211ce040 100644 --- a/host/lib/usrp/cores/time64_core_200.hpp +++ b/host/lib/usrp/cores/time64_core_200.hpp @@ -22,7 +22,7 @@ #include #include #include -#include "wb_iface.hpp" +#include #include #include @@ -37,7 +37,7 @@ public: //! makes a new time64 core from iface and slave base static sptr make( - wb_iface::sptr iface, const size_t base, + uhd::wb_iface::sptr iface, const size_t base, const readback_bases_type &readback_bases, const size_t mimo_delay_cycles = 0 // 0 means no-mimo ); diff --git a/host/lib/usrp/cores/time_core_3000.hpp b/host/lib/usrp/cores/time_core_3000.hpp index ffe2f4133..fad408810 100644 --- a/host/lib/usrp/cores/time_core_3000.hpp +++ b/host/lib/usrp/cores/time_core_3000.hpp @@ -22,7 +22,7 @@ #include #include #include -#include "wb_iface.hpp" +#include class time_core_3000 : boost::noncopyable { @@ -37,7 +37,7 @@ public: //! makes a new time core from iface and slave base static sptr make( - wb_iface::sptr iface, const size_t base, + uhd::wb_iface::sptr iface, const size_t base, const readback_bases_type &readback_bases ); diff --git a/host/lib/usrp/cores/tx_dsp_core_200.hpp b/host/lib/usrp/cores/tx_dsp_core_200.hpp index 0e1cfb6bc..ce3d1dbdd 100644 --- a/host/lib/usrp/cores/tx_dsp_core_200.hpp +++ b/host/lib/usrp/cores/tx_dsp_core_200.hpp @@ -23,14 +23,14 @@ #include #include #include -#include "wb_iface.hpp" +#include class tx_dsp_core_200 : boost::noncopyable{ public: typedef boost::shared_ptr sptr; static sptr make( - wb_iface::sptr iface, + uhd::wb_iface::sptr iface, const size_t dsp_base, const size_t ctrl_base, const boost::uint32_t sid ); diff --git a/host/lib/usrp/cores/tx_dsp_core_3000.hpp b/host/lib/usrp/cores/tx_dsp_core_3000.hpp index eb5ffaf0f..6f725b836 100644 --- a/host/lib/usrp/cores/tx_dsp_core_3000.hpp +++ b/host/lib/usrp/cores/tx_dsp_core_3000.hpp @@ -23,14 +23,14 @@ #include #include #include -#include "wb_iface.hpp" +#include class tx_dsp_core_3000 : boost::noncopyable{ public: typedef boost::shared_ptr sptr; static sptr make( - wb_iface::sptr iface, + uhd::wb_iface::sptr iface, const size_t dsp_base ); diff --git a/host/lib/usrp/cores/tx_frontend_core_200.cpp b/host/lib/usrp/cores/tx_frontend_core_200.cpp index e35874173..d701027e5 100644 --- a/host/lib/usrp/cores/tx_frontend_core_200.cpp +++ b/host/lib/usrp/cores/tx_frontend_core_200.cpp @@ -21,6 +21,8 @@ #include #include +using namespace uhd; + #define REG_TX_FE_DC_OFFSET_I _base + 0 //24 bits #define REG_TX_FE_DC_OFFSET_Q _base + 4 //24 bits #define REG_TX_FE_MAG_CORRECTION _base + 8 //18 bits diff --git a/host/lib/usrp/cores/tx_frontend_core_200.hpp b/host/lib/usrp/cores/tx_frontend_core_200.hpp index 8ee0f3e6d..7d09b39d2 100644 --- a/host/lib/usrp/cores/tx_frontend_core_200.hpp +++ b/host/lib/usrp/cores/tx_frontend_core_200.hpp @@ -21,7 +21,7 @@ #include #include #include -#include "wb_iface.hpp" +#include #include #include @@ -29,7 +29,7 @@ class tx_frontend_core_200 : boost::noncopyable{ public: typedef boost::shared_ptr sptr; - static sptr make(wb_iface::sptr iface, const size_t base); + static sptr make(uhd::wb_iface::sptr iface, const size_t base); virtual void set_mux(const std::string &mode) = 0; diff --git a/host/lib/usrp/cores/tx_vita_core_3000.hpp b/host/lib/usrp/cores/tx_vita_core_3000.hpp index 2070936ce..d4677a3e3 100644 --- a/host/lib/usrp/cores/tx_vita_core_3000.hpp +++ b/host/lib/usrp/cores/tx_vita_core_3000.hpp @@ -24,7 +24,7 @@ #include #include #include -#include "wb_iface.hpp" +#include #include class tx_vita_core_3000 : boost::noncopyable @@ -33,7 +33,7 @@ public: typedef boost::shared_ptr sptr; static sptr make( - wb_iface::sptr iface, + uhd::wb_iface::sptr iface, const size_t base ); diff --git a/host/lib/usrp/cores/user_settings_core_200.cpp b/host/lib/usrp/cores/user_settings_core_200.cpp index d262631b1..391725edc 100644 --- a/host/lib/usrp/cores/user_settings_core_200.cpp +++ b/host/lib/usrp/cores/user_settings_core_200.cpp @@ -17,6 +17,8 @@ #include "user_settings_core_200.hpp" +using namespace uhd; + #define REG_USER_ADDR _base + 0 #define REG_USER_DATA _base + 4 diff --git a/host/lib/usrp/cores/user_settings_core_200.hpp b/host/lib/usrp/cores/user_settings_core_200.hpp index 1f5d13de7..f5fca2ce6 100644 --- a/host/lib/usrp/cores/user_settings_core_200.hpp +++ b/host/lib/usrp/cores/user_settings_core_200.hpp @@ -21,14 +21,14 @@ #include #include #include -#include "wb_iface.hpp" +#include class user_settings_core_200 : boost::noncopyable{ public: typedef boost::shared_ptr sptr; typedef std::pair user_reg_t; - static sptr make(wb_iface::sptr iface, const size_t base); + static sptr make(uhd::wb_iface::sptr iface, const size_t base); virtual void set_reg(const user_reg_t ®) = 0; }; diff --git a/host/lib/usrp/cores/wb_iface.cpp b/host/lib/usrp/cores/wb_iface.cpp deleted file mode 100644 index 9aa6d18d4..000000000 --- a/host/lib/usrp/cores/wb_iface.cpp +++ /dev/null @@ -1,51 +0,0 @@ -// -// Copyright 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 -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . -// - -#include "wb_iface.hpp" -#include - -using namespace uhd; - -void wb_iface::poke64(const wb_iface::wb_addr_type, const boost::uint64_t) -{ - throw uhd::not_implemented_error("poke64 not implemented"); -} - -boost::uint64_t wb_iface::peek64(const wb_iface::wb_addr_type) -{ - throw uhd::not_implemented_error("peek64 not implemented"); -} - -void wb_iface::poke32(const wb_iface::wb_addr_type, const boost::uint32_t) -{ - throw uhd::not_implemented_error("poke32 not implemented"); -} - -boost::uint32_t wb_iface::peek32(const wb_iface::wb_addr_type) -{ - throw uhd::not_implemented_error("peek32 not implemented"); -} - -void wb_iface::poke16(const wb_iface::wb_addr_type, const boost::uint16_t) -{ - throw uhd::not_implemented_error("poke16 not implemented"); -} - -boost::uint16_t wb_iface::peek16(const wb_iface::wb_addr_type) -{ - throw uhd::not_implemented_error("peek16 not implemented"); -} diff --git a/host/lib/usrp/cores/wb_iface.hpp b/host/lib/usrp/cores/wb_iface.hpp deleted file mode 100644 index 197788180..000000000 --- a/host/lib/usrp/cores/wb_iface.hpp +++ /dev/null @@ -1,75 +0,0 @@ -// -// Copyright 2011-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 -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . -// - -#ifndef INCLUDED_LIBUHD_USRP_WB_IFACE_HPP -#define INCLUDED_LIBUHD_USRP_WB_IFACE_HPP - -#include -#include -#include - -class /*UHD_API*/ wb_iface -{ -public: - typedef boost::shared_ptr sptr; - typedef boost::uint32_t wb_addr_type; - - /*! - * Write a register (64 bits) - * \param addr the address - * \param data the 64bit data - */ - virtual void poke64(const wb_addr_type addr, const boost::uint64_t data); - - /*! - * Read a register (64 bits) - * \param addr the address - * \return the 64bit data - */ - virtual boost::uint64_t peek64(const wb_addr_type addr); - - /*! - * Write a register (32 bits) - * \param addr the address - * \param data the 32bit data - */ - virtual void poke32(const wb_addr_type addr, const boost::uint32_t data); - - /*! - * Read a register (32 bits) - * \param addr the address - * \return the 32bit data - */ - virtual boost::uint32_t peek32(const wb_addr_type addr); - - /*! - * Write a register (16 bits) - * \param addr the address - * \param data the 16bit data - */ - virtual void poke16(const wb_addr_type addr, const boost::uint16_t data); - - /*! - * Read a register (16 bits) - * \param addr the address - * \return the 16bit data - */ - virtual boost::uint16_t peek16(const wb_addr_type addr); - -}; - -#endif /* INCLUDED_LIBUHD_USRP_WB_IFACE_HPP */ diff --git a/host/lib/usrp/e100/e100_impl.hpp b/host/lib/usrp/e100/e100_impl.hpp index 6f64d4b80..813f9cc8f 100644 --- a/host/lib/usrp/e100/e100_impl.hpp +++ b/host/lib/usrp/e100/e100_impl.hpp @@ -61,7 +61,7 @@ extern void e100_load_fpga(const std::string &bin_file); //! Make an e100 dboard interface uhd::usrp::dboard_iface::sptr make_e100_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, e100_clock_ctrl::sptr clock, diff --git a/host/lib/usrp/usrp1/usrp1_iface.hpp b/host/lib/usrp/usrp1/usrp1_iface.hpp index 4612d7912..7fc943190 100644 --- a/host/lib/usrp/usrp1/usrp1_iface.hpp +++ b/host/lib/usrp/usrp1/usrp1_iface.hpp @@ -1,5 +1,5 @@ // -// Copyright 2010-2011 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 @@ -19,7 +19,7 @@ #define INCLUDED_USRP1_IFACE_HPP #include "fx2_ctrl.hpp" -#include "wb_iface.hpp" +#include #include #include #include @@ -42,7 +42,8 @@ * Provides a set of functions to implementation layer. * Including spi, peek, poke, control... */ -class usrp1_iface : public wb_iface, public uhd::i2c_iface, public uhd::spi_iface, boost::noncopyable{ +class usrp1_iface : public uhd::wb_iface, public uhd::i2c_iface, public uhd::spi_iface, boost::noncopyable +{ public: typedef boost::shared_ptr sptr; 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 #include #include -#include "wb_iface.hpp" +#include #include /*! * 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 sptr; 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 #include #include "usrp2_regs.hpp" -#include "wb_iface.hpp" +#include #include /*! @@ -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 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; -- cgit v1.2.3