diff options
author | Josh Blum <josh@joshknows.com> | 2010-08-17 19:23:56 +0000 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2010-08-17 19:23:56 +0000 |
commit | 1e28ae518de1268efa370eb8b4b206b7d5a49b03 (patch) | |
tree | 3f989545009e168064987b3ef70c486c24a21c5b /host/lib | |
parent | 1aa1404ebb59594a8c81b31f9b56ad35bd832a26 (diff) | |
download | uhd-1e28ae518de1268efa370eb8b4b206b7d5a49b03.tar.gz uhd-1e28ae518de1268efa370eb8b4b206b7d5a49b03.tar.bz2 uhd-1e28ae518de1268efa370eb8b4b206b7d5a49b03.zip |
usrp-e: building off of next branch
Diffstat (limited to 'host/lib')
-rw-r--r-- | host/lib/usrp/usrp_e/clock_ctrl.cpp | 3 | ||||
-rw-r--r-- | host/lib/usrp/usrp_e/codec_impl.cpp | 28 | ||||
-rw-r--r-- | host/lib/usrp/usrp_e/dboard_iface.cpp | 7 | ||||
-rw-r--r-- | host/lib/usrp/usrp_e/dboard_impl.cpp | 10 | ||||
-rw-r--r-- | host/lib/usrp/usrp_e/dsp_impl.cpp | 3 | ||||
-rw-r--r-- | host/lib/usrp/usrp_e/io_impl.cpp | 2 | ||||
-rw-r--r-- | host/lib/usrp/usrp_e/mboard_impl.cpp | 16 | ||||
-rw-r--r-- | host/lib/usrp/usrp_e/usrp_e_impl.cpp | 5 |
8 files changed, 36 insertions, 38 deletions
diff --git a/host/lib/usrp/usrp_e/clock_ctrl.cpp b/host/lib/usrp/usrp_e/clock_ctrl.cpp index 62807aec2..10f263e1d 100644 --- a/host/lib/usrp/usrp_e/clock_ctrl.cpp +++ b/host/lib/usrp/usrp_e/clock_ctrl.cpp @@ -160,7 +160,8 @@ public: std::vector<double> get_rx_dboard_clock_rates(void){ std::vector<double> rates; - for(size_t div = 1; div <= 16+16; div++) rates.push_back(master_clock_rate/div); + for(size_t div = 2/*vco div == 1*/; div <= 16+16; div++) + rates.push_back(master_clock_rate/div); return rates; } diff --git a/host/lib/usrp/usrp_e/codec_impl.cpp b/host/lib/usrp/usrp_e/codec_impl.cpp index 84f8bd37f..696fb37ec 100644 --- a/host/lib/usrp/usrp_e/codec_impl.cpp +++ b/host/lib/usrp/usrp_e/codec_impl.cpp @@ -44,8 +44,7 @@ void usrp_e_impl::codec_init(void){ static const std::string ad9862_pga_gain_name = "ad9862 pga"; void usrp_e_impl::rx_codec_get(const wax::obj &key_, wax::obj &val){ - wax::obj key; std::string name; - boost::tie(key, name) = extract_named_prop(key_); + named_prop_t key = named_prop_t::extract(key_); //handle the get request conditioned on the key switch(key.as<codec_prop_t>()){ @@ -62,17 +61,17 @@ void usrp_e_impl::rx_codec_get(const wax::obj &key_, wax::obj &val){ return; case CODEC_PROP_GAIN_RANGE: - UHD_ASSERT_THROW(name == ad9862_pga_gain_name); + UHD_ASSERT_THROW(key.name == ad9862_pga_gain_name); val = usrp_e_codec_ctrl::rx_pga_gain_range; return; case CODEC_PROP_GAIN_I: - UHD_ASSERT_THROW(name == ad9862_pga_gain_name); + UHD_ASSERT_THROW(key.name == ad9862_pga_gain_name); val = _codec_ctrl->get_rx_pga_gain('A'); return; case CODEC_PROP_GAIN_Q: - UHD_ASSERT_THROW(name == ad9862_pga_gain_name); + UHD_ASSERT_THROW(key.name == ad9862_pga_gain_name); val = _codec_ctrl->get_rx_pga_gain('B'); return; @@ -81,18 +80,17 @@ void usrp_e_impl::rx_codec_get(const wax::obj &key_, wax::obj &val){ } void usrp_e_impl::rx_codec_set(const wax::obj &key_, const wax::obj &val){ - wax::obj key; std::string name; - boost::tie(key, name) = extract_named_prop(key_); + named_prop_t key = named_prop_t::extract(key_); //handle the set request conditioned on the key switch(key.as<codec_prop_t>()){ case CODEC_PROP_GAIN_I: - UHD_ASSERT_THROW(name == ad9862_pga_gain_name); + UHD_ASSERT_THROW(key.name == ad9862_pga_gain_name); _codec_ctrl->set_rx_pga_gain(val.as<float>(), 'A'); return; case CODEC_PROP_GAIN_Q: - UHD_ASSERT_THROW(name == ad9862_pga_gain_name); + UHD_ASSERT_THROW(key.name == ad9862_pga_gain_name); _codec_ctrl->set_rx_pga_gain(val.as<float>(), 'B'); return; @@ -104,8 +102,7 @@ void usrp_e_impl::rx_codec_set(const wax::obj &key_, const wax::obj &val){ * TX Codec Properties **********************************************************************/ void usrp_e_impl::tx_codec_get(const wax::obj &key_, wax::obj &val){ - wax::obj key; std::string name; - boost::tie(key, name) = extract_named_prop(key_); + named_prop_t key = named_prop_t::extract(key_); //handle the get request conditioned on the key switch(key.as<codec_prop_t>()){ @@ -122,13 +119,13 @@ void usrp_e_impl::tx_codec_get(const wax::obj &key_, wax::obj &val){ return; case CODEC_PROP_GAIN_RANGE: - UHD_ASSERT_THROW(name == ad9862_pga_gain_name); + UHD_ASSERT_THROW(key.name == ad9862_pga_gain_name); val = usrp_e_codec_ctrl::tx_pga_gain_range; return; case CODEC_PROP_GAIN_I: //only one gain for I and Q case CODEC_PROP_GAIN_Q: - UHD_ASSERT_THROW(name == ad9862_pga_gain_name); + UHD_ASSERT_THROW(key.name == ad9862_pga_gain_name); val = _codec_ctrl->get_tx_pga_gain(); return; @@ -137,14 +134,13 @@ void usrp_e_impl::tx_codec_get(const wax::obj &key_, wax::obj &val){ } void usrp_e_impl::tx_codec_set(const wax::obj &key_, const wax::obj &val){ - wax::obj key; std::string name; - boost::tie(key, name) = extract_named_prop(key_); + named_prop_t key = named_prop_t::extract(key_); //handle the set request conditioned on the key switch(key.as<codec_prop_t>()){ case CODEC_PROP_GAIN_I: //only one gain for I and Q case CODEC_PROP_GAIN_Q: - UHD_ASSERT_THROW(name == ad9862_pga_gain_name); + UHD_ASSERT_THROW(key.name == ad9862_pga_gain_name); _codec_ctrl->set_tx_pga_gain(val.as<float>()); return; diff --git a/host/lib/usrp/usrp_e/dboard_iface.cpp b/host/lib/usrp/usrp_e/dboard_iface.cpp index d5ec10d84..a9831ebc4 100644 --- a/host/lib/usrp/usrp_e/dboard_iface.cpp +++ b/host/lib/usrp/usrp_e/dboard_iface.cpp @@ -50,7 +50,12 @@ public: /* NOP */ } - std::string get_mboard_name(void){return "usrp-e";} + special_props_t get_special_props(void){ + special_props_t props; + props.soft_clock_divider = false; + props.mangle_i2c_addrs = false; + return props; + } void write_aux_dac(unit_t, aux_dac_t, float); float read_aux_adc(unit_t, aux_adc_t); diff --git a/host/lib/usrp/usrp_e/dboard_impl.cpp b/host/lib/usrp/usrp_e/dboard_impl.cpp index 8aaf16c51..79ff54c9d 100644 --- a/host/lib/usrp/usrp_e/dboard_impl.cpp +++ b/host/lib/usrp/usrp_e/dboard_impl.cpp @@ -56,8 +56,7 @@ void usrp_e_impl::dboard_init(void){ * RX Dboard Get **********************************************************************/ void usrp_e_impl::rx_dboard_get(const wax::obj &key_, wax::obj &val){ - wax::obj key; std::string name; - boost::tie(key, name) = extract_named_prop(key_); + named_prop_t key = named_prop_t::extract(key_); //handle the get request conditioned on the key switch(key.as<dboard_prop_t>()){ @@ -66,7 +65,7 @@ void usrp_e_impl::rx_dboard_get(const wax::obj &key_, wax::obj &val){ return; case DBOARD_PROP_SUBDEV: - val = _dboard_manager->get_rx_subdev(name); + val = _dboard_manager->get_rx_subdev(key.name); return; case DBOARD_PROP_SUBDEV_NAMES: @@ -107,8 +106,7 @@ void usrp_e_impl::rx_dboard_set(const wax::obj &key, const wax::obj &val){ * TX Dboard Get **********************************************************************/ void usrp_e_impl::tx_dboard_get(const wax::obj &key_, wax::obj &val){ - wax::obj key; std::string name; - boost::tie(key, name) = extract_named_prop(key_); + named_prop_t key = named_prop_t::extract(key_); //handle the get request conditioned on the key switch(key.as<dboard_prop_t>()){ @@ -117,7 +115,7 @@ void usrp_e_impl::tx_dboard_get(const wax::obj &key_, wax::obj &val){ return; case DBOARD_PROP_SUBDEV: - val = _dboard_manager->get_tx_subdev(name); + val = _dboard_manager->get_tx_subdev(key.name); return; case DBOARD_PROP_SUBDEV_NAMES: diff --git a/host/lib/usrp/usrp_e/dsp_impl.cpp b/host/lib/usrp/usrp_e/dsp_impl.cpp index 58a58706d..c133eafae 100644 --- a/host/lib/usrp/usrp_e/dsp_impl.cpp +++ b/host/lib/usrp/usrp_e/dsp_impl.cpp @@ -17,8 +17,9 @@ #include "usrp_e_impl.hpp" #include "usrp_e_regs.hpp" -#include "../dsp_utils.hpp" +#include <uhd/usrp/dsp_utils.hpp> #include <uhd/usrp/dsp_props.hpp> +#include <boost/math/special_functions/round.hpp> #include <boost/bind.hpp> #define rint boost::math::iround diff --git a/host/lib/usrp/usrp_e/io_impl.cpp b/host/lib/usrp/usrp_e/io_impl.cpp index bbc3f5215..eaa45d60c 100644 --- a/host/lib/usrp/usrp_e/io_impl.cpp +++ b/host/lib/usrp/usrp_e/io_impl.cpp @@ -17,7 +17,7 @@ #include "usrp_e_impl.hpp" #include "usrp_e_regs.hpp" -#include "../dsp_utils.hpp" +#include <uhd/usrp/dsp_utils.hpp> #include "../../transport/vrt_packet_handler.hpp" #include <boost/bind.hpp> #include <fcntl.h> //read, write diff --git a/host/lib/usrp/usrp_e/mboard_impl.cpp b/host/lib/usrp/usrp_e/mboard_impl.cpp index 88e16a6f5..3d4cef069 100644 --- a/host/lib/usrp/usrp_e/mboard_impl.cpp +++ b/host/lib/usrp/usrp_e/mboard_impl.cpp @@ -17,8 +17,8 @@ #include "usrp_e_impl.hpp" #include "usrp_e_regs.hpp" -#include "../dsp_utils.hpp" -#include "../misc_utils.hpp" +#include <uhd/usrp/dsp_utils.hpp> +#include <uhd/usrp/misc_utils.hpp> #include <uhd/utils/assert.hpp> #include <uhd/usrp/mboard_props.hpp> #include <boost/bind.hpp> @@ -47,9 +47,7 @@ void usrp_e_impl::mboard_init(void){ * Mboard Get **********************************************************************/ void usrp_e_impl::mboard_get(const wax::obj &key_, wax::obj &val){ - wax::obj key; std::string name; - boost::tie(key, name) = extract_named_prop(key_); - + named_prop_t key = named_prop_t::extract(key_); //handle the get request conditioned on the key switch(key.as<mboard_prop_t>()){ @@ -62,7 +60,7 @@ void usrp_e_impl::mboard_get(const wax::obj &key_, wax::obj &val){ return; case MBOARD_PROP_RX_DBOARD: - UHD_ASSERT_THROW(name == ""); + UHD_ASSERT_THROW(key.name == ""); val = _rx_dboard_proxy->get_link(); return; @@ -71,7 +69,7 @@ void usrp_e_impl::mboard_get(const wax::obj &key_, wax::obj &val){ return; case MBOARD_PROP_TX_DBOARD: - UHD_ASSERT_THROW(name == ""); + UHD_ASSERT_THROW(key.name == ""); val = _tx_dboard_proxy->get_link(); return; @@ -80,7 +78,7 @@ void usrp_e_impl::mboard_get(const wax::obj &key_, wax::obj &val){ return; case MBOARD_PROP_RX_DSP: - UHD_ASSERT_THROW(name == ""); + UHD_ASSERT_THROW(key.name == ""); val = _rx_ddc_proxy->get_link(); return; @@ -89,7 +87,7 @@ void usrp_e_impl::mboard_get(const wax::obj &key_, wax::obj &val){ return; case MBOARD_PROP_TX_DSP: - UHD_ASSERT_THROW(name == ""); + UHD_ASSERT_THROW(key.name == ""); val = _tx_duc_proxy->get_link(); return; diff --git a/host/lib/usrp/usrp_e/usrp_e_impl.cpp b/host/lib/usrp/usrp_e/usrp_e_impl.cpp index 0566cfd59..5c0e1dbb0 100644 --- a/host/lib/usrp/usrp_e/usrp_e_impl.cpp +++ b/host/lib/usrp/usrp_e/usrp_e_impl.cpp @@ -113,8 +113,7 @@ usrp_e_impl::~usrp_e_impl(void){ * Device Get **********************************************************************/ void usrp_e_impl::get(const wax::obj &key_, wax::obj &val){ - wax::obj key; std::string name; - boost::tie(key, name) = extract_named_prop(key_); + named_prop_t key = named_prop_t::extract(key_); //handle the get request conditioned on the key switch(key.as<device_prop_t>()){ @@ -123,7 +122,7 @@ void usrp_e_impl::get(const wax::obj &key_, wax::obj &val){ return; case DEVICE_PROP_MBOARD: - UHD_ASSERT_THROW(name == ""); + UHD_ASSERT_THROW(key.name == ""); val = _mboard_proxy->get_link(); return; |