summaryrefslogtreecommitdiffstats
path: root/host/lib
diff options
context:
space:
mode:
authorBen Hilburn <ben.hilburn@ettus.com>2013-12-11 18:23:46 -0800
committerBen Hilburn <ben.hilburn@ettus.com>2013-12-11 18:23:46 -0800
commit4826982ef3ed4b3ddf66ac2561771eebfac27561 (patch)
tree7820d21e5977619ea9f20914f26fbc5e23ce99db /host/lib
parent4d7c800b7375f98b9a26d0d1612d7d927fcc6fe9 (diff)
downloaduhd-4826982ef3ed4b3ddf66ac2561771eebfac27561.tar.gz
uhd-4826982ef3ed4b3ddf66ac2561771eebfac27561.tar.bz2
uhd-4826982ef3ed4b3ddf66ac2561771eebfac27561.zip
Merging mwest's improvements to B2xx utility.
Diffstat (limited to 'host/lib')
-rw-r--r--host/lib/usrp/b200/b200_iface.cpp23
-rw-r--r--host/lib/usrp/b200/b200_iface.hpp2
2 files changed, 25 insertions, 0 deletions
diff --git a/host/lib/usrp/b200/b200_iface.cpp b/host/lib/usrp/b200/b200_iface.cpp
index 1f38978da..5d799bf01 100644
--- a/host/lib/usrp/b200/b200_iface.cpp
+++ b/host/lib/usrp/b200/b200_iface.cpp
@@ -716,6 +716,29 @@ private:
usb_control::sptr _usb_ctrl;
};
+
+std::string b200_iface::fx3_state_string(boost::uint8_t state)
+{
+ switch (state)
+ {
+ case FX3_STATE_FPGA_READY:
+ return std::string("Ready");
+ case FX3_STATE_CONFIGURING_FPGA:
+ return std::string("Configuring FPGA");
+ case FX3_STATE_BUSY:
+ return std::string("Busy");
+ case FX3_STATE_RUNNING:
+ return std::string("Running");
+ case FX3_STATE_UNCONFIGURED:
+ return std::string("Unconfigured");
+ case FX3_STATE_ERROR:
+ return std::string("Error");
+ default:
+ break;
+ }
+ return std::string("Unknown");
+}
+
/***********************************************************************
* Make an instance of the implementation
**********************************************************************/
diff --git a/host/lib/usrp/b200/b200_iface.hpp b/host/lib/usrp/b200/b200_iface.hpp
index 5b6eeede4..20b4a7a89 100644
--- a/host/lib/usrp/b200/b200_iface.hpp
+++ b/host/lib/usrp/b200/b200_iface.hpp
@@ -78,6 +78,8 @@ public:
virtual void write_eeprom(boost::uint16_t addr, boost::uint16_t offset, const uhd::byte_vector_t &bytes) = 0;
virtual uhd::byte_vector_t read_eeprom(boost::uint16_t addr, boost::uint16_t offset, size_t num_bytes) = 0;
+
+ static std::string fx3_state_string(boost::uint8_t state);
};