summaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/b200
diff options
context:
space:
mode:
authorNicholas Corgan <nick.corgan@ettus.com>2013-08-09 11:37:30 -0700
committerNicholas Corgan <nick.corgan@ettus.com>2013-08-09 12:20:47 -0700
commit9f1d6bdc501e04aa205f88ed5ef95e38c1bec03b (patch)
tree12f99421205f55bc27a02b5045c3b79bcc6ea081 /host/lib/usrp/b200
parent1c391767dd2ae3e1d6f2f543b0d685d8fe058388 (diff)
downloaduhd-9f1d6bdc501e04aa205f88ed5ef95e38c1bec03b.tar.gz
uhd-9f1d6bdc501e04aa205f88ed5ef95e38c1bec03b.tar.bz2
uhd-9f1d6bdc501e04aa205f88ed5ef95e38c1bec03b.zip
b200: uhd_usrp_probe distinguishes between B200 and B210
Diffstat (limited to 'host/lib/usrp/b200')
-rw-r--r--host/lib/usrp/b200/b200_impl.cpp18
1 files changed, 15 insertions, 3 deletions
diff --git a/host/lib/usrp/b200/b200_impl.cpp b/host/lib/usrp/b200/b200_impl.cpp
index 68d2d5594..4c70e7f7b 100644
--- a/host/lib/usrp/b200/b200_impl.cpp
+++ b/host/lib/usrp/b200/b200_impl.cpp
@@ -293,7 +293,11 @@ 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");
+ switch (boost::lexical_cast<boost::uint16_t>(mb_eeprom["product"]))
+ {
+ case 0x0001: _tree->create<std::string>(mb_path / "name").set("B200"); break;
+ case 0x0002: _tree->create<std::string>(mb_path / "name").set("B210"); break;
+ }
_tree->create<std::string>(mb_path / "codename").set("Sasquatch");
////////////////////////////////////////////////////////////////////
@@ -329,12 +333,20 @@ 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");
+ switch (boost::lexical_cast<boost::uint16_t>(mb_eeprom["product"]))
+ {
+ case 0x0001: _tree->create<std::string>(codec_path / "name").set("B200 RX dual ADC"); break;
+ case 0x0002: _tree->create<std::string>(codec_path / "name").set("B210 RX dual ADC"); break;
+ }
_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");
+ switch (boost::lexical_cast<boost::uint16_t>(mb_eeprom["product"]))
+ {
+ case 0x0001: _tree->create<std::string>(codec_path / "name").set("B200 TX dual DAC"); break;
+ case 0x0002: _tree->create<std::string>(codec_path / "name").set("B210 TX dual DAC"); break;
+ }
_tree->create<int>(codec_path / "gains"); //empty cuz gains are in frontend
}