diff options
author | Ashish Chaudhari <ashish@ettus.com> | 2016-09-26 15:17:23 -0700 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2016-09-27 09:03:13 -0700 |
commit | 2876c159ec268e70ade5139ac73b146fd00b83ca (patch) | |
tree | 27cae076b06815dac9786a4a33d12de65131bf23 /host/lib/usrp/x300/x300_radio_ctrl_impl.cpp | |
parent | 64423ac3cc011af21622fb296b6d5400879b5da3 (diff) | |
download | uhd-2876c159ec268e70ade5139ac73b146fd00b83ca.tar.gz uhd-2876c159ec268e70ade5139ac73b146fd00b83ca.tar.bz2 uhd-2876c159ec268e70ade5139ac73b146fd00b83ca.zip |
bugfix: db eeprom id not being written for X3x0
- The value of db_eeprom_t being written was stale due to a caching bug
- Updated subscriber for db_eeprom_t to write the EEPROM state *and*
cache it locally
Signed-off-by: Moritz Fischer <moritz.fischer@ettus.com>
Diffstat (limited to 'host/lib/usrp/x300/x300_radio_ctrl_impl.cpp')
-rw-r--r-- | host/lib/usrp/x300/x300_radio_ctrl_impl.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/host/lib/usrp/x300/x300_radio_ctrl_impl.cpp b/host/lib/usrp/x300/x300_radio_ctrl_impl.cpp index 88dc73896..e11548703 100644 --- a/host/lib/usrp/x300/x300_radio_ctrl_impl.cpp +++ b/host/lib/usrp/x300/x300_radio_ctrl_impl.cpp @@ -327,8 +327,8 @@ void x300_radio_ctrl_impl::setup_radio( //Add to tree _tree->create<dboard_eeprom_t>(db_path / EEPROM_PATHS[i]) .set(_db_eeproms[addr]) - .add_coerced_subscriber(boost::bind(&dboard_eeprom_t::store, - _db_eeproms[addr], boost::ref(*zpu_i2c), (BASE_ADDR | addr))); + .add_coerced_subscriber(boost::bind(&x300_radio_ctrl_impl::_set_db_eeprom, + this, zpu_i2c, (BASE_ADDR | addr), _1)); } //create a new dboard interface @@ -860,6 +860,12 @@ void x300_radio_ctrl_impl::_check_adc(const boost::uint32_t val) } } +void x300_radio_ctrl_impl::_set_db_eeprom(i2c_iface::sptr i2c, const size_t addr, const uhd::usrp::dboard_eeprom_t &db_eeprom) +{ + db_eeprom.store(*i2c, addr); + _db_eeproms[addr] = db_eeprom; +} + /**************************************************************************** * Helpers ***************************************************************************/ |