diff options
author | Nicholas Corgan <nick.corgan@ettus.com> | 2014-07-28 08:57:18 -0700 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2014-07-31 11:44:35 +0200 |
commit | fb47c829c2006ff42d5fc5e167060c801c463325 (patch) | |
tree | c497c0e3d85d51e74046bdfe215161321a0dc760 /host/utils | |
parent | 35fc42f9fcbc5a791bdabc92086a51a2279563f1 (diff) | |
download | uhd-fb47c829c2006ff42d5fc5e167060c801c463325.tar.gz uhd-fb47c829c2006ff42d5fc5e167060c801c463325.tar.bz2 uhd-fb47c829c2006ff42d5fc5e167060c801c463325.zip |
usrp_burn_mb_eeprom: write all changes to the EEPROM at once
* Utility was unnecessarily wearing out EEPROMs by calling separate writes for each key
Diffstat (limited to 'host/utils')
-rw-r--r-- | host/utils/usrp_burn_mb_eeprom.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/host/utils/usrp_burn_mb_eeprom.cpp b/host/utils/usrp_burn_mb_eeprom.cpp index ce0879c8e..f3e12c765 100644 --- a/host/utils/usrp_burn_mb_eeprom.cpp +++ b/host/utils/usrp_burn_mb_eeprom.cpp @@ -81,11 +81,12 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ } std::cout << std::endl; if (vm.count("val")){ + mb_eeprom = uhd::usrp::mboard_eeprom_t(); for(size_t i = 0; i < vals_vec.size(); i++){ - uhd::usrp::mboard_eeprom_t mb_eeprom; mb_eeprom[keys_vec[i]] = vals_vec[i]; + mb_eeprom[keys_vec[i]] = vals_vec[i]; std::cout << boost::format("Setting EEPROM [\"%s\"] to \"%s\"...") % keys_vec[i] % vals_vec[i] << std::endl; - tree->access<uhd::usrp::mboard_eeprom_t>("/mboards/0/eeprom").set(mb_eeprom); } + tree->access<uhd::usrp::mboard_eeprom_t>("/mboards/0/eeprom").set(mb_eeprom); std::cout << "Power-cycle the USRP device for the changes to take effect." << std::endl; std::cout << std::endl; } |