summaryrefslogtreecommitdiffstats
path: root/host
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2013-08-13 11:04:43 -0700
committerJosh Blum <josh@joshknows.com>2013-08-13 11:04:43 -0700
commitb53b3669216d34cb3940f5a6cf7cd79d71b837bb (patch)
treeaf34447ffb6d5d30dba1a944d57fc96cccf014eb /host
parent77f360afdad3af71d125ca375a00221ad231792e (diff)
downloaduhd-b53b3669216d34cb3940f5a6cf7cd79d71b837bb.tar.gz
uhd-b53b3669216d34cb3940f5a6cf7cd79d71b837bb.tar.bz2
uhd-b53b3669216d34cb3940f5a6cf7cd79d71b837bb.zip
b200: string names decided in one place
Diffstat (limited to 'host')
-rw-r--r--host/lib/usrp/b200/b200_impl.cpp17
1 files changed, 12 insertions, 5 deletions
diff --git a/host/lib/usrp/b200/b200_impl.cpp b/host/lib/usrp/b200/b200_impl.cpp
index 8bacaf764..700a024de 100644
--- a/host/lib/usrp/b200/b200_impl.cpp
+++ b/host/lib/usrp/b200/b200_impl.cpp
@@ -190,12 +190,19 @@ b200_impl::b200_impl(const device_addr_t &device_addr)
// Load the FPGA image, then reset GPIF
////////////////////////////////////////////////////////////////////
std::string default_file_name;
+ std::string product_name = "B200?";
if (not mb_eeprom["product"].empty())
{
switch (boost::lexical_cast<boost::uint16_t>(mb_eeprom["product"]))
{
- case 0x0001: default_file_name = B200_FPGA_FILE_NAME; break;
- case 0x0002: default_file_name = B210_FPGA_FILE_NAME; break;
+ case 0x0001:
+ product_name = "B200";
+ default_file_name = B200_FPGA_FILE_NAME;
+ break;
+ case 0x0002:
+ product_name = "B210";
+ default_file_name = B210_FPGA_FILE_NAME;
+ break;
default: throw uhd::runtime_error("b200 unknown product code: " + mb_eeprom["product"]);
}
}
@@ -293,7 +300,7 @@ b200_impl::b200_impl(const device_addr_t &device_addr)
// Initialize the properties tree
////////////////////////////////////////////////////////////////////
_tree->create<std::string>("/name").set("B-Series Device");
- _tree->create<std::string>(mb_path / "name").set("B200");
+ _tree->create<std::string>(mb_path / "name").set(product_name);
_tree->create<std::string>(mb_path / "codename").set("Sasquatch");
////////////////////////////////////////////////////////////////////
@@ -329,12 +336,12 @@ b200_impl::b200_impl(const device_addr_t &device_addr)
////////////////////////////////////////////////////////////////////
{
const fs_path codec_path = mb_path / ("rx_codecs") / "A";
- _tree->create<std::string>(codec_path / "name").set("B200 RX dual ADC");
+ _tree->create<std::string>(codec_path / "name").set(product_name+" RX dual ADC");
_tree->create<int>(codec_path / "gains"); //empty cuz gains are in frontend
}
{
const fs_path codec_path = mb_path / ("tx_codecs") / "A";
- _tree->create<std::string>(codec_path / "name").set("B200 TX dual DAC");
+ _tree->create<std::string>(codec_path / "name").set(product_name+" TX dual DAC");
_tree->create<int>(codec_path / "gains"); //empty cuz gains are in frontend
}