aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib
diff options
context:
space:
mode:
Diffstat (limited to 'host/lib')
-rw-r--r--host/lib/usrp/cores/rx_dsp_core_200.cpp8
-rw-r--r--host/lib/usrp/cores/tx_frontend_core_200.cpp8
-rw-r--r--host/lib/usrp/dboard_manager.cpp9
-rw-r--r--host/lib/usrp2/usrp2_impl.cpp6
4 files changed, 19 insertions, 12 deletions
diff --git a/host/lib/usrp/cores/rx_dsp_core_200.cpp b/host/lib/usrp/cores/rx_dsp_core_200.cpp
index b13cc8f03..5c4544392 100644
--- a/host/lib/usrp/cores/rx_dsp_core_200.cpp
+++ b/host/lib/usrp/cores/rx_dsp_core_200.cpp
@@ -109,10 +109,10 @@ public:
void set_mux(const std::string &mode){
static const uhd::dict<std::string, boost::uint32_t> mode_to_mux = boost::assign::map_list_of
- ("iq", 0)
- ("qi", FLAG_DSP_RX_MUX_SWAP_IQ)
- ("i", FLAG_DSP_RX_MUX_REAL_MODE)
- ("q", FLAG_DSP_RX_MUX_SWAP_IQ | FLAG_DSP_RX_MUX_REAL_MODE)
+ ("IQ", 0)
+ ("QI", FLAG_DSP_RX_MUX_SWAP_IQ)
+ ("I", FLAG_DSP_RX_MUX_REAL_MODE)
+ ("Q", FLAG_DSP_RX_MUX_SWAP_IQ | FLAG_DSP_RX_MUX_REAL_MODE)
;
_iface->poke32(REG_DSP_RX_MUX, mode_to_mux[mode]);
}
diff --git a/host/lib/usrp/cores/tx_frontend_core_200.cpp b/host/lib/usrp/cores/tx_frontend_core_200.cpp
index 682e6613d..c568133fd 100644
--- a/host/lib/usrp/cores/tx_frontend_core_200.cpp
+++ b/host/lib/usrp/cores/tx_frontend_core_200.cpp
@@ -42,10 +42,10 @@ public:
void set_mux(const std::string &mode){
static const uhd::dict<std::string, boost::uint32_t> mode_to_mux = boost::assign::map_list_of
- ("iq", (0x1 << 4) | (0x0 << 0)) //DAC0Q=DUC0Q, DAC0I=DUC0I
- ("qi", (0x0 << 4) | (0x1 << 0)) //DAC0Q=DUC0I, DAC0I=DUC0Q
- ("i", (0xf << 4) | (0x0 << 0)) //DAC0Q=ZERO, DAC0I=DUC0I
- ("q", (0x0 << 4) | (0xf << 0)) //DAC0Q=DUC0I, DAC0I=ZERO
+ ("IQ", (0x1 << 4) | (0x0 << 0)) //DAC0Q=DUC0Q, DAC0I=DUC0I
+ ("QI", (0x0 << 4) | (0x1 << 0)) //DAC0Q=DUC0I, DAC0I=DUC0Q
+ ("I", (0xf << 4) | (0x0 << 0)) //DAC0Q=ZERO, DAC0I=DUC0I
+ ("Q", (0x0 << 4) | (0xf << 0)) //DAC0Q=DUC0I, DAC0I=ZERO
;
_iface->poke32(REG_TX_FE_MUX, mode_to_mux[mode]);
}
diff --git a/host/lib/usrp/dboard_manager.cpp b/host/lib/usrp/dboard_manager.cpp
index bff55009e..b1c10e1c1 100644
--- a/host/lib/usrp/dboard_manager.cpp
+++ b/host/lib/usrp/dboard_manager.cpp
@@ -444,10 +444,10 @@ static std::vector<std::string> get_ants(wax::obj subdev){
static std::string get_conn(wax::obj subdev){
switch(subdev[SUBDEV_PROP_CONNECTION].as<subdev_conn_t>()){
- case SUBDEV_CONN_COMPLEX_IQ: return "iq";
- case SUBDEV_CONN_COMPLEX_QI: return "qi";
- case SUBDEV_CONN_REAL_I: return "i";
- case SUBDEV_CONN_REAL_Q: return "q";
+ case SUBDEV_CONN_COMPLEX_IQ: return "IQ";
+ case SUBDEV_CONN_COMPLEX_QI: return "QI";
+ case SUBDEV_CONN_REAL_I: return "I";
+ case SUBDEV_CONN_REAL_Q: return "Q";
}
UHD_THROW_INVALID_CODE_PATH();
}
@@ -480,6 +480,7 @@ void dboard_manager::populate_prop_tree_from_subdev(
}
const prop_names_t gain_names = subdev[SUBDEV_PROP_GAIN_NAMES].as<prop_names_t>();
+ tree->create<int>(root / "gains"); //phony property so this dir exists
BOOST_FOREACH(const std::string &name, gain_names){
tree->create<double>(root / "gains" / name / "value")
.subscribe_master(boost::bind(&get_set_gain, subdev, name, _1));
diff --git a/host/lib/usrp2/usrp2_impl.cpp b/host/lib/usrp2/usrp2_impl.cpp
index 7dc9ac812..829becd19 100644
--- a/host/lib/usrp2/usrp2_impl.cpp
+++ b/host/lib/usrp2/usrp2_impl.cpp
@@ -293,6 +293,7 @@ usrp2_impl::usrp2_impl(const device_addr_t &_device_addr){
// create controller objects and initialize the properties tree
////////////////////////////////////////////////////////////////////
_tree = property_tree::make();
+ _tree->create<std::string>("/name").set("USRP2 / N-Series Device");
for (size_t mbi = 0; mbi < device_args.size(); mbi++){
const device_addr_t device_args_i = device_args[mbi];
@@ -349,6 +350,8 @@ usrp2_impl::usrp2_impl(const device_addr_t &_device_addr){
////////////////////////////////////////////////////////////////
property_tree::path_type rx_codec_path = mb_path / "rx_codecs/A";
property_tree::path_type tx_codec_path = mb_path / "tx_codecs/A";
+ _tree->create<int>(rx_codec_path / "gains"); //phony property so this dir exists
+ _tree->create<int>(tx_codec_path / "gains"); //phony property so this dir exists
_mbc[mb].codec = usrp2_codec_ctrl::make(_mbc[mb].iface);
switch(_mbc[mb].iface->get_rev()){
case usrp2_iface::USRP_N200:
@@ -503,10 +506,13 @@ usrp2_impl::usrp2_impl(const device_addr_t &_device_addr){
//create the properties and register subscribers
_tree->create<dboard_eeprom_t>(mb_path / "dboards/A/rx_eeprom")
+ .set(rx_db_eeprom)
.subscribe(boost::bind(&usrp2_impl::set_db_eeprom, this, mb, "rx", _1));
_tree->create<dboard_eeprom_t>(mb_path / "dboards/A/tx_eeprom")
+ .set(tx_db_eeprom)
.subscribe(boost::bind(&usrp2_impl::set_db_eeprom, this, mb, "tx", _1));
_tree->create<dboard_eeprom_t>(mb_path / "dboards/A/gdb_eeprom")
+ .set(gdb_eeprom)
.subscribe(boost::bind(&usrp2_impl::set_db_eeprom, this, mb, "gdb", _1));
//create a new dboard interface and manager