From ccf1d5c5e5f5c20ff77f45da3295b9dd5bdb6272 Mon Sep 17 00:00:00 2001 From: michael-west Date: Thu, 2 Apr 2015 10:51:27 -0700 Subject: uhd: Add ability to get and set command time through dboard_iface. This creates a wb_iface child class called timed_wb_iface, which adds support for timed commands. --- host/lib/usrp/e100/dboard_iface.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'host/lib/usrp/e100') diff --git a/host/lib/usrp/e100/dboard_iface.cpp b/host/lib/usrp/e100/dboard_iface.cpp index 07d0049c8..42d1733ab 100644 --- a/host/lib/usrp/e100/dboard_iface.cpp +++ b/host/lib/usrp/e100/dboard_iface.cpp @@ -72,6 +72,8 @@ public: void _set_gpio_out(unit_t, boost::uint16_t); void set_gpio_debug(unit_t, int); boost::uint16_t read_gpio(unit_t); + void set_command_time(const uhd::time_spec_t& t); + uhd::time_spec_t get_command_time(void); void write_i2c(boost::uint16_t, const byte_vector_t &); byte_vector_t read_i2c(boost::uint16_t, size_t); @@ -256,3 +258,13 @@ double e100_dboard_iface::read_aux_adc(dboard_iface::unit_t unit, aux_adc_t whic ; return _codec->read_aux_adc(unit_to_which_to_aux_adc[unit][which]); } + +uhd::time_spec_t e100_dboard_iface::get_command_time() +{ + return _wb_iface->get_time(); +} + +void e100_dboard_iface::set_command_time(const uhd::time_spec_t& t) +{ + _wb_iface->set_time(t); +} -- cgit v1.2.3 From 65a1b6d7f422a657d828f2080347ffebc4a99ead Mon Sep 17 00:00:00 2001 From: michael-west Date: Thu, 2 Apr 2015 14:57:19 -0700 Subject: e100: Support command time access through dboard_iface. --- host/lib/usrp/e100/dboard_iface.cpp | 8 ++++---- host/lib/usrp/e100/e100_impl.hpp | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'host/lib/usrp/e100') diff --git a/host/lib/usrp/e100/dboard_iface.cpp b/host/lib/usrp/e100/dboard_iface.cpp index 42d1733ab..b5baf6c56 100644 --- a/host/lib/usrp/e100/dboard_iface.cpp +++ b/host/lib/usrp/e100/dboard_iface.cpp @@ -1,5 +1,5 @@ // -// Copyright 2010-2011 Ettus Research LLC +// Copyright 2010-2011,2015 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 @@ -34,7 +34,7 @@ class e100_dboard_iface : public dboard_iface{ public: e100_dboard_iface( - wb_iface::sptr wb_iface, + timed_wb_iface::sptr wb_iface, i2c_iface::sptr i2c_iface, spi_iface::sptr spi_iface, e100_clock_ctrl::sptr clock, @@ -99,7 +99,7 @@ public: double get_codec_rate(unit_t); private: - wb_iface::sptr _wb_iface; + timed_wb_iface::sptr _wb_iface; i2c_iface::sptr _i2c_iface; spi_iface::sptr _spi_iface; e100_clock_ctrl::sptr _clock; @@ -111,7 +111,7 @@ private: * Make Function **********************************************************************/ dboard_iface::sptr make_e100_dboard_iface( - wb_iface::sptr wb_iface, + timed_wb_iface::sptr wb_iface, i2c_iface::sptr i2c_iface, spi_iface::sptr spi_iface, e100_clock_ctrl::sptr clock, diff --git a/host/lib/usrp/e100/e100_impl.hpp b/host/lib/usrp/e100/e100_impl.hpp index 0838bd8c4..4efc21427 100644 --- a/host/lib/usrp/e100/e100_impl.hpp +++ b/host/lib/usrp/e100/e100_impl.hpp @@ -1,5 +1,5 @@ // -// Copyright 2010-2012,2014 Ettus Research LLC +// Copyright 2010-2012,2014-2015 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 @@ -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( - uhd::wb_iface::sptr wb_iface, + uhd::timed_wb_iface::sptr wb_iface, uhd::i2c_iface::sptr i2c_iface, uhd::spi_iface::sptr spi_iface, e100_clock_ctrl::sptr clock, -- cgit v1.2.3