diff options
author | Josh Blum <josh@joshknows.com> | 2010-07-12 18:15:38 +0000 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2010-07-12 18:15:38 +0000 |
commit | 9ee1b33bbc170b2e76fbb5b9a075d6b6c7315a7e (patch) | |
tree | 37188194053ca00dc69349e607cf77831939ab6e /host/lib/usrp | |
parent | 3a3aefd68f054e3fccff31173be2a878841b29aa (diff) | |
parent | 8a81fe1a4cd39439d76d17ef65ba1cc696c3ca6d (diff) | |
download | uhd-9ee1b33bbc170b2e76fbb5b9a075d6b6c7315a7e.tar.gz uhd-9ee1b33bbc170b2e76fbb5b9a075d6b6c7315a7e.tar.bz2 uhd-9ee1b33bbc170b2e76fbb5b9a075d6b6c7315a7e.zip |
Merge branch 'master' of ettus.sourcerepo.com:ettus/uhdpriv into usrp_e
Diffstat (limited to 'host/lib/usrp')
-rw-r--r-- | host/lib/usrp/usrp2/mboard_impl.cpp | 8 | ||||
-rw-r--r-- | host/lib/usrp/usrp2/usrp2_impl.hpp | 1 |
2 files changed, 8 insertions, 1 deletions
diff --git a/host/lib/usrp/usrp2/mboard_impl.cpp b/host/lib/usrp/usrp2/mboard_impl.cpp index b46832360..7518d3114 100644 --- a/host/lib/usrp/usrp2/mboard_impl.cpp +++ b/host/lib/usrp/usrp2/mboard_impl.cpp @@ -43,6 +43,12 @@ usrp2_mboard_impl::usrp2_mboard_impl( { //make a new interface for usrp2 stuff _iface = usrp2_iface::make(ctrl_transport); + + //extract the mboard rev numbers + _rev_lo = _iface->read_eeprom(I2C_ADDR_MBOARD, EE_MBOARD_REV_LSB, 1).at(0); + _rev_hi = _iface->read_eeprom(I2C_ADDR_MBOARD, EE_MBOARD_REV_MSB, 1).at(0); + + //contruct the interfaces to mboard perifs _clock_ctrl = usrp2_clock_ctrl::make(_iface); _codec_ctrl = usrp2_codec_ctrl::make(_iface); _serdes_ctrl = usrp2_serdes_ctrl::make(_iface); @@ -184,7 +190,7 @@ void usrp2_mboard_impl::get(const wax::obj &key_, wax::obj &val){ //handle the get request conditioned on the key switch(key.as<mboard_prop_t>()){ case MBOARD_PROP_NAME: - val = str(boost::format("usrp2 mboard %d") % _index); + val = str(boost::format("usrp2 mboard%d - rev %d:%d") % _index % _rev_hi % _rev_lo); return; case MBOARD_PROP_OTHERS:{ diff --git a/host/lib/usrp/usrp2/usrp2_impl.hpp b/host/lib/usrp/usrp2/usrp2_impl.hpp index 186516447..ab23830c0 100644 --- a/host/lib/usrp/usrp2/usrp2_impl.hpp +++ b/host/lib/usrp/usrp2/usrp2_impl.hpp @@ -137,6 +137,7 @@ public: private: size_t _index; + int _rev_hi, _rev_lo; const usrp2_io_helper &_io_helper; //properties for this mboard |