diff options
author | Nick Foster <nick@nerdnetworks.org> | 2010-10-05 11:13:25 -0700 |
---|---|---|
committer | Nick Foster <nick@nerdnetworks.org> | 2010-10-05 11:14:45 -0700 |
commit | e4d088fa9169eef81473cb7d83bda7c82bc5d243 (patch) | |
tree | 0798f4c0863bcb27ff4164f9e2fcc2ccd7bf80d3 /host/lib/usrp/usrp1/dboard_iface.cpp | |
parent | 6dd502737bcf6e59933be01720672db9a496803b (diff) | |
parent | bd3bd0dfbc1a87af5839c9b23450434cfb9c763c (diff) | |
download | uhd-e4d088fa9169eef81473cb7d83bda7c82bc5d243.tar.gz uhd-e4d088fa9169eef81473cb7d83bda7c82bc5d243.tar.bz2 uhd-e4d088fa9169eef81473cb7d83bda7c82bc5d243.zip |
Merge branch 'master' of ettus.sourcerepo.com:ettus/uhdpriv into usrp2p
Conflicts:
host/lib/ic_reg_maps/CMakeLists.txt
host/lib/usrp/usrp2/io_impl.cpp
Diffstat (limited to 'host/lib/usrp/usrp1/dboard_iface.cpp')
-rw-r--r-- | host/lib/usrp/usrp1/dboard_iface.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/host/lib/usrp/usrp1/dboard_iface.cpp b/host/lib/usrp/usrp1/dboard_iface.cpp index 4791b55ce..1ac15a46a 100644 --- a/host/lib/usrp/usrp1/dboard_iface.cpp +++ b/host/lib/usrp/usrp1/dboard_iface.cpp @@ -32,6 +32,8 @@ using namespace uhd; using namespace uhd::usrp; using namespace boost::assign; +static const dboard_id_t tvrx_id(0x0040); + class usrp1_dboard_iface : public dboard_iface { public: @@ -51,6 +53,10 @@ public: //init the clock rate shadows this->set_clock_rate(UNIT_RX, this->get_clock_rates(UNIT_RX).front()); this->set_clock_rate(UNIT_TX, this->get_clock_rates(UNIT_TX).front()); + + //yes this is evil but it's necessary for TVRX to work on USRP1 + if(_rx_dboard_id == tvrx_id) _codec->bypass_adc_buffers(false); + //else _codec->bypass_adc_buffers(false); //don't think this is necessary } ~usrp1_dboard_iface() @@ -93,6 +99,7 @@ public: std::vector<double> get_clock_rates(unit_t); double get_clock_rate(unit_t); void set_clock_enabled(unit_t, bool); + double get_codec_rate(unit_t); private: usrp1_iface::sptr _iface; @@ -170,6 +177,10 @@ void usrp1_dboard_iface::set_clock_enabled(unit_t, bool) //TODO we can only enable for special case anyway... } +double usrp1_dboard_iface::get_codec_rate(unit_t){ + return _clock->get_master_clock_freq(); +} + /*********************************************************************** * GPIO **********************************************************************/ |