aboutsummaryrefslogtreecommitdiffstats
path: root/host/utils/usrp1_init_eeprom.cpp
diff options
context:
space:
mode:
authorNick Foster <nick@ettus.com>2011-09-02 13:22:10 -0700
committerJosh Blum <josh@joshknows.com>2011-10-10 15:49:51 -0700
commitd2a38f7f16dd0eff32069eb376774aac31ef2082 (patch)
tree552fb21b865620de326109531bf89f4c328797e6 /host/utils/usrp1_init_eeprom.cpp
parent2d7f96cd04192c25893c5d13d26bdc0b815f149e (diff)
downloaduhd-d2a38f7f16dd0eff32069eb376774aac31ef2082.tar.gz
uhd-d2a38f7f16dd0eff32069eb376774aac31ef2082.tar.bz2
uhd-d2a38f7f16dd0eff32069eb376774aac31ef2082.zip
Init_eeprom: enhancements for B100/reinit of init'ed devices
Diffstat (limited to 'host/utils/usrp1_init_eeprom.cpp')
-rw-r--r--host/utils/usrp1_init_eeprom.cpp7
1 files 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<std::string>(), "BIN image file")
+ ("type", po::value<std::string>(&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.