summaryrefslogtreecommitdiffstats
path: root/host/lib/usrp
diff options
context:
space:
mode:
Diffstat (limited to 'host/lib/usrp')
-rw-r--r--host/lib/usrp/dboard/basic.cpp26
-rw-r--r--host/lib/usrp/dboard_manager.cpp2
-rw-r--r--host/lib/usrp/usrp2/dboard_impl.cpp1
-rw-r--r--host/lib/usrp/usrp2/dsp_impl.cpp6
-rw-r--r--host/lib/usrp/usrp2/mboard_impl.cpp3
-rw-r--r--host/lib/usrp/usrp2/usrp2_impl.hpp10
6 files changed, 25 insertions, 23 deletions
diff --git a/host/lib/usrp/dboard/basic.cpp b/host/lib/usrp/dboard/basic.cpp
index 07cb8d11c..2f29c8e0c 100644
--- a/host/lib/usrp/dboard/basic.cpp
+++ b/host/lib/usrp/dboard/basic.cpp
@@ -16,7 +16,7 @@
//
#include <uhd/props.hpp>
-#include <uhd/types.hpp>
+#include <uhd/types/ranges.hpp>
#include <uhd/utils/assert.hpp>
#include <uhd/utils/static.hpp>
#include <uhd/usrp/dboard_base.hpp>
@@ -34,26 +34,26 @@ using namespace boost::assign;
**********************************************************************/
class basic_rx : public rx_dboard_base{
public:
- basic_rx(ctor_args_t const& args, freq_t max_freq);
+ basic_rx(ctor_args_t const& args, double max_freq);
~basic_rx(void);
void rx_get(const wax::obj &key, wax::obj &val);
void rx_set(const wax::obj &key, const wax::obj &val);
private:
- freq_t _max_freq;
+ double _max_freq;
};
class basic_tx : public tx_dboard_base{
public:
- basic_tx(ctor_args_t const& args, freq_t max_freq);
+ basic_tx(ctor_args_t const& args, double max_freq);
~basic_tx(void);
void tx_get(const wax::obj &key, wax::obj &val);
void tx_set(const wax::obj &key, const wax::obj &val);
private:
- freq_t _max_freq;
+ double _max_freq;
};
/***********************************************************************
@@ -85,7 +85,7 @@ UHD_STATIC_BLOCK(reg_dboards){
/***********************************************************************
* Basic and LF RX dboard
**********************************************************************/
-basic_rx::basic_rx(ctor_args_t const& args, freq_t max_freq) : rx_dboard_base(args){
+basic_rx::basic_rx(ctor_args_t const& args, double max_freq) : rx_dboard_base(args){
_max_freq = max_freq;
// set the gpios to safe values (all inputs)
get_interface()->set_gpio_ddr(dboard_interface::GPIO_RX_BANK, 0x0000, 0xffff);
@@ -113,7 +113,7 @@ void basic_rx::rx_get(const wax::obj &key_, wax::obj &val){
return;
case SUBDEV_PROP_GAIN:
- val = gain_t(0);
+ val = float(0);
return;
case SUBDEV_PROP_GAIN_RANGE:
@@ -125,7 +125,7 @@ void basic_rx::rx_get(const wax::obj &key_, wax::obj &val){
return;
case SUBDEV_PROP_FREQ:
- val = freq_t(0);
+ val = double(0);
return;
case SUBDEV_PROP_FREQ_RANGE:
@@ -164,7 +164,7 @@ void basic_rx::rx_set(const wax::obj &key_, const wax::obj &val){
switch(key.as<subdev_prop_t>()){
case SUBDEV_PROP_GAIN:
- ASSERT_THROW(val.as<gain_t>() == gain_t(0));
+ ASSERT_THROW(val.as<float>() == float(0));
return;
case SUBDEV_PROP_ANTENNA:
@@ -196,7 +196,7 @@ void basic_rx::rx_set(const wax::obj &key_, const wax::obj &val){
/***********************************************************************
* Basic and LF TX dboard
**********************************************************************/
-basic_tx::basic_tx(ctor_args_t const& args, freq_t max_freq) : tx_dboard_base(args){
+basic_tx::basic_tx(ctor_args_t const& args, double max_freq) : tx_dboard_base(args){
_max_freq = max_freq;
// set the gpios to safe values (all inputs)
get_interface()->set_gpio_ddr(dboard_interface::GPIO_TX_BANK, 0x0000, 0xffff);
@@ -221,7 +221,7 @@ void basic_tx::tx_get(const wax::obj &key_, wax::obj &val){
return;
case SUBDEV_PROP_GAIN:
- val = gain_t(0);
+ val = float(0);
return;
case SUBDEV_PROP_GAIN_RANGE:
@@ -233,7 +233,7 @@ void basic_tx::tx_get(const wax::obj &key_, wax::obj &val){
return;
case SUBDEV_PROP_FREQ:
- val = freq_t(0);
+ val = double(0);
return;
case SUBDEV_PROP_FREQ_RANGE:
@@ -272,7 +272,7 @@ void basic_tx::tx_set(const wax::obj &key_, const wax::obj &val){
switch(key.as<subdev_prop_t>()){
case SUBDEV_PROP_GAIN:
- ASSERT_THROW(val.as<gain_t>() == gain_t(0));
+ ASSERT_THROW(val.as<float>() == float(0));
return;
case SUBDEV_PROP_ANTENNA:
diff --git a/host/lib/usrp/dboard_manager.cpp b/host/lib/usrp/dboard_manager.cpp
index 0f2189cd1..bc9bfbf14 100644
--- a/host/lib/usrp/dboard_manager.cpp
+++ b/host/lib/usrp/dboard_manager.cpp
@@ -19,7 +19,7 @@
#include <uhd/gain_handler.hpp>
#include <uhd/utils/static.hpp>
#include <uhd/utils/assert.hpp>
-#include <uhd/dict.hpp>
+#include <uhd/types/dict.hpp>
#include <boost/tuple/tuple.hpp>
#include <boost/format.hpp>
#include <boost/bind.hpp>
diff --git a/host/lib/usrp/usrp2/dboard_impl.cpp b/host/lib/usrp/usrp2/dboard_impl.cpp
index 6b49ff29d..fd72aeaa4 100644
--- a/host/lib/usrp/usrp2/dboard_impl.cpp
+++ b/host/lib/usrp/usrp2/dboard_impl.cpp
@@ -16,6 +16,7 @@
//
#include <uhd/utils/assert.hpp>
+#include <uhd/types/clock_config.hpp>
#include <boost/format.hpp>
#include "usrp2_impl.hpp"
diff --git a/host/lib/usrp/usrp2/dsp_impl.cpp b/host/lib/usrp/usrp2/dsp_impl.cpp
index 654096d14..40ef06a8c 100644
--- a/host/lib/usrp/usrp2/dsp_impl.cpp
+++ b/host/lib/usrp/usrp2/dsp_impl.cpp
@@ -35,7 +35,7 @@ template <class T> T log2(T num){
/***********************************************************************
* DDC Helper Methods
**********************************************************************/
-static boost::uint32_t calculate_freq_word_and_update_actual_freq(freq_t &freq, freq_t clock_freq){
+static boost::uint32_t calculate_freq_word_and_update_actual_freq(double &freq, double clock_freq){
double scale_factor = std::pow(2.0, 32);
//calculate the freq register word
@@ -163,7 +163,7 @@ void usrp2_impl::ddc_set(const wax::obj &key, const wax::obj &val){
return;
}
else if (key_name == "freq"){
- freq_t new_freq = val.as<freq_t>();
+ double new_freq = val.as<double>();
ASSERT_THROW(new_freq <= get_master_clock_freq()/2.0);
ASSERT_THROW(new_freq >= -get_master_clock_freq()/2.0);
_ddc_freq = new_freq; //shadow
@@ -283,7 +283,7 @@ void usrp2_impl::duc_set(const wax::obj &key, const wax::obj &val){
return;
}
else if (key_name == "freq"){
- freq_t new_freq = val.as<freq_t>();
+ double new_freq = val.as<double>();
ASSERT_THROW(new_freq <= get_master_clock_freq()/2.0);
ASSERT_THROW(new_freq >= -get_master_clock_freq()/2.0);
_duc_freq = new_freq; //shadow
diff --git a/host/lib/usrp/usrp2/mboard_impl.cpp b/host/lib/usrp/usrp2/mboard_impl.cpp
index e4706dcf0..b6919a738 100644
--- a/host/lib/usrp/usrp2/mboard_impl.cpp
+++ b/host/lib/usrp/usrp2/mboard_impl.cpp
@@ -16,6 +16,7 @@
//
#include <uhd/utils/assert.hpp>
+#include <uhd/types/mac_addr.hpp>
#include "usrp2_impl.hpp"
using namespace uhd;
@@ -168,7 +169,7 @@ void usrp2_impl::mboard_get(const wax::obj &key_, wax::obj &val){
return;
case MBOARD_PROP_CLOCK_RATE:
- val = freq_t(get_master_clock_freq());
+ val = double(get_master_clock_freq());
return;
case MBOARD_PROP_RX_DSP:
diff --git a/host/lib/usrp/usrp2/usrp2_impl.hpp b/host/lib/usrp/usrp2/usrp2_impl.hpp
index 3a2963c5a..6535e7049 100644
--- a/host/lib/usrp/usrp2/usrp2_impl.hpp
+++ b/host/lib/usrp/usrp2/usrp2_impl.hpp
@@ -19,9 +19,9 @@
#define INCLUDED_USRP2_IMPL_HPP
#include <uhd/usrp/usrp2.hpp>
-#include <uhd/dict.hpp>
-#include <uhd/types.hpp>
-#include <uhd/time_spec.hpp>
+#include <uhd/types/dict.hpp>
+#include <uhd/types/stream_cmd.hpp>
+#include <uhd/types/clock_config.hpp>
#include <boost/asio.hpp>
#include <boost/thread.hpp>
#include <boost/shared_ptr.hpp>
@@ -173,14 +173,14 @@ private:
//methods and shadows for the ddc dsp
std::vector<size_t> _allowed_decim_and_interp_rates;
size_t _ddc_decim;
- uhd::freq_t _ddc_freq;
+ double _ddc_freq;
void init_ddc_config(void);
void update_ddc_config(void);
void issue_ddc_stream_cmd(const uhd::stream_cmd_t &stream_cmd);
//methods and shadows for the duc dsp
size_t _duc_interp;
- uhd::freq_t _duc_freq;
+ double _duc_freq;
void init_duc_config(void);
void update_duc_config(void);