diff options
Diffstat (limited to 'host/lib/usrp')
| -rw-r--r-- | host/lib/usrp/b200/b200_iface.cpp | 23 | ||||
| -rw-r--r-- | host/lib/usrp/b200/b200_iface.hpp | 2 | 
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);  }; | 
