aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2011-06-28 16:05:08 -0700
committerJosh Blum <josh@joshknows.com>2011-06-28 16:05:08 -0700
commit8308fb0eef44f3c4b8d349f7e7d7cdc11a0bd549 (patch)
tree18be22bcdb1834f911c2c6b180b1fa474b8405d8 /host/lib/usrp
parentb00e36521faccaacc3e2f818780010d8cfb1bbdf (diff)
downloaduhd-8308fb0eef44f3c4b8d349f7e7d7cdc11a0bd549.tar.gz
uhd-8308fb0eef44f3c4b8d349f7e7d7cdc11a0bd549.tar.bz2
uhd-8308fb0eef44f3c4b8d349f7e7d7cdc11a0bd549.zip
usrp: got probe working w/ the new property tree
Diffstat (limited to 'host/lib/usrp')
-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
3 files changed, 13 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));