diff options
author | Ashish Chaudhari <ashish@ettus.com> | 2016-05-06 12:21:41 -0700 |
---|---|---|
committer | Ashish Chaudhari <ashish@ettus.com> | 2016-05-16 11:52:06 -0700 |
commit | 36075f38e6c8b4f641ba3d1fd97cfd72dcc05e7b (patch) | |
tree | 694ac18f5eaf6e10cfa1c664e31a66a99535acce /host | |
parent | 1c9aea4e15d7e68be56529b78050910ca73b8d0e (diff) | |
download | uhd-36075f38e6c8b4f641ba3d1fd97cfd72dcc05e7b.tar.gz uhd-36075f38e6c8b4f641ba3d1fd97cfd72dcc05e7b.tar.bz2 uhd-36075f38e6c8b4f641ba3d1fd97cfd72dcc05e7b.zip |
dboard_iface: Added FE name input to set_fe_connection
- A dboard_base class can have multiple frontends (subdevs) and
the set_fe_connection needs to be able to distinguish between them
Diffstat (limited to 'host')
-rw-r--r-- | host/include/uhd/usrp/dboard_iface.hpp | 9 | ||||
-rw-r--r-- | host/lib/usrp/b100/dboard_iface.cpp | 6 | ||||
-rw-r--r-- | host/lib/usrp/e100/dboard_iface.cpp | 6 | ||||
-rw-r--r-- | host/lib/usrp/usrp1/dboard_iface.cpp | 6 | ||||
-rw-r--r-- | host/lib/usrp/usrp2/dboard_iface.cpp | 6 | ||||
-rw-r--r-- | host/lib/usrp/x300/x300_dboard_iface.cpp | 12 |
6 files changed, 28 insertions, 17 deletions
diff --git a/host/include/uhd/usrp/dboard_iface.hpp b/host/include/uhd/usrp/dboard_iface.hpp index add22ffa3..52d226004 100644 --- a/host/include/uhd/usrp/dboard_iface.hpp +++ b/host/include/uhd/usrp/dboard_iface.hpp @@ -1,5 +1,5 @@ // -// Copyright 2010-2013 Ettus Research LLC +// Copyright 2010-2013,2015-2016 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 @@ -276,9 +276,14 @@ public: * Configure the front-end connection parameters. * * \param unit which unit rx or tx + * \param fe_name name of the front-end to update * \param fe_conn connection parameters class */ - virtual void set_fe_connection(unit_t unit, const uhd::usrp::fe_connection_t& fe_conn) = 0; + virtual void set_fe_connection( + unit_t unit, + const std::string& fe_name, + const uhd::usrp::fe_connection_t& fe_conn + ) = 0; /*! * Get the command time. diff --git a/host/lib/usrp/b100/dboard_iface.cpp b/host/lib/usrp/b100/dboard_iface.cpp index 73c97c104..9829f3f09 100644 --- a/host/lib/usrp/b100/dboard_iface.cpp +++ b/host/lib/usrp/b100/dboard_iface.cpp @@ -1,5 +1,5 @@ // -// Copyright 2011 Ettus Research LLC +// Copyright 2011,2015,2016 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 @@ -101,7 +101,7 @@ public: double get_clock_rate(unit_t); void set_clock_enabled(unit_t, bool); double get_codec_rate(unit_t); - void set_fe_connection(unit_t unit, const fe_connection_t& fe_conn); + void set_fe_connection(unit_t unit, const std::string&, const fe_connection_t& fe_conn); private: timed_wb_iface::sptr _wb_iface; @@ -288,7 +288,7 @@ uhd::time_spec_t b100_dboard_iface::get_command_time(void) return _wb_iface->get_time(); } -void b100_dboard_iface::set_fe_connection(unit_t, const fe_connection_t&) +void b100_dboard_iface::set_fe_connection(unit_t, const std::string&, const fe_connection_t&) { throw uhd::not_implemented_error("fe connection configuration support not implemented"); } diff --git a/host/lib/usrp/e100/dboard_iface.cpp b/host/lib/usrp/e100/dboard_iface.cpp index faa0ff7d4..ce0ac026b 100644 --- a/host/lib/usrp/e100/dboard_iface.cpp +++ b/host/lib/usrp/e100/dboard_iface.cpp @@ -1,5 +1,5 @@ // -// Copyright 2010-2011,2015 Ettus Research LLC +// Copyright 2010-2011,2015,2016 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 @@ -101,7 +101,7 @@ public: double get_clock_rate(unit_t); void set_clock_enabled(unit_t, bool); double get_codec_rate(unit_t); - void set_fe_connection(unit_t unit, const fe_connection_t& fe_conn); + void set_fe_connection(unit_t unit, const std::string&, const fe_connection_t& fe_conn); private: timed_wb_iface::sptr _wb_iface; @@ -288,7 +288,7 @@ void e100_dboard_iface::set_command_time(const uhd::time_spec_t& t) _wb_iface->set_time(t); } -void e100_dboard_iface::set_fe_connection(unit_t, const fe_connection_t&) +void e100_dboard_iface::set_fe_connection(unit_t, const std::string&, const fe_connection_t&) { throw uhd::not_implemented_error("fe connection configuration support not implemented"); } diff --git a/host/lib/usrp/usrp1/dboard_iface.cpp b/host/lib/usrp/usrp1/dboard_iface.cpp index b8d651694..5640e8dae 100644 --- a/host/lib/usrp/usrp1/dboard_iface.cpp +++ b/host/lib/usrp/usrp1/dboard_iface.cpp @@ -1,5 +1,5 @@ // -// Copyright 2010-2012 Ettus Research LLC +// Copyright 2010-2012,2015,2016 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 @@ -143,7 +143,7 @@ public: double get_clock_rate(unit_t); void set_clock_enabled(unit_t, bool); double get_codec_rate(unit_t); - void set_fe_connection(unit_t unit, const fe_connection_t& fe_conn); + void set_fe_connection(unit_t unit, const std::string&, const fe_connection_t& fe_conn); private: usrp1_iface::sptr _iface; @@ -500,7 +500,7 @@ uhd::time_spec_t usrp1_dboard_iface::get_command_time() throw uhd::not_implemented_error("timed command support not implemented"); } -void usrp1_dboard_iface::set_fe_connection(unit_t, const fe_connection_t&) +void usrp1_dboard_iface::set_fe_connection(unit_t, const std::string&, const fe_connection_t&) { throw uhd::not_implemented_error("fe connection configuration support not implemented"); } diff --git a/host/lib/usrp/usrp2/dboard_iface.cpp b/host/lib/usrp/usrp2/dboard_iface.cpp index b4066898e..a6ba1e0b7 100644 --- a/host/lib/usrp/usrp2/dboard_iface.cpp +++ b/host/lib/usrp/usrp2/dboard_iface.cpp @@ -1,5 +1,5 @@ // -// Copyright 2010-2012,2015 Ettus Research LLC +// Copyright 2010-2012,2015,2016 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 @@ -75,7 +75,7 @@ public: std::vector<double> get_clock_rates(unit_t); void set_clock_enabled(unit_t, bool); double get_codec_rate(unit_t); - void set_fe_connection(unit_t unit, const fe_connection_t& fe_conn); + void set_fe_connection(unit_t unit, const std::string&, const fe_connection_t& fe_conn); void write_spi( unit_t unit, @@ -353,7 +353,7 @@ void usrp2_dboard_iface::set_command_time(const uhd::time_spec_t& t) _wb_iface->set_time(t); } -void usrp2_dboard_iface::set_fe_connection(unit_t, const fe_connection_t&) +void usrp2_dboard_iface::set_fe_connection(unit_t, const std::string&, const fe_connection_t&) { throw uhd::not_implemented_error("fe connection configuration support not implemented"); } diff --git a/host/lib/usrp/x300/x300_dboard_iface.cpp b/host/lib/usrp/x300/x300_dboard_iface.cpp index 884848624..87f537874 100644 --- a/host/lib/usrp/x300/x300_dboard_iface.cpp +++ b/host/lib/usrp/x300/x300_dboard_iface.cpp @@ -1,5 +1,5 @@ // -// Copyright 2013,2015 Ettus Research LLC +// Copyright 2013,2015,2016 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 @@ -80,7 +80,11 @@ public: boost::uint32_t data, size_t num_bits ); - void set_fe_connection(unit_t unit, const fe_connection_t& fe_conn); + void set_fe_connection( + unit_t unit, + const std::string& fe_name, + const fe_connection_t& fe_conn + ); const x300_dboard_iface_config_t _config; uhd::dict<unit_t, ad5623_regs_t> _dac_regs; @@ -371,7 +375,9 @@ void x300_dboard_iface::set_command_time(const uhd::time_spec_t& t) _config.cmd_time_ctrl->set_time(t); } -void x300_dboard_iface::set_fe_connection(unit_t unit, const fe_connection_t& fe_conn) +void x300_dboard_iface::set_fe_connection( + unit_t unit, const std::string& /*fe_name*/, + const fe_connection_t& fe_conn) { if (unit == UNIT_RX) { _config.rx_dsp->set_mux(fe_conn); |