From d2a38f7f16dd0eff32069eb376774aac31ef2082 Mon Sep 17 00:00:00 2001 From: Nick Foster Date: Fri, 2 Sep 2011 13:22:10 -0700 Subject: Init_eeprom: enhancements for B100/reinit of init'ed devices --- host/utils/usrp1_init_eeprom.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/host/utils/usrp1_init_eeprom.cpp b/host/utils/usrp1_init_eeprom.cpp index 1778d5f9d..95b708c49 100644 --- a/host/utils/usrp1_init_eeprom.cpp +++ b/host/utils/usrp1_init_eeprom.cpp @@ -26,10 +26,13 @@ namespace po = boost::program_options; int UHD_SAFE_MAIN(int argc, char *argv[]){ + std::string type; po::options_description desc("Allowed options"); desc.add_options() ("help", "help message") ("image", po::value(), "BIN image file") + ("type", po::value(&type)->default_value("usrp1"), "USRP type (usrp1 or b100)") + ("already-init", "specify to look for an already-initialized USRP") ; po::variables_map vm; @@ -49,8 +52,8 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ //load the options into the address uhd::device_addr_t device_addr; - device_addr["type"] = "usrp1"; - device_addr["uninit"] = "yeah"; //tell find to look for an uninitialized FX2 + device_addr["type"] = type; + device_addr["uninit"] = vm.count("already-init") ? "" : "yeah"; //tell find to look for an uninitialized FX2 //find and create a control transport to do the writing. -- cgit v1.2.3