summaryrefslogtreecommitdiffstats
path: root/host
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2011-06-16 10:52:21 -0700
committerJosh Blum <josh@joshknows.com>2011-06-16 10:52:21 -0700
commit295a656814e258af4c1be9048953bfb3c6b0da71 (patch)
tree352a92b9deebd1307ddd4974e22152c5f2d4d58a /host
parent615af6ca98c259460517c71647235b102978b5a1 (diff)
downloaduhd-295a656814e258af4c1be9048953bfb3c6b0da71.tar.gz
uhd-295a656814e258af4c1be9048953bfb3c6b0da71.tar.bz2
uhd-295a656814e258af4c1be9048953bfb3c6b0da71.zip
usrp: use dboard name A or single slot boards
Diffstat (limited to 'host')
-rw-r--r--host/docs/usrp2.rst4
-rw-r--r--host/lib/usrp/b100/mboard_impl.cpp9
-rw-r--r--host/lib/usrp/usrp2/mboard_impl.cpp8
-rw-r--r--host/lib/usrp/usrp_e100/mboard_impl.cpp11
4 files changed, 17 insertions, 15 deletions
diff --git a/host/docs/usrp2.rst b/host/docs/usrp2.rst
index 88b217f1b..189f937de 100644
--- a/host/docs/usrp2.rst
+++ b/host/docs/usrp2.rst
@@ -406,11 +406,11 @@ In the single channel case, only one chain is ever used.
To receive from both channels,
the user must set the RX subdevice specification.
This hardware has only one daughterboard slot,
-which has been aptly named slot "0".
+which has been aptly named slot "A".
In the following example, a TVRX2 is installed.
Channel 0 is sourced from subdevice RX1,
channel 1 is sourced from subdevice RX2:
::
- usrp->set_rx_subdev_spec("0:RX1 0:RX2");
+ usrp->set_rx_subdev_spec("A:RX1 A:RX2");
diff --git a/host/lib/usrp/b100/mboard_impl.cpp b/host/lib/usrp/b100/mboard_impl.cpp
index c651ff2a2..f9807e348 100644
--- a/host/lib/usrp/b100/mboard_impl.cpp
+++ b/host/lib/usrp/b100/mboard_impl.cpp
@@ -85,6 +85,7 @@ void b100_impl::update_clock_config(void){
**********************************************************************/
void b100_impl::mboard_get(const wax::obj &key_, wax::obj &val){
named_prop_t key = named_prop_t::extract(key_);
+ static const std::string dboard_name = "A";
//handle the get request conditioned on the key
switch(key.as<mboard_prop_t>()){
@@ -97,21 +98,21 @@ void b100_impl::mboard_get(const wax::obj &key_, wax::obj &val){
return;
case MBOARD_PROP_RX_DBOARD:
- UHD_ASSERT_THROW(key.name == "");
+ UHD_ASSERT_THROW(key.name == dboard_name);
val = _rx_dboard_proxy->get_link();
return;
case MBOARD_PROP_RX_DBOARD_NAMES:
- val = prop_names_t(1, ""); //vector of size 1 with empty string
+ val = prop_names_t(1, dboard_name);
return;
case MBOARD_PROP_TX_DBOARD:
- UHD_ASSERT_THROW(key.name == "");
+ UHD_ASSERT_THROW(key.name == dboard_name);
val = _tx_dboard_proxy->get_link();
return;
case MBOARD_PROP_TX_DBOARD_NAMES:
- val = prop_names_t(1, ""); //vector of size 1 with empty string
+ val = prop_names_t(1, dboard_name);
return;
case MBOARD_PROP_RX_DSP:
diff --git a/host/lib/usrp/usrp2/mboard_impl.cpp b/host/lib/usrp/usrp2/mboard_impl.cpp
index 5315522f0..197296cf0 100644
--- a/host/lib/usrp/usrp2/mboard_impl.cpp
+++ b/host/lib/usrp/usrp2/mboard_impl.cpp
@@ -289,10 +289,10 @@ void usrp2_mboard_impl::set_time_spec(const time_spec_t &time_spec, bool now){
/***********************************************************************
* MBoard Get Properties
**********************************************************************/
-static const std::string dboard_name = "0";
-
void usrp2_mboard_impl::get(const wax::obj &key_, wax::obj &val){
named_prop_t key = named_prop_t::extract(key_);
+ static const std::string dboard_name = "A";
+
//handle the get request conditioned on the key
switch(key.as<mboard_prop_t>()){
case MBOARD_PROP_NAME:
@@ -304,7 +304,7 @@ void usrp2_mboard_impl::get(const wax::obj &key_, wax::obj &val){
return;
case MBOARD_PROP_RX_DBOARD:
- UHD_ASSERT_THROW(key.name == dboard_name);
+ UHD_ASSERT_THROW(key.name == dboard_name or key.name == "0"); //allow for old name to work
val = _rx_dboard_proxy->get_link();
return;
@@ -313,7 +313,7 @@ void usrp2_mboard_impl::get(const wax::obj &key_, wax::obj &val){
return;
case MBOARD_PROP_TX_DBOARD:
- UHD_ASSERT_THROW(key.name == dboard_name);
+ UHD_ASSERT_THROW(key.name == dboard_name or key.name == "0"); //allow for old name to work
val = _tx_dboard_proxy->get_link();
return;
diff --git a/host/lib/usrp/usrp_e100/mboard_impl.cpp b/host/lib/usrp/usrp_e100/mboard_impl.cpp
index 2989321a4..549c9bf4f 100644
--- a/host/lib/usrp/usrp_e100/mboard_impl.cpp
+++ b/host/lib/usrp/usrp_e100/mboard_impl.cpp
@@ -68,11 +68,12 @@ void usrp_e100_impl::update_clock_config(void){
**********************************************************************/
void usrp_e100_impl::mboard_get(const wax::obj &key_, wax::obj &val){
named_prop_t key = named_prop_t::extract(key_);
+ static const std::string dboard_name = "A";
//handle the get request conditioned on the key
switch(key.as<mboard_prop_t>()){
case MBOARD_PROP_NAME:
- val = std::string("usrp-e mboard");
+ val = std::string(_iface->get_cname() + " mboard");
return;
case MBOARD_PROP_OTHERS:
@@ -80,21 +81,21 @@ void usrp_e100_impl::mboard_get(const wax::obj &key_, wax::obj &val){
return;
case MBOARD_PROP_RX_DBOARD:
- UHD_ASSERT_THROW(key.name == "");
+ UHD_ASSERT_THROW(key.name == dboard_name);
val = _rx_dboard_proxy->get_link();
return;
case MBOARD_PROP_RX_DBOARD_NAMES:
- val = prop_names_t(1, ""); //vector of size 1 with empty string
+ val = prop_names_t(1, dboard_name);
return;
case MBOARD_PROP_TX_DBOARD:
- UHD_ASSERT_THROW(key.name == "");
+ UHD_ASSERT_THROW(key.name == dboard_name);
val = _tx_dboard_proxy->get_link();
return;
case MBOARD_PROP_TX_DBOARD_NAMES:
- val = prop_names_t(1, ""); //vector of size 1 with empty string
+ val = prop_names_t(1, dboard_name);
return;
case MBOARD_PROP_RX_DSP: