diff options
Diffstat (limited to 'host/lib/usrp/b100')
-rw-r--r-- | host/lib/usrp/b100/b100_impl.cpp | 14 | ||||
-rw-r--r-- | host/lib/usrp/b100/b100_impl.hpp | 3 | ||||
-rw-r--r-- | host/lib/usrp/b100/clock_ctrl.cpp | 6 | ||||
-rw-r--r-- | host/lib/usrp/b100/clock_ctrl.hpp | 7 | ||||
-rw-r--r-- | host/lib/usrp/b100/codec_ctrl.cpp | 6 | ||||
-rw-r--r-- | host/lib/usrp/b100/codec_ctrl.hpp | 6 | ||||
-rw-r--r-- | host/lib/usrp/b100/usb_zero_copy_wrapper.cpp | 3 |
7 files changed, 32 insertions, 13 deletions
diff --git a/host/lib/usrp/b100/b100_impl.cpp b/host/lib/usrp/b100/b100_impl.cpp index baf2b6ae3..24a87a3c8 100644 --- a/host/lib/usrp/b100/b100_impl.cpp +++ b/host/lib/usrp/b100/b100_impl.cpp @@ -1,5 +1,5 @@ // -// Copyright 2012-2013 Ettus Research LLC +// Copyright 2012-2014 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 @@ -137,7 +137,7 @@ static device::sptr b100_make(const device_addr_t &device_addr){ } UHD_STATIC_BLOCK(register_b100_device){ - device::register_device(&b100_find, &b100_make); + device::register_device(&b100_find, &b100_make, device::USRP); } /*********************************************************************** @@ -148,7 +148,9 @@ b100_impl::b100_impl(const device_addr_t &device_addr){ b100_impl_constructor_begin: initialization_count++; + _type = device::USRP; _tree = property_tree::make(); + _ignore_cal_file = device_addr.has_key("ignore-cal-file"); //extract the FPGA path for the B100 std::string b100_fpga_image = find_image_path( @@ -608,9 +610,13 @@ sensor_value_t b100_impl::get_ref_locked(void){ } void b100_impl::set_rx_fe_corrections(const double lo_freq){ - apply_rx_fe_corrections(this->get_tree()->subtree("/mboards/0"), "A", lo_freq); + if(not _ignore_cal_file){ + apply_rx_fe_corrections(this->get_tree()->subtree("/mboards/0"), "A", lo_freq); + } } void b100_impl::set_tx_fe_corrections(const double lo_freq){ - apply_tx_fe_corrections(this->get_tree()->subtree("/mboards/0"), "A", lo_freq); + if(not _ignore_cal_file){ + apply_tx_fe_corrections(this->get_tree()->subtree("/mboards/0"), "A", lo_freq); + } } diff --git a/host/lib/usrp/b100/b100_impl.hpp b/host/lib/usrp/b100/b100_impl.hpp index b6752681e..59ea2202e 100644 --- a/host/lib/usrp/b100/b100_impl.hpp +++ b/host/lib/usrp/b100/b100_impl.hpp @@ -1,5 +1,5 @@ // -// Copyright 2011-2013 Ettus Research LLC +// Copyright 2011-2014 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 @@ -127,6 +127,7 @@ private: //dboard stuff uhd::usrp::dboard_manager::sptr _dboard_manager; uhd::usrp::dboard_iface::sptr _dboard_iface; + bool _ignore_cal_file; std::vector<boost::weak_ptr<uhd::rx_streamer> > _rx_streamers; std::vector<boost::weak_ptr<uhd::tx_streamer> > _tx_streamers; diff --git a/host/lib/usrp/b100/clock_ctrl.cpp b/host/lib/usrp/b100/clock_ctrl.cpp index cbe6c40a0..febc8ba4b 100644 --- a/host/lib/usrp/b100/clock_ctrl.cpp +++ b/host/lib/usrp/b100/clock_ctrl.cpp @@ -1,5 +1,5 @@ // -// Copyright 2011 Ettus Research LLC +// Copyright 2011,2014 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 @@ -167,6 +167,10 @@ static clock_settings_type get_clock_settings(double rate){ ) % (rate/1e6))); } +b100_clock_ctrl::~b100_clock_ctrl(void) { + /* NOP */ +} + /*********************************************************************** * Clock Control Implementation **********************************************************************/ diff --git a/host/lib/usrp/b100/clock_ctrl.hpp b/host/lib/usrp/b100/clock_ctrl.hpp index 387892bf7..2ec4583d3 100644 --- a/host/lib/usrp/b100/clock_ctrl.hpp +++ b/host/lib/usrp/b100/clock_ctrl.hpp @@ -1,5 +1,5 @@ // -// Copyright 2011 Ettus Research LLC +// Copyright 2011,2014 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 @@ -24,14 +24,15 @@ #include <vector> /*! - * The usrp-e clock control: - * - Setup system clocks. + * The B100 clock control: * - Disable/enable clock lines. */ class b100_clock_ctrl : boost::noncopyable{ public: typedef boost::shared_ptr<b100_clock_ctrl> sptr; + virtual ~b100_clock_ctrl(void) = 0; + /*! * Make a new clock control object. * \param iface the controller iface object diff --git a/host/lib/usrp/b100/codec_ctrl.cpp b/host/lib/usrp/b100/codec_ctrl.cpp index 278713ce1..04fbebded 100644 --- a/host/lib/usrp/b100/codec_ctrl.cpp +++ b/host/lib/usrp/b100/codec_ctrl.cpp @@ -1,5 +1,5 @@ // -// Copyright 2011 Ettus Research LLC +// Copyright 2011,2014 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 @@ -33,6 +33,10 @@ using namespace uhd; const gain_range_t b100_codec_ctrl::tx_pga_gain_range(-20, 0, double(0.1)); const gain_range_t b100_codec_ctrl::rx_pga_gain_range(0, 20, 1); +b100_codec_ctrl::~b100_codec_ctrl(void){ + /* NOP */ +} + /*********************************************************************** * Codec Control Implementation **********************************************************************/ diff --git a/host/lib/usrp/b100/codec_ctrl.hpp b/host/lib/usrp/b100/codec_ctrl.hpp index 1f7bdef09..78e4ea827 100644 --- a/host/lib/usrp/b100/codec_ctrl.hpp +++ b/host/lib/usrp/b100/codec_ctrl.hpp @@ -1,5 +1,5 @@ // -// Copyright 2011 Ettus Research LLC +// Copyright 2011,2014 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 @@ -24,7 +24,7 @@ #include <boost/utility.hpp> /*! - * The usrp-e codec control: + * The B100 codec control: * - Init/power down codec. * - Read aux adc, write aux dac. */ @@ -35,6 +35,8 @@ public: static const uhd::gain_range_t tx_pga_gain_range; static const uhd::gain_range_t rx_pga_gain_range; + virtual ~b100_codec_ctrl(void) = 0; + /*! * Make a new codec control object. * \param iface the usrp_e iface object diff --git a/host/lib/usrp/b100/usb_zero_copy_wrapper.cpp b/host/lib/usrp/b100/usb_zero_copy_wrapper.cpp index 451cdae50..d646fcc94 100644 --- a/host/lib/usrp/b100/usb_zero_copy_wrapper.cpp +++ b/host/lib/usrp/b100/usb_zero_copy_wrapper.cpp @@ -55,6 +55,7 @@ public: index++; //advances the caller's buffer //hold a copy of the buffer shared pointer + UHD_ASSERT_THROW(not _mrb); _mrb = mrb; //extract this packet's memory address and length in bytes @@ -199,7 +200,7 @@ public: } size_t get_num_recv_frames(void) const{ - return _internal_zc->get_num_recv_frames(); + return (_internal_zc->get_num_recv_frames()*_internal_zc->get_recv_frame_size())/this->get_recv_frame_size(); } size_t get_recv_frame_size(void) const{ |